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

Feature: implement the counter #931

Closed
Tracked by #922
empiredan opened this issue Mar 24, 2022 · 0 comments
Closed
Tracked by #922

Feature: implement the counter #931

empiredan opened this issue Mar 24, 2022 · 0 comments
Labels
type/enhancement Indicates new feature requests

Comments

@empiredan
Copy link
Contributor

In #922 it has been mentioned that a counter in essence is a 64-bit integer that can be incremented and decremented. It can be used to measure the number of tasks in queues, current number of running manual compacts, etc. All counters start out at 0.

From the aspect of implementations, there are 2 kinds of counters:

  • One is the general type of Counter that are implemented by striped_long_adder, which can achieve high performance while consuming less memory if it's not updated very frequently.
  • Another uses concurrent_long_adder as the underlying implementation. It has higher performance while consuming more memory if it's updated very frequently.

For the details of striped_long_adder and concurrent_long_adder please see #889.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

1 participant