Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The minimum response time (min rt) metrics for different labels are maintained using
sync.Map
. The purpose of labels is to differentiate between different provider-consumer RPC invocation paths. For example, if provider A offers a service and is called by two consumers, Consumer A and Consumer B, the minimum response time for each path needs to be tracked separately.Please provide suggestions for the code organization, naming, and implementation approach for this PR.
使用
sync.Map
对于不同 label 的最小响应时间(min rt)指标进行维护。label 的作用是区分不同的 provider-consumer RPC 调用链路,比如 provider A 提供的服务被 consumer A 和 Consumer B 两个消费者去调用,则两条链路的最小响应时间需要分别统计。请对于本 PR 代码组织方式、命名、实现思路提出建议。