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

@ -47,6 +47,13 @@ func CacheMisses() int64 {
return cacheMissCounter.Count()
}
// CacheUnloads retrieves a global counter measuring the number of cache unloads
// the trie did since process startup. This isn't useful for anything apart from
// trie debugging purposes.
func CacheUnloads() int64 {
return cacheUnloadCounter.Count()
}
func init() {
sha3.NewKeccak256().Sum(emptyState[:0])
}