Skip to content

Commit

Permalink
Merge pull request #451 from auszone/HWKMETRICS-219
Browse files Browse the repository at this point in the history
[HWKMETRICS-219]Fix counter rate calculation
  • Loading branch information
Stefan Negrea committed Feb 17, 2016
2 parents 5ff1c02 + cd80fe0 commit 7dee24a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void call(Task2 task) {
.flatMap(counter ->
metricsService.<Long> findDataPoints(counter.getMetricId(), start, end, 0, Order.DESC)
.take(1)
.map(dataPoint -> ((dataPoint.getValue().doubleValue() / (end - start) * 1000)))
.map(dataPoint -> ((dataPoint.getValue().doubleValue() / (end - start) * 1000 * 60)))
.map(rate -> new Metric<>(
new MetricId<>(tenant, COUNTER_RATE, counter.getMetricId().getName()),
singletonList(new DataPoint<>(start, rate)))));
Expand Down

0 comments on commit 7dee24a

Please sign in to comment.