Profiler: enable prometheus backend in Store and Block_store modules
What
Why
How
Manually testing the MR
For instance:
TEZOS_PPX_PROFILER=profiling PROFILING_BACKEND="prometheus" PROFILING="debug" dune exec octez-node -- run --data-dir /home/ju/tezos/ghostnet --rpc-addr 127.0.0.1
Then browse http://127.0.0.1:8732/metrics and read
#HELP profiling_store_time Total time passed in a function and number of times it has been called
#TYPE profiling_store_time summary
profiling_store_time_sum{id="compute live blocks with alternative branch"} 0.084173
profiling_store_time_count{id="compute live blocks with alternative branch"} 1.000000
profiling_store_time_sum{id="compute live blocks with new head"} 0.002690
profiling_store_time_count{id="compute live blocks with new head"} 11.000000
profiling_store_time_sum{id="compute_live_blocks"} 0.000026
profiling_store_time_count{id="compute_live_blocks"} 12.000000
profiling_store_time_sum{id="finalize_set_head"} 0.011261
profiling_store_time_count{id="finalize_set_head"} 11.000000
profiling_store_time_sum{id="get_pred_block"} 0.000026
profiling_store_time_count{id="get_pred_block"} 11.000000
profiling_store_time_sum{id="locked compute live blocks with cache"} 0.086900
profiling_store_time_count{id="locked compute live blocks with cache"} 12.000000
profiling_store_time_sum{id="may_split_context"} 0.000011
profiling_store_time_count{id="may_split_context"} 11.000000
profiling_store_time_sum{id="set_head"} 0.011501
profiling_store_time_count{id="set_head"} 11.000000
profiling_store_time_sum{id="store_block"} 0.003463
profiling_store_time_count{id="store_block"} 11.000000
profiling_store_time_sum{id="updating live blocks"} 0.002751
profiling_store_time_count{id="updating live blocks"} 11.000000
profiling_store_time_sum{id="write_new_head"} 0.002618
profiling_store_time_count{id="write_new_head"} 11.000000
profiling_store_time_sum{id="write_new_target"} 0.000017
profiling_store_time_count{id="write_new_target"} 11.000000
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Julien SAGOT