cerc-io / go-ethereum

Read-only mirror of https://git.vdb.to/cerc-io/go-ethereum (Statediffing-fork of the official Go implementation of the Ethereum protocol)
https://git.vdb.to/cerc-io/go-ethereum
GNU Lesser General Public License v3.0
13 stars 4 forks source link

Add timers/counters for LevelDB Get, Put, Has, and Delete. #332

Closed telackey closed 1 year ago

telackey commented 1 year ago

Add timers/counters for LevelDB Get, Put, Has, and Delete:

❯ wget -O - -q http://localhost:6060/debug/metrics/prometheus  | grep 'chaindata_db_' | grep -v '#'
eth_db_chaindata_db_delete_time_count 2
eth_db_chaindata_db_delete_time {quantile="0.5"} 16402.5
eth_db_chaindata_db_delete_time {quantile="0.75"} 27420
eth_db_chaindata_db_delete_time {quantile="0.95"} 27420
eth_db_chaindata_db_delete_time {quantile="0.99"} 27420
eth_db_chaindata_db_delete_time {quantile="0.999"} 27420
eth_db_chaindata_db_delete_time {quantile="0.9999"} 27420
eth_db_chaindata_db_delete_time_total 32805
eth_db_chaindata_db_get_time_count 15795
eth_db_chaindata_db_get_time {quantile="0.5"} 8836
eth_db_chaindata_db_get_time {quantile="0.75"} 21940.25
eth_db_chaindata_db_get_time {quantile="0.95"} 60560.64999999995
eth_db_chaindata_db_get_time {quantile="0.99"} 151965.09
eth_db_chaindata_db_get_time {quantile="0.999"} 1.3177919370000018e+06
eth_db_chaindata_db_get_time {quantile="0.9999"} 1.332128e+06
eth_db_chaindata_db_get_time_total 315101202
eth_db_chaindata_db_has_time_count 3
eth_db_chaindata_db_has_time {quantile="0.5"} 43719
eth_db_chaindata_db_has_time {quantile="0.75"} 63825
eth_db_chaindata_db_has_time {quantile="0.95"} 63825
eth_db_chaindata_db_has_time {quantile="0.99"} 63825
eth_db_chaindata_db_has_time {quantile="0.999"} 63825
eth_db_chaindata_db_has_time {quantile="0.9999"} 63825
eth_db_chaindata_db_has_time_total 109919
eth_db_chaindata_db_put_time_count 731
eth_db_chaindata_db_put_time {quantile="0.5"} 44147
eth_db_chaindata_db_put_time {quantile="0.75"} 74190
eth_db_chaindata_db_put_time {quantile="0.95"} 169453.19999999998
eth_db_chaindata_db_put_time {quantile="0.99"} 935974.279999988
eth_db_chaindata_db_put_time {quantile="0.999"} 2.1057723e+07
eth_db_chaindata_db_put_time {quantile="0.9999"} 2.1057723e+07
eth_db_chaindata_db_put_time_total 79389515