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

We can retrieve leveldb stats more directly? #25116

Closed
hadv opened this issue Jun 17, 2022 · 5 comments
Closed

We can retrieve leveldb stats more directly? #25116

hadv opened this issue Jun 17, 2022 · 5 comments

Comments

@hadv
Copy link
Contributor

hadv commented Jun 17, 2022

Why we don't get the db stats directly from the Total line in the current leveldb output below?

Compactions
 Level |   Tables   |    Size(MB)   |    Time(sec)  |    Read(MB)   |   Write(MB)
-------+------------+---------------+---------------+---------------+---------------
   0   |          1 |      13.08174 |       0.00000 |       0.00000 |       0.00000
   1   |         62 |      96.60306 |       0.00000 |       0.00000 |       0.00000
   2   |        543 |     998.45153 |       0.00000 |       0.00000 |       0.00000
   3   |       1676 |    3369.03049 |       0.00000 |       0.00000 |       0.00000
-------+------------+---------------+---------------+---------------+---------------
 Total |       2282 |    4477.16682 |       0.00000 |       0.00000 |       0.00000

Instead of accumulating the data from the lines like current code?

// This is how a LevelDB stats table looks like (currently):

@hadv hadv added the type:docs label Jun 17, 2022
@hadv hadv changed the title We can retrieve leveldb stat more directly? We can retrieve leveldb stats more directly? Jun 17, 2022
@karalabe
Copy link
Member

I guess the total wasn't part of the output when we've implemented this, at least looking at the example output in the exact code you linked.

@rjl493456442
Copy link
Member

And something irrelevant, Leveldb now supports to report stats in a single structure. Instead of parsing the stats in string format, it can be definitely easier. I guess it could be a starter task anyway.

@karalabe
Copy link
Member

Though if we go with Pebble in the long term, might not be worth to poke working code.

@hadv
Copy link
Contributor Author

hadv commented Jun 23, 2022

And something irrelevant, Leveldb now supports to report stats in a single structure. Instead of parsing the stats in string format, it can be definitely easier. I guess it could be a starter task anyway.

yeah, I think we can do smth like this?

#25154

@holiman
Copy link
Contributor

holiman commented Dec 1, 2023

Though if we go with Pebble in the long term, might not be worth to poke working code.

Since we've switched the default over to pebble, we're not going to further work on leveldb integration

@holiman holiman closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants
@karalabe @holiman @hadv @rjl493456442 and others