From 88a593d559d26a91b64178094728fd9ca7c25a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 19 Oct 2016 17:17:42 +0300 Subject: cmd/geth, trie: report on trie cache unloads, also add debug log --- trie/trie.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'trie') 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]) } -- cgit v1.2.3