mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 03:22:18 +00:00
add codeEvict list metric
This commit is contained in:
parent
a745f2391c
commit
f066f52b04
@ -88,6 +88,7 @@ type Coherent struct {
|
|||||||
hits, miss, timeout *metrics.Counter
|
hits, miss, timeout *metrics.Counter
|
||||||
keys, evict *metrics.Counter
|
keys, evict *metrics.Counter
|
||||||
codeHits, codeMiss, codeKeys *metrics.Counter
|
codeHits, codeMiss, codeKeys *metrics.Counter
|
||||||
|
codeEvictLen *metrics.Counter
|
||||||
latestStateView *CoherentRoot
|
latestStateView *CoherentRoot
|
||||||
roots map[ViewID]*CoherentRoot
|
roots map[ViewID]*CoherentRoot
|
||||||
stateEvict, codeEvict *ThreadSafeEvictionList
|
stateEvict, codeEvict *ThreadSafeEvictionList
|
||||||
@ -162,6 +163,7 @@ func New(cfg CoherentConfig) *Coherent {
|
|||||||
codeMiss: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_total{result="miss",name="%s"}`, cfg.MetricsLabel)),
|
codeMiss: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_total{result="miss",name="%s"}`, cfg.MetricsLabel)),
|
||||||
codeHits: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_total{result="hit",name="%s"}`, cfg.MetricsLabel)),
|
codeHits: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_total{result="hit",name="%s"}`, cfg.MetricsLabel)),
|
||||||
codeKeys: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_keys_total{name="%s"}`, cfg.MetricsLabel)),
|
codeKeys: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_keys_total{name="%s"}`, cfg.MetricsLabel)),
|
||||||
|
codeEvictLen: metrics.GetOrCreateCounter(fmt.Sprintf(`cache_code_list_total{name="%s"}`, cfg.MetricsLabel)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,6 +224,7 @@ func (c *Coherent) advanceRoot(viewID ViewID) (r *CoherentRoot) {
|
|||||||
c.keys.Set(uint64(c.latestStateView.cache.Len()))
|
c.keys.Set(uint64(c.latestStateView.cache.Len()))
|
||||||
c.codeKeys.Set(uint64(c.latestStateView.codeCache.Len()))
|
c.codeKeys.Set(uint64(c.latestStateView.codeCache.Len()))
|
||||||
c.evict.Set(uint64(c.stateEvict.Len()))
|
c.evict.Set(uint64(c.stateEvict.Len()))
|
||||||
|
c.codeEvictLen.Set(uint64(c.codeEvict.Len()))
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user