You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/07/31 14:32:51 UTC

[GitHub] [rocketmq] makabakaboom commented on pull request #3191: [ISSUE #3190] make samplingInMinutes samplingInHour collected data more accurate

makabakaboom commented on pull request #3191:
URL: https://github.com/apache/rocketmq/pull/3191#issuecomment-890357214


   > ![image](https://user-images.githubusercontent.com/29321745/127630617-df6cd149-ea17-48aa-b04e-222a347506e4.png)
   > Minutes and hours save limited data, you write like this, only the data in the next few seconds,the data obtained is wrong,not the same as the expected value of the design
   
   可以从新review这个PR,从代码中可以看到最近一小时和最近一天的统计分别有10分钟和一个小时延迟,这样缺乏统计的实时性,可能导致查询到结果最近一小时和最近一天的值反而比最近一分钟小。而修改后,利用每10s的采样值去替换掉最近一小时和最近一天的集合中最后一个统计值,这样能达到较实时的效果,而且也没有违反原集合的意义,也能达到和原集合相同的效果,集合中的最后一个对象的前面对象集合依旧相差对应period的时间差。最终效果是统计值比原来更有实时性


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org