-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-9522. Add percentile for ProtocolMessageMetrics #5479
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
Conversation
|
Thanks @YuanbenWang for the patch. There are some checkstyle failures: |
Thanks for the review~! I have fixed it and pushed the new PR. |
5a4e1ea to
e520901
Compare
|
@adoroszlai CI has been success in my own project. Could you plz help review this PR? |
|
@tanvipenumudy please review |
xichen01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YuanbenWang thanks for working on this! The change looks good. Just a few comment inlined.
| mutableQuantiles[i] = registry.newQuantiles( | ||
| value.toString() + "RpcTime" + intervals[i] + "s", | ||
| value.toString() + "rpc time in milli second", | ||
| "ops", "latency", intervals[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to clarify the unit of time in the name of the Metrics, such as Use latencyMS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the name of the Metric will be like “InfoVolumeRpcTime127s90thPercentileLatency” and the unit of time is including in it as "s". It will be appreciated if you could tell me how to let it more suitable. How about "InfoVolumeRpcTime127latencySeconds90thPercentileLatency"? @xichen01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that InfoVolumeRpcTime127s90thPercentileLatencyMs is available, the 127s is the time of sampling, Ms is the unit of the Metrics value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InfoVolumeRpcTime127latencySeconds90thPercentileLatency
Thank you for your feedback! I appreciate your clarification on the suggestion you provided. I now understand it better, and I will proceed to make the necessary modifications according to your advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not expressing it clearly, I think we can remove the type from the Metrics name when we move it to the tag, so the name can be 127s90thPercentileLatencyMs
| "ops", "latency", intervals[i]); | |
| for (KEY value : values) { | |
| MetricsRegistry registry = new MetricsRegistry(name + "MessageMetrics"); | |
| registries.put(value, registry); | |
| //... | |
| if (quantileEnable) { | |
| mutableQuantiles[i] = registry.newQuantiles( | |
| "_" + intervals[i] + "s_", | |
| value.toString() + "rpc time in milli second", | |
| "ops", "latencyMS", intervals[i]); |
The Metrics name will be like this om_client_protocol_127s_99th_percentile_latency_ms{type="TransferLeadership",hostname="xxx"} 0 om_client_protocol_127s_num_ops{type="TransferLeadership",hostname="xxx"}
This name is consistent with the original Metrics style and is simpler.
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
Outdated
Show resolved
Hide resolved
|
@xichen01 Thank you for reviewing my code and providing valuable suggestions. I have made the necessary modifications based on your feedback. Could you please review the updated code again? |
|
Thanks @YuanbenWang, LGTM +1. |
|
@xichen01 Thank you for the review and precious suggestions ! |
|
@adoroszlai Hello~! Could you please help trigger the CI? In my own project, it has been success. |
|
@duongkame @kerneltime @tanvipenumudy please review |
|
@ChenSammi @xBis7 Hello! Could you please review this PR? |
xBis7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YuanbenWang Thanks for the patch. I've left some comments.
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
Outdated
Show resolved
Hide resolved
|
@xBis7 I'm sorry for the long delay in responding to your review. I'v changed my code. Could you please review the updated code again? |
|
@YuanbenWang Thanks for the changes. With
LGTM! I'm triggering the CI. |
|
@YuanbenWang Can you add a simple unit test for I think it's odd there are no tests for protocol message metrics. |
OK, I will do it in the next few days. |
We should be checking metrics as part of normal functional tests, not in separate metrics-specific tests. |
|
/pending tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)
tests
|
Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author. It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time. It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs. If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel." |
This pr is reviewed except I'm not sure if I should add unit tests and where they should be added. Could you give me some advice? |
"Reopen and comment" is disabled for me, it says "branch was force-pushed or recreated". Please feel free to open a new PR and reference this one. Sorry for the trouble. |
Thank you for your help~! I will open new one |



What changes were proposed in this pull request?
This PR aims to add percentile for ProtocolMessageMetrics.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9522
How was this patch tested?
Tested locally.
The result is shown on the Jira page.