Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
5d9bb0a0
Commit
5d9bb0a0
authored
Oct 19, 2016
by
Felix Lange
Committed by
GitHub
Oct 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trie: add metric to track cache unloading (#3175)
parent
8048f4d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
hasher.go
trie/hasher.go
+1
-0
trie.go
trie/trie.go
+4
-1
No files found.
trie/hasher.go
View file @
5d9bb0a0
...
...
@@ -60,6 +60,7 @@ func (h *hasher) hash(n node, db DatabaseWriter, force bool) (node, node, error)
if
n
.
canUnload
(
h
.
cachegen
,
h
.
cachelimit
)
{
// Unload the node from cache. All of its subnodes will have a lower or equal
// cache generation number.
cacheUnloadCounter
.
Inc
(
1
)
return
hash
,
hash
,
nil
}
if
!
dirty
{
...
...
trie/trie.go
View file @
5d9bb0a0
...
...
@@ -35,7 +35,10 @@ var (
emptyState
common
.
Hash
)
var
cacheMissCounter
=
metrics
.
NewRegisteredCounter
(
"trie/cachemiss"
,
nil
)
var
(
cacheMissCounter
=
metrics
.
NewRegisteredCounter
(
"trie/cachemiss"
,
nil
)
cacheUnloadCounter
=
metrics
.
NewRegisteredCounter
(
"trie/cacheunload"
,
nil
)
)
// CacheMisses retrieves a global counter measuring the number of cache misses
// the trie did since process startup. This isn't useful for anything apart from
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment