You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/03/30 02:52:29 UTC

[GitHub] [incubator-brpc] DannyLuoDan commented on issue #1365: 将bvar::Adder和bvar::Window用在一起时,获取的数据代表什么意思

DannyLuoDan commented on issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365#issuecomment-809865450


   > 参考文档:https://github.com/apache/incubator-brpc/blob/master/docs/cn/bvar_c++.md#quick-introduction
   
   谢谢。不过就是这边有些不明白的地方:
   // bvar::Adder<T>用于累加,下面定义了一个统计read error总数的Adder。
   bvar::Adder<int> g_read_error;
   // 把bvar::Window套在其他bvar上就可以获得时间窗口内的值。
   bvar::Window<bvar::Adder<int> > g_read_error_minute("foo_bar", "read_error", &g_read_error, 60);
   //                                                     ^          ^                         ^
   //                                                    前缀       监控项名称                  60秒,忽略则为10秒
   
   这边时间窗口内的值是什么值?假设时间窗口为1秒,g_read_error 当前已经累加到了15,后续有时候1s增加2,有时候1s增加3等, 那么foo_bar_read_error的值是 累加后的值 17 还是 2 或者3呀? 


-- 
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org