예제 #1
0
        private CheckpointAggregate GetCheckpointAggregate(string checkpointName)
        {
            CheckpointAggregate result;

            if (!CheckpointAggregates.TryGetValue(checkpointName, out result))
            {
                result = new CheckpointAggregate(checkpointName);
                CheckpointAggregates.Add(checkpointName, result);
            }

            return(result);
        }
예제 #2
0
        public void AggregateResult(IResult result)
        {
            MapIterationTime(result);
            AggregateThreadCounts(result);

            ICheckpoint previousCheckpoint = PreviousCheckpointBase;

            foreach (ICheckpoint currentCheckpoint in result.Checkpoints)
            {
                TimeSpan            momentCheckpointTimeSpan        = currentCheckpoint.TimePoint - previousCheckpoint.TimePoint;
                CheckpointAggregate checkpointAggregateResultObject = GetCheckpointAggregate(currentCheckpoint.Name);

                checkpointAggregateResultObject.AggregateCheckpoint(momentCheckpointTimeSpan, currentCheckpoint);
                previousCheckpoint = currentCheckpoint;
            }
        }
예제 #3
0
        public CheckpointAggregate(string name, CheckpointAggregate copyStatsFrom)
        {
            if (name == null)
                throw new ArgumentNullException(nameof(name));
            if (copyStatsFrom == null)
                throw new ArgumentNullException(nameof(copyStatsFrom));

            Name = name;

            Errors = copyStatsFrom.Errors;
            SummedMomentTime = copyStatsFrom.SummedMomentTime;
            SummedTotalTime = copyStatsFrom.SummedTotalTime;

            MomentMin = copyStatsFrom.MomentMin;
            MomentMax = copyStatsFrom.MomentMax;
            TotalMin = copyStatsFrom.TotalMin;
            TotalMax = copyStatsFrom.TotalMax;

            Count = copyStatsFrom.Count;
        }
예제 #4
0
        public CheckpointAggregate(string name, CheckpointAggregate copyStatsFrom)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (copyStatsFrom == null)
            {
                throw new ArgumentNullException(nameof(copyStatsFrom));
            }

            Name = name;

            Errors           = copyStatsFrom.Errors;
            SummedMomentTime = copyStatsFrom.SummedMomentTime;
            SummedTotalTime  = copyStatsFrom.SummedTotalTime;

            MomentMin = copyStatsFrom.MomentMin;
            MomentMax = copyStatsFrom.MomentMax;
            TotalMin  = copyStatsFrom.TotalMin;
            TotalMax  = copyStatsFrom.TotalMax;

            Count = copyStatsFrom.Count;
        }