You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Michael Davis <Mi...@solace.com> on 2018/08/13 21:07:42 UTC

Confusion about Codahale Metrics

Hi,

I'm trying to do some performance measurements connecting our Solace PubSub+ message router to other message routers.

I wrote an app that calls

context.addRoutePolicyFactory(new MetricsRoutePolicyFactory());

then programmatically creates a route, and then runs it for a certain amount of time.

Then I stop the route and get the metrics:

MetricsRegistryService registryService = context.hasService(MetricsRegistryService.class);
MetricRegistry metricRegistry = registryService.getMetricsRegistry();
Timer timer = (Timer) registry.getMetrics().values().iterator().next();

Long count = timer.getCount(),

Double rate = timer.getMeanRate()

Now, there are cases where the numbers don't seem to make sense. Running the routes for 30 seconds, one reported:
Count: 56369 Rate: 179.15
And another reported:
Count: 50599 Rate: 794.31

How can the rate be 4 times higher in the second route, when it processed about the same number of messages over the same amount of time?
What's it actually measuring?

Thanks
Michael Davis
Solace Inc
Ottawa, Canada