diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-10-19 22:17:42 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-10-19 22:31:19 +0800 |
commit | 88a593d559d26a91b64178094728fd9ca7c25a2c (patch) | |
tree | 6ae827ef8a6b62c0fc9e14c8e72a44b47fba5c82 /trie/trie.go | |
parent | 5d9bb0a050df0e58ed1073ef92f45676380ac26e (diff) | |
download | dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.gz dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.bz2 dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.lz dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.xz dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.zst dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.zip |
cmd/geth, trie: report on trie cache unloads, also add debug log
Diffstat (limited to 'trie/trie.go')
-rw-r--r-- | trie/trie.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/trie/trie.go b/trie/trie.go index 2a7bc16e4..035a80e74 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -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]) } |