aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2018-03-08 20:59:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-03-08 20:59:00 +0800
commit39c16c8a1e9292d26669ea4faeedc09ad4ece1ea (patch)
treee4a21ce839b3595a6afd02137388ab96c117b5e0 /cmd
parent4871e25f5fe8d58344f5267ef197662dde018d21 (diff)
downloaddexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.gz
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.bz2
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.lz
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.xz
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.zst
dexon-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.zip
cmd, ethdb, vendor: integrate leveldb iostats (#16277)
* cmd, dashboard, ethdb, vendor: send iostats to dashboard * ethdb: change names * ethdb: handle parsing errors * ethdb: handle iostats syntax error * ethdb: r -> w
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/chaincmd.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 85d0c3aca..c9ab72b6d 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -225,6 +225,13 @@ func importChain(ctx *cli.Context) error {
utils.Fatalf("Failed to read database stats: %v", err)
}
fmt.Println(stats)
+
+ ioStats, err := db.LDB().GetProperty("leveldb.iostats")
+ if err != nil {
+ utils.Fatalf("Failed to read database iostats: %v", err)
+ }
+ fmt.Println(ioStats)
+
fmt.Printf("Trie cache misses: %d\n", trie.CacheMisses())
fmt.Printf("Trie cache unloads: %d\n\n", trie.CacheUnloads())
@@ -255,6 +262,12 @@ func importChain(ctx *cli.Context) error {
}
fmt.Println(stats)
+ ioStats, err = db.LDB().GetProperty("leveldb.iostats")
+ if err != nil {
+ utils.Fatalf("Failed to read database iostats: %v", err)
+ }
+ fmt.Println(ioStats)
+
return nil
}