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

Add feature reporttsi #73

Closed
GikaWong opened this issue Mar 2, 2022 · 1 comment · Fixed by #206
Closed

Add feature reporttsi #73

GikaWong opened this issue Mar 2, 2022 · 1 comment · Fixed by #206
Labels

Comments

@GikaWong
Copy link

GikaWong commented Mar 2, 2022

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Use case
Why is this important (helps with prioritizing requests)?

@IvanGao01
Copy link
Member

report-tsi

The report does the following:

Calculates the total exact series cardinality in the database.

Segments that cardinality by measurement, and emits those cardinality values.

Emits total exact cardinality for each shard in the database.

Segments for each shard the exact cardinality for each measurement in the shard.

Optionally limits the results in each shard to the “top n”.

The report-tsi command is primarily useful when there has been a change in cardinality and it’s not clear which measurement is responsible for this change, and further, when that change happened. Estimating an accurate cardinality breakdown for each measurement and for each shard will help answer those questions.

Syntax

cnosdb_inspect report-tsi --db-path [ options ]

Options

Optional arguments are in brackets.

--db-path

The path to the database.

[ --top ]

Limits the results to the top specified number within each shard.

Performance

The report-tsi command uses simple slice/maps to store low cardinality measurements, which saves on the cost of initializing bitmaps. For high cardinality measurements the tool uses roaring bitmaps, which means we don’t need to store all series IDs on the heap while running the tool. Conversion from low-cardinality to high-cardinality representations is done automatically while the tool runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants