问题
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
- Messages/Second
- Max Messages / Second
- Min Messages / Second
Solutions:
1/newTicketChannel.getSendDuration().getMean() * 1000
1/newTicketChannel.getSendDuration().getMin() * 1000
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