Spring Integration Channel Statistics Metrics

假如想象 提交于 2019-12-11 02:37:13

问题


somehow I dont catch the Spring-Integration Metrics Content. What I want to have is a statistical output about, how many message/second goes through a message channel, what is the min and the max throughput. If I use newTicketChannel.getSendRate(), then I become following output:

What is clear to me is N(number of Messages). Mean for me is the number of messages what have been progressed each second (?). But what is totally unclear to me are the values of min and max. I need something like, min=200, max=380 => means 200 was the lowest rate for the last minute, max 380 the last minute, or something like this.

How is the good practive way? Thanks in advance. :-)


回答1:


The min and max are since the last reset(); if you don't reset they represent the min/max since the app started.

The mean is an exponential moving average over time and a number of messages.

Documentation here.

You would have to periodically reset() the MessageChannelMetrics to get a new min/max.




回答2:


In the meanwhile to get the results I want I did following:

Wanted was

  1. Messages/Second
  2. Max Messages / Second
  3. Min Messages / Second

Solutions:

  1. 1/newTicketChannel.getSendDuration().getMean() * 1000
  2. 1/newTicketChannel.getSendDuration().getMin() * 1000
  3. 1/newTicketChannel.getSendDuration().getMax() * 1000

If there are common functionality in spring integration metrics to get same result, please dont hesitate telling me. It would be cool someone provide information about the mean of the values I posted in my question.

Thanks and Cheers :-)



来源:https://stackoverflow.com/questions/42052881/spring-integration-channel-statistics-metrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!