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(metrics): Add database metrics in human readable form #8380

Closed
oxarbitrage opened this issue Mar 26, 2024 · 0 comments · Fixed by #8389
Closed

feature(metrics): Add database metrics in human readable form #8380

oxarbitrage opened this issue Mar 26, 2024 · 0 comments · Fixed by #8389
Assignees
Labels
C-feature Category: New features I-usability Zebra is hard to understand or use P-Low ❄️

Comments

@oxarbitrage
Copy link
Contributor

In #8336 we added metrics for the database total size, memory size and so on.

For example a default output looks of this addition when starting zeba is as:

2024-03-26T11:17:33.249322Z  INFO {zebrad="d3af910" net="Main"}: zebra_state::service::finalized_state::disk_db: Total Database Disk Size: 36496028741 bytes
2024-03-26T11:17:33.249421Z  INFO {zebrad="d3af910" net="Main"}: zebra_state::service::finalized_state::disk_db: Total Live Data Disk Size: 18031326069 bytes
2024-03-26T11:17:33.249435Z  INFO {zebrad="d3af910" net="Main"}: zebra_state::service::finalized_state::disk_db: Total Database Memory Size: 49152 bytes

I think we can group together the 3 lines into 1 and also convert the bytes to human readable form, there are a few crates around to do this, for example:

https://crates.io/crates/human_bytes
https://crates.io/crates/humanize-bytes

@oxarbitrage oxarbitrage added I-usability Zebra is hard to understand or use C-feature Category: New features P-Low ❄️ labels Mar 26, 2024
@github-project-automation github-project-automation bot moved this to New in Zebra Mar 26, 2024
@oxarbitrage oxarbitrage self-assigned this Apr 9, 2024
@mpguerra mpguerra moved this from New to Review/QA in Zebra Apr 10, 2024
@mergify mergify bot closed this as completed in #8389 Apr 11, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Done in Zebra Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: New features I-usability Zebra is hard to understand or use P-Low ❄️
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant