Esempio n. 1
0
        public override IEnumerator ReceivePayload(VisualPayload payload)
        {
            var iterator = UpdateExecutionId(payload.Data);

            while (iterator.MoveNext())
            {
                yield return(null);
            }

            var executionPerformanceCommand = new GetExecutionPerformanceCommand(FoundExecutionId);

            iterator = CommandProcessor.Execute(executionPerformanceCommand);
            while (iterator.MoveNext())
            {
                yield return(null);
            }

            var statsMutable = ConstructStatsMutable(executionPerformanceCommand.InstructionCount);

            ExecutionStatsTarget.SetValue(statsMutable, payload.Data);

            iterator = Router.TransmitAll(payload);
            while (iterator.MoveNext())
            {
                yield return(null);
            }
        }
Esempio n. 2
0
        private IEnumerator CheckInstructionLimits()
        {
            InstructionLimitExceeded = false;

            yield break;

            var executionPerformanceCommand = new GetExecutionPerformanceCommand(FoundExecutionId);

            var iterator = CommandProcessor.Execute(executionPerformanceCommand);

            while (iterator.MoveNext())
            {
                yield return(null);
            }

            var instructionCount = (int)executionPerformanceCommand.InstructionCount;

            if (instructionCount > HaxxisGlobalSettings.Instance.InstructionLimit)
            {
                InstructionLimitExceeded = true;

                var message = string.Format("Instruction count exceeded ({0}/{1})", instructionCount, HaxxisGlobalSettings.Instance.InstructionLimit);

                HaxxisGlobalSettings.Instance.ReportVgsError(11, message);

                throw new InvalidOperationException(message);
            }
        }