nimbus-eth1/nimbus
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
..
beacon Rewire blockValue from Txpool to EngineAPI (#2554) 2024-08-09 06:05:18 +07:00
common Coredb and sync maintenance update (#2583) 2024-08-30 11:18:36 +00:00
core avoid exceptions, tx copy (#2569) 2024-08-19 09:42:07 +02:00
db add metrics for rdb lru cache (#2586) 2024-09-02 17:34:10 +02:00
evm create per-fork opcode dispatcher (#2579) 2024-08-28 10:20:36 +02:00
graphql Use simpler schema when writing transactions, receipts, and withdrawals (#2420) 2024-06-29 12:43:17 +07:00
rpc Cleanup unused exp_getProofsByBlockNumber endpoint (#2577) 2024-08-23 22:39:33 +08:00
stateless Cleanup stateless and block witness code. (#2295) 2024-06-08 15:05:00 +07:00
sync Coredb and sync maintenance update (#2583) 2024-08-30 11:18:36 +00:00
transaction avoid exceptions, tx copy (#2569) 2024-08-19 09:42:07 +02:00
utils avoid digest when loading era block (#2572) 2024-08-20 15:23:14 +02:00
common.nim implement better hardfork management 2022-12-02 13:51:42 +07:00
compile_info.nim Small updates and fixes for rlpx suite (#2571) 2024-08-19 14:00:10 +00:00
config.nim Coredb and sync maintenance update (#2583) 2024-08-30 11:18:36 +00:00
constants.nim Convert GasInt to uint64, bump nim-eth and nimbus-eth2 (#2461) 2024-07-07 06:52:11 +00:00
errors.nim Remove EVM indirect imports and unused EVM errors (#2370) 2024-06-17 09:56:39 +02:00
launcher.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
makefile Snap sync fix trie interpolation fringe condition (#1457) 2023-02-01 18:56:06 +00:00
nim.cfg import: read from era files (#2254) 2024-05-31 09:13:56 +02:00
nimbus.nim move db init to init (#2552) 2024-08-08 07:45:30 +02:00
nimbus_desc.nim rm full sync (#2324) 2024-06-08 07:41:44 +07:00
nimbus_import.nim import: reduce stack usage (#2575) 2024-08-22 10:06:45 +02:00
rpc.nim log http/jwt information on startup (#2553) 2024-08-08 10:03:30 +00:00
tracer.nim Don't write slot hashes on import (#2564) 2024-08-16 08:22:51 +02:00
transaction.nim avoid exceptions, tx copy (#2569) 2024-08-19 09:42:07 +02:00
version.nim Add startup banner (#2354) 2024-06-14 10:08:44 +02:00