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.
What problem does this PR solve?
Issue Number: #2841
Problem Summary: Get和Set方法会加到线程池,大量Get和Set的情况下线程池里的任务会大量堆积,这里使用bvar变量对线程池里的Get和Set进行计数。
What is changed and how it works?
What's Changed:
client_metric.h:结构体KVClientManagerMetric中增加了两个bvar变量(getQueueSize和setQueueSize)分别用来对Get和Set计数。
kvclient_manager.cpp:在类KVClientManager的Get和Set方法里改变bvar变量的值。
How it Works: 任务加入到线程池,对bvar变量进行+1操作,任务结束,bvar变量及时-1。
Side effects(Breaking backward compatibility? Performance regression?): 无
Check List