caigy commented on issue #3800:
URL: https://github.com/apache/rocketmq/issues/3800#issuecomment-1022808023


   It is calculate by the metric `getTotalTps`, which shows the tps of 
_getMessage_ call.
   
   1. When `org.apache.rocketmq.store.DefaultMessageStore#getMessage` is 
called, `getMessageTimesTotalFound` or `getMessageTimesTotalMiss` is 
incremented. 
   2. `org.apache.rocketmq.store.StoreStatsService#sampling` is executed every 
second, and tag the current `getMessageTimesTotalFound`  or  
`getMessageTimesTotalMiss` with current timestamp, and put them in 
`getTimesFoundList` or `getTimesMissList` separately. 
   3. So each list contains a time series record of the number of _getMessage_ 
operation, and each the timestamp between two consecutive item is about 1 
second. The interval is NOT precise, because the generation of record is 
triggered by scheduled service in step 2. 
   4. If you get the last X items in the list, sum the number of call times and 
divide the result by X, you can get the `getTotalTps` in the last X seconds.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to