ethdb, internal/ethapi: support exposing Pebble stats too, beside LevelDB (#28224)

ethdb, internal/ethapi: support exposing Pebble stats too, besinde LevelDB
This commit is contained in:
Péter Szilágyi
2023-09-28 22:27:21 +03:00
committed by GitHub
parent b9450bfcca
commit f988b2332e
3 changed files with 11 additions and 7 deletions
+5 -2
View File
@@ -379,9 +379,12 @@ func upperBound(prefix []byte) (limit []byte) {
return limit
}
// Stat returns a particular internal stat of the database.
// Stat returns the internal metrics of Pebble in a text format. It's a developer
// method to read everything there is to read independent of Pebble version.
//
// The property is unused in Pebble as there's only one thing to retrieve.
func (d *Database) Stat(property string) (string, error) {
return "", nil
return d.db.Metrics().String(), nil
}
// Compact flattens the underlying data store for the given key range. In essence,