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

Curvefs: add metric for memcached queue list #2913

Closed
wants to merge 0 commits into from

Conversation

shuaihehe
Copy link
Contributor

@shuaihehe shuaihehe commented Nov 20, 2023

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

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

Copy link
Contributor

@Ziy1-Tan Ziy1-Tan left a comment

Choose a reason for hiding this comment

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

Put some result screenshots on this pr.

@shuaihehe
Copy link
Contributor Author

curve
curve1

Copy link
Contributor

@Ziy1-Tan Ziy1-Tan left a comment

Choose a reason for hiding this comment

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

Commits should squeeze into one, and make the commit message more meaningful.

@Ziy1-Tan
Copy link
Contributor

Ziy1-Tan commented Dec 1, 2023

cicheck

@Ziy1-Tan Ziy1-Tan changed the title 对线程池里的Get和Set进行计数 Curvefs: add metric for memcached queue list Dec 1, 2023
@shuaihehe shuaihehe closed this Dec 1, 2023
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.

None yet

2 participants