THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
metricName = metrics.metricName("request-rate", metricGrpName, "The average number of requests sent per second.", metricTags); totalMetricName = metrics.metricName("request-total", metricGrpName, "The total number of requests sent.", metricTags); this.bytesSent.add(new Rate(new Count(), metricName, totalMetricName)); |
Rate would be a CompoundStat that returns both total and the existing rate metrics. This is already handled correctly to support Percentiles. The two metrics appear as two Attributes.
Code Block | ||||
---|---|---|---|---|
| ||||
@Override
public List<NamedMeasurable> stats() {
List<NamedMeasurable> stats = new ArrayList<NamedMeasurable>(2);
stats.add(new NamedMeasurable(totalMetricName, total));
stats.add(new NamedMeasurable(rateMetricName, rate));
return stats;
} |
Compatibility, Deprecation, and Migration Plan
...