cmd/geth, trie: report on trie cache unloads, also add debug log

This commit is contained in:
Péter Szilágyi
2016-10-19 17:17:42 +03:00
parent 5d9bb0a050
commit 88a593d559
3 changed files with 11 additions and 1 deletions

View File

@ -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
}