You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "superhail (via GitHub)" <gi...@apache.org> on 2024/05/31 08:51:09 UTC
[PR] [feat] latency scale factor (brpc)
superhail opened a new pull request, #2655:
URL: https://github.com/apache/brpc/pull/2655
### What problem does this PR solve?
Issue Number:
Problem Summary: brpc's latency dispaly is displayed as `us`, while in our prod env, `ms` is more meaningful.
### What is changed and the side effects?
Changed: provide a gflag to change latency's scale factor
Side effects:
- Performance effects(性能影响): Little or none
- Breaking backward compatibility(向后兼容性): No
---
### Check List:
- Please make sure your changes are compilable(请确保你的更改可以通过编译).
- When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
- Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
--
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@brpc.apache.org
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
Re: [PR] [feat] latency scale factor (brpc)
Posted by "superhail (via GitHub)" <gi...@apache.org>.
superhail commented on code in PR #2655:
URL: https://github.com/apache/brpc/pull/2655#discussion_r1624632787
##########
src/brpc/server.cpp:
##########
@@ -123,6 +123,8 @@ const int INITIAL_CERT_MAP = 64;
// compilation units is undefined.
const int s_ncore = sysconf(_SC_NPROCESSORS_ONLN);
+DEFINE_uint64(latency_scale_factor, 1, "latency scale factor, used by method status, etc., latency_us = latency * latency_scale_factor");
Review Comment:
ok
--
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@brpc.apache.org
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
Re: [PR] [feat] latency scale factor (brpc)
Posted by "superhail (via GitHub)" <gi...@apache.org>.
superhail commented on code in PR #2655:
URL: https://github.com/apache/brpc/pull/2655#discussion_r1625537296
##########
src/brpc/server.cpp:
##########
@@ -123,6 +123,8 @@ const int INITIAL_CERT_MAP = 64;
// compilation units is undefined.
const int s_ncore = sysconf(_SC_NPROCESSORS_ONLN);
+DEFINE_uint64(latency_scale_factor, 1, "latency scale factor, used by method status, etc., latency_us = latency * latency_scale_factor");
Review Comment:
@wwbmmm done
--
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@brpc.apache.org
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
Re: [PR] [feat] latency scale factor (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on code in PR #2655:
URL: https://github.com/apache/brpc/pull/2655#discussion_r1624030452
##########
src/brpc/server.cpp:
##########
@@ -123,6 +123,8 @@ const int INITIAL_CERT_MAP = 64;
// compilation units is undefined.
const int s_ncore = sysconf(_SC_NPROCESSORS_ONLN);
+DEFINE_uint64(latency_scale_factor, 1, "latency scale factor, used by method status, etc., latency_us = latency * latency_scale_factor");
Review Comment:
I think this gflag can be directly defined in `latency_recorder.cpp`, so that it doesn't need to be passed through so many layers of parameters.
--
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@brpc.apache.org
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
Re: [PR] [feat] latency scale factor (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm merged PR #2655:
URL: https://github.com/apache/brpc/pull/2655
--
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@brpc.apache.org
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