Ejemplo n.º 1
0
        public ResultItemTotals(TestContextResultAggregate results)
        {
            CheckpointAggregate setupRow    = results.CheckpointAggregates[Checkpoint.IterationSetupCheckpointName];
            CheckpointAggregate tearDownRow = results.CheckpointAggregates[Checkpoint.IterationTearDownCheckpointName];

            TotalDuration = results.IterationEndTime - results.IterationBeginTime;

            TotalIterationsStartedCount   = setupRow.Count;
            TotalFailedIterationCount     = results.CheckpointAggregates.Sum(resultItemRow => resultItemRow.Value.Errors.Count) - tearDownRow.Errors.Count;
            TotalSuccessfulIterationCount = TotalIterationsStartedCount - TotalFailedIterationCount;


            _iterationSetupErrors    = setupRow.Errors;
            _iterationTearDownErrors = tearDownRow.Errors;

            AverageWorkingThreads = results.WorkingThreadsAvg;
        }
Ejemplo n.º 2
0
        public ResultItemRow(TestContextResultAggregate testContextResultAggregate, CheckpointAggregate checkpointAggregate, TimeSpan?totalDurationOverride = null)
        {
            _errors = checkpointAggregate.Errors;

            Count = checkpointAggregate.Count;

            Name = checkpointAggregate.Name;

            MomentMin = checkpointAggregate.MomentMin;
            MomentMax = checkpointAggregate.MomentMax;
            MomentAvg = TimeSpan.FromMilliseconds(checkpointAggregate.SummedMomentTime.TotalMilliseconds / _countDiv);

            SummedMin = checkpointAggregate.TotalMin;
            SummedMax = checkpointAggregate.TotalMax;
            SummedAvg = TimeSpan.FromMilliseconds(checkpointAggregate.SummedTotalTime.TotalMilliseconds / _countDiv);

            if (totalDurationOverride == null)
            {
                totalDurationOverride = testContextResultAggregate.IterationEndTime -
                                        testContextResultAggregate.IterationBeginTime;
            }

            SuccessIterationsPerSec = Count / totalDurationOverride.Value.TotalMilliseconds * 1000;
        }