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

chore(debug): add summary to show LSM tree and namespace size (#7891) #8516

Merged
merged 2 commits into from
Jan 4, 2023

Conversation

all-seeing-code
Copy link
Contributor

@all-seeing-code all-seeing-code commented Dec 14, 2022

Add --only-summary flag in dgraph debug to show LSM tree and namespace sizes.

(cherry picked from commit cc87153)

The flag restricts the output to only the summary:

╰─➤  dgraph debug --postings ./p --only-summary

Opening DB: ./p
Listening for /debug HTTP requests at port: 8080
badger 2022/12/23 01:01:08 INFO: All 1 tables opened in 0s
badger 2022/12/23 01:01:08 INFO: Discard stats nextEmptySlot: 0
badger 2022/12/23 01:01:08 INFO: Set nextTxnTs to 11
[SUMMARY]
Level 0 size:      1.3 KiB
Level 1 size:          0 B
Level 2 size:          0 B
Level 3 size:          0 B
Level 4 size:          0 B
Level 5 size:          0 B
Level 6 size:          0 B
Total SST size:      1.3 KiB

Namespace 0x0 size:      1.3 KiB (banned)

badger 2022/12/23 01:01:08 INFO: Lifetime L0 stalled for: 0s
badger 2022/12/23 01:01:08 INFO: 
Level 0 [ ]: NumTables: 01. Size: 1.3 KiB of 0 B. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 64 MiB
Level 1 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 2 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 3 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 4 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 5 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 6 [B]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level Done

@CLAassistant
Copy link

CLAassistant commented Dec 14, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ anurags92
❌ NamanJain8
You have signed the CLA already but the status is still pending? Let us recheck it.

@all-seeing-code all-seeing-code added the slash-to-main PRs which bring slash branch on par with main. label Dec 14, 2022
@all-seeing-code all-seeing-code marked this pull request as ready for review December 22, 2022 19:29
@all-seeing-code
Copy link
Contributor Author

@mangalaman93 This is a pretty benign change, I am wondering if we need tests for this too. I don't think debug tool is tested right now.

@mangalaman93
Copy link
Member

what kind of tests would even be useful for this change?

@coveralls
Copy link

coveralls commented Jan 2, 2023

Coverage Status

Coverage: 64.388% (-0.01%) from 64.401% when pulling 6639a11 on anurag/cherry-pick-lsm-summary into 4c1b575 on main.

Add --only-summary flag in dgraph debug to show LSM tree and namespace sizes.

(cherry picked from commit cc87153)
@all-seeing-code all-seeing-code force-pushed the anurag/cherry-pick-lsm-summary branch from 8e55894 to 8a99567 Compare January 4, 2023 11:24
@all-seeing-code all-seeing-code merged commit 25cf4f2 into main Jan 4, 2023
@all-seeing-code all-seeing-code deleted the anurag/cherry-pick-lsm-summary branch January 4, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
slash-to-main PRs which bring slash branch on par with main.
Development

Successfully merging this pull request may close these issues.

6 participants