aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-19 22:35:58 +0800
committerGitHub <noreply@github.com>2016-10-19 22:35:58 +0800
commitf2ae2f7eef1e3e15b9e6f81e2b5895e2d20d12bc (patch)
tree6ae827ef8a6b62c0fc9e14c8e72a44b47fba5c82 /core
parent5d9bb0a050df0e58ed1073ef92f45676380ac26e (diff)
parent88a593d559d26a91b64178094728fd9ca7c25a2c (diff)
downloaddexon-f2ae2f7eef1e3e15b9e6f81e2b5895e2d20d12bc.tar.gz
dexon-f2ae2f7eef1e3e15b9e6f81e2b5895e2d20d12bc.tar.zst
dexon-f2ae2f7eef1e3e15b9e6f81e2b5895e2d20d12bc.zip
Merge pull request #3176 from karalabe/trie-stats-report
cmd/geth, trie: report on trie cache unloads, also add debug log
Diffstat (limited to 'core')
-rw-r--r--core/state/statedb.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 6a24d2865..ae106e03b 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -564,6 +564,8 @@ func (s *StateDB) Commit() (root common.Hash, err error) {
func (s *StateDB) CommitBatch() (root common.Hash, batch ethdb.Batch) {
batch = s.db.NewBatch()
root, _ = s.commit(batch)
+
+ glog.V(logger.Debug).Infof("Trie cache stats: %d misses, %d unloads", trie.CacheMisses(), trie.CacheUnloads())
return root, batch
}