Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Classes | Public Member Functions | List of all members
com.griddynamics.jagger.engine.e1.collector.AvgMetricAggregatorProvider Class Reference

Calculates average value on interval. More...

Inheritance diagram for com.griddynamics.jagger.engine.e1.collector.AvgMetricAggregatorProvider:
Inheritance graph
[legend]

Public Member Functions

MetricAggregator provide ()
 Method is called to provide instance of private class: AvgMetricAggregator that implements MetricAggregator<C extends Number> and provides averaging. More...
 

Detailed Description

Calculates average value on interval.

Author
Nikolay Musienko
Details:


Usage example in XML:
To use this aggregator add metric-aggregator-avg to metric-custom block.
<!-- begin: following section is used for docu generation - metric-success-rate -->
<!-- Example #1: Success rate metric with default aggregators
plotData = true => metric vs time data will be saved (displayed in WebUI and PDF report)
saveSummary = true => summary value for summary page will be not saved -->
<metric xsi:type="metric-success-rate" plotData="true" saveSummary="false"/>
<!-- Example #2: Success rate metric with custom name and default aggregators -->
<metric id="CustomNameSuccessRate" xsi:type="metric-success-rate" plotData="true" saveSummary="false"/>
<!-- Example #3: Success rate metric with custom name and custom aggregators
With this setup success rate will be aggregated on interval like on picture below -->
<metric id="CustomSuccessRatePlot" xsi:type="metric-success-rate" plotData="true" saveSummary="false">
<metric-aggregator xsi:type="metric-aggregator-avg"/>
</metric>
<!-- end: following section is used for docu generation - metric-success-rate -->

Usage example in code:
// begin: following section is used for docu generation - example of metric creation
// In this example, we will create custom metric to collect internal metrics of SUT
// Approach is the following:
// - Declare custom metric
// - Run test. SUT will usually collect some internal data (metrics)
// - After test is finished, get all internal data from SUT and save to custom metric
// In this case internal data will be save to result DB, displayed in test report and Web UI,
// you can use it in decision maker when running Continues Integration
MetricDescription metricDescription = new MetricDescription("internalData");
metricDescription.plotData(false).showSummary(true).addAggregator(new AvgMetricAggregatorProvider());
getMetricService().createMetric(metricDescription);
// end: following section is used for docu generation - example of metric creation


The documentation for this class was generated from the following file: