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/26 10:25:00 UTC

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

DannyLuoDan opened a new issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365


   static bvar::Adder<uint32_t> a_skip;
   static bvar::Window<bvar::Adder<uint32_t>> _f_win("skip", "qps", &a_skip, 1);
   
   类似这样的一个结构,a_skip 记录代码逻辑跳过的累积次数
   那么这个时候skip_qps 这个数据代表的是什么意思?
    是去读取Adder 1s内 a_skip的当前值,还是1s中a_skip 增加了多少值?
   
   能作为qps指标(就是每秒skip了多少个)吗?
   
   多谢帮助


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


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

Posted by GitBox <gi...@apache.org>.
DannyLuoDan commented on issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365#issuecomment-819300098


   明白了,谢谢两位大佬


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


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

Posted by GitBox <gi...@apache.org>.
DannyLuoDan closed issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365


   


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


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

Posted by GitBox <gi...@apache.org>.
hotaery commented on issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365#issuecomment-818495288


   > > 参考文档:https://github.com/apache/incubator-brpc/blob/master/docs/cn/bvar_c++.md#quick-introduction
   > 
   > 谢谢。不过就是这边有些不明白的地方:
   > // bvar::Adder用于累加,下面定义了一个统计read error总数的Adder。
   > bvar::Adder g_read_error;
   > // 把bvar::Window套在其他bvar上就可以获得时间窗口内的值。
   > bvar::Window<bvar::Adder > 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


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

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1365:
URL: https://github.com/apache/incubator-brpc/issues/1365#issuecomment-809268801


   参考文档:https://github.com/apache/incubator-brpc/blob/master/docs/cn/bvar_c++.md#quick-introduction


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


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

Posted by GitBox <gi...@apache.org>.
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