mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
cmd/geth, ethdb/pebble: polish method naming and code comment
This commit is contained in:
parent
85459e1439
commit
9c3cc83a03
3 changed files with 7 additions and 7 deletions
|
|
@ -337,7 +337,7 @@ func importChain(ctx *cli.Context) error {
|
|||
fmt.Printf("Import done in %v.\n\n", time.Since(start))
|
||||
|
||||
// Output pre-compaction stats mostly to see the import trashing
|
||||
showLeveldbStats(db)
|
||||
showDBStats(db)
|
||||
|
||||
// Print the memory statistics used by the importing
|
||||
mem := new(runtime.MemStats)
|
||||
|
|
@ -360,7 +360,7 @@ func importChain(ctx *cli.Context) error {
|
|||
}
|
||||
fmt.Printf("Compaction done in %v.\n\n", time.Since(start))
|
||||
|
||||
showLeveldbStats(db)
|
||||
showDBStats(db)
|
||||
return importErr
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ func checkStateContent(ctx *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func showLeveldbStats(db ethdb.KeyValueStater) {
|
||||
func showDBStats(db ethdb.KeyValueStater) {
|
||||
if stats, err := db.Stat("leveldb.stats"); err != nil {
|
||||
log.Warn("Failed to read database stats", "error", err)
|
||||
} else {
|
||||
|
|
@ -427,7 +427,7 @@ func dbStats(ctx *cli.Context) error {
|
|||
db := utils.MakeChainDatabase(ctx, stack, true)
|
||||
defer db.Close()
|
||||
|
||||
showLeveldbStats(db)
|
||||
showDBStats(db)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ func dbCompact(ctx *cli.Context) error {
|
|||
defer db.Close()
|
||||
|
||||
log.Info("Stats before compaction")
|
||||
showLeveldbStats(db)
|
||||
showDBStats(db)
|
||||
|
||||
log.Info("Triggering compaction")
|
||||
if err := db.Compact(nil, nil); err != nil {
|
||||
|
|
@ -447,7 +447,7 @@ func dbCompact(ctx *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
log.Info("Stats after compaction")
|
||||
showLeveldbStats(db)
|
||||
showDBStats(db)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ func upperBound(prefix []byte) (limit []byte) {
|
|||
}
|
||||
|
||||
// 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.
|
||||
// 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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue