private void HandleErrorStatusMessage(StatusMessage message)
        {
            this.EndTime = message.Time;
            RefreshTime(message);
            for (int i = 0; i < message.Stacks.Count; i++)
            {
                SequenceStateHandle sequenceStateHandle = _sequenceHandles[message.Stacks[i].Sequence];
                // 只更新未结束的状态
                if (!ModuleUtils.IsOver(sequenceStateHandle.State))
                {
                    sequenceStateHandle.HandleStatusMessage(message, i);
                }
            }

            UpdateSessionResultData(message.ExceptionInfo);

            SetTestResultStatistics(message.WatchData);
            // 写入性能记录条目
            if (null != message.Performance)
            {
                WritePerformanceStatus(message.Performance);
            }
            _testResults.Performance = _stateManageContext.DatabaseProxy.GetPerformanceResult(Session);
            _testResults.TestOver    = true;
            _stateManageContext.EventDispatcher.RaiseEvent(Constants.SessionOver, Session, _testResults);
        }
        private void HandleReportStatusMessage(StatusMessage message)
        {
            IRuntimeStatusInfo runtimeStatusInfo;

            RefreshTime(message);
            for (int i = 0; i < message.Stacks.Count; i++)
            {
                SequenceStateHandle sequenceStateHandle = _sequenceHandles[message.Stacks[i].Sequence];
                RuntimeState        sequenceState       = sequenceStateHandle.State;
                if (sequenceState == RuntimeState.StartIdle || sequenceState == RuntimeState.Running ||
                    RuntimeState.Blocked == sequenceState || RuntimeState.DebugBlocked == sequenceState)
                {
                    sequenceStateHandle.HandleStatusMessage(message, i);
                }
            }

            runtimeStatusInfo = CreateRuntimeStatusInfo(message);

            // 写入性能记录条目
            if (null != message.Performance)
            {
                WritePerformanceStatus(message.Performance);
            }
            _stateManageContext.EventDispatcher.RaiseEvent(Constants.StatusReceived, Session, runtimeStatusInfo);
        }