nimbus-eth1/nimbus/db/aristo/aristo_init
Jacek Sieka 35cc78c86d
add metrics for rdb lru cache (#2586)
This is a first step towards measuring the efficiency of the LRU caches
over time - metrics can be collected during import or when running
regulary.

Since `nim-metrics` carries some overhead for its default way of
reporting metrics, this PR implements a custom collector over atomic
counters, given that this is one of the hottest spots in the block
processing pipeline.

Using a compile-time flag, the same metrics can be printed on exit which
is useful when comparing different strategies for caching - here's a
recent run over blocks 16000001-1616384 - this is a good candidate to
expose in a better way in the future, maybe:

```
   state    vtype       miss        hit      total hitrate
 Account     Leaf    4909417    4466215    9375632  47.64%
 Account   Branch   20742574   72015123   92757697  77.64%
   World     Leaf     940483    1140946    2081429  54.82%
   World   Branch    8224151  131496580  139720731  94.11%
     all      all   34816625  209118864  243935489  85.73%
```
2024-09-02 17:34:10 +02:00
..
rocks_db add metrics for rdb lru cache (#2586) 2024-09-02 17:34:10 +02:00
init_common.nim Triggered write event for kvt (#2351) 2024-06-13 18:15:11 +00:00
memory_db.nim avoid some trivial memory allocations (#2587) 2024-09-02 16:03:10 +02:00
memory_only.nim Added portal proof nodes generation functionality (#2539) 2024-08-06 11:29:26 +00:00
persistent.nim Aristo and kvt balancer management update (#2504) 2024-07-18 21:32:32 +00:00
rocks_db.nim avoid some trivial memory allocations (#2587) 2024-09-02 16:03:10 +02:00