public Map ( TestContextResultAggregate results, bool includeAllCheckpoints = false, System.TimeSpan aggregationTimeSpan = null ) : IEnumerable |
||
results | Viki.LoadRunner.Engine.Aggregators.Aggregates.TestContextResultAggregate | |
includeAllCheckpoints | bool | |
aggregationTimeSpan | System.TimeSpan | |
return | IEnumerable |
/// <summary> /// Build results object from aggregated data /// </summary> /// <returns>Aggregated results</returns> public IEnumerable<HistogramResultRow> GetResults() { if (_orderLearner.LearnedOrder.Count != 0) { TimeSpan lastAggregationBeginMark = TimeSpan.MinValue; if (AggregationTimePeriod != null) { TimeSpan lastIterationBeginMark = _histogramItems.Max(h => h.Value.IterationBeginTime); lastAggregationBeginMark = TimeSpan.FromTicks( (lastIterationBeginMark.Ticks / AggregationTimePeriod.Value.Ticks) * AggregationTimePeriod.Value.Ticks ); } ResultsMapper mapper = new ResultsMapper(_orderLearner); foreach (KeyValuePair<object, TestContextResultAggregate> histogramItem in _histogramItems) { HistogramResultRow result = new HistogramResultRow( histogramItem.Key, histogramItem.Value, mapper.Map(histogramItem.Value, true, histogramItem.Value.IterationBeginTime >= lastAggregationBeginMark ? null : AggregationTimePeriod).ToList() ); yield return result; } } }
/// <summary> /// Get Build results object from aggregated data /// </summary> /// <returns>Aggregated results</returns> public ResultsContainer GetResults() { ResultsContainer result = null; if (_orderLearner.LearnedOrder.Count != 0) { ResultsMapper mapper = new ResultsMapper(_orderLearner); IEnumerable<ResultItemRow> resultRows = mapper.Map(_statsAggregator); result = new ResultsContainer(resultRows.ToList(), new ResultItemTotals(_statsAggregator)); } return result; }