Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] latency scale factor #2655

Merged
merged 3 commits into from
Jun 10, 2024
Merged

[feat] latency scale factor #2655

merged 3 commits into from
Jun 10, 2024

Conversation

superhail
Copy link
Contributor

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.(请遵循贡献者准则).

@@ -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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wwbmmm done

@superhail superhail requested a review from wwbmmm June 4, 2024 08:55
@wwbmmm wwbmmm merged commit 556e56b into apache:master Jun 10, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants