[go: up one dir, main page]

Profiler: Add operation worker profiling

What

Parent MR - !14787 (merged)

The implementation uses the profiling for the operation_worker part of the codebase.

Why

How

Manually testing the MR

SANDBOX TESTING

$ PROFILING=detailed DATA_DIR=~/.tezos-node-sandbox ./src/bin_node/octez-sandboxed-node.sh 1 --connections 0

$ eval `./src/bin_client/octez-init-sandboxed-client.sh 1`

$ octez-activate-alpha

$ PROFILING=detailed octez-baker-alpha run with local node ~/.tezos-node-sandbox

RESULTS

In op_worker_profiling.txt, you should get this format:

2024-09-23T13:30:50.177-00:00
level : 1, round : 0 ............................................................ 1           20.578ms  88% +7.048ms
  update operations pool ....................................................... 1            0.001ms 210% +0.003ms
  operations processing ........................................................ 1           18.806ms  89% +0.005ms
    add operations ............................................................. 2            0.003ms  97%
    update monitoring state .................................................... 2            0.002ms 158%
    stream stopped ............................................................. 1            0.001ms 839% +18.802ms
    reset monitoring state ..................................................... 1            0.001ms 315% +18.804ms
  monitor operations ........................................................... 1            1.764ms  84% +18.812ms
    monitor_operations RPC ..................................................... 1            1.189ms  71% +0.000ms
    shell_header RPC ........................................................... 1            0.572ms 108% +1.189ms
2024-09-23T13:30:50.198-00:00
level : 2, round : 6 ............................................................ 1         4818.895ms   1% +27.661ms
  update operations pool ....................................................... 1            0.002ms  53% +0.001ms
  operations processing ........................................................ 1         4816.668ms   1% +0.003ms
    add operations ............................................................. 10           0.012ms 202%
    update monitoring state .................................................... 10           0.005ms 120%
    stream stopped ............................................................. 1            0.001ms  84% +4s816.664ms
    reset monitoring state ..................................................... 1            0.001ms   0% +4s816.666ms
  monitor operations ........................................................... 1            2.223ms 130% +4s816.671ms
    monitor_operations RPC ..................................................... 1            1.191ms 170% +0.000ms
    shell_header RPC ........................................................... 1            1.026ms  82% +1.193ms
2024-09-23T13:30:55.017-00:00
level : 3, round : 0 ............................................................ 1          998.614ms   2% +4s846.596ms
  update operations pool ....................................................... 1            0.002ms  53% +0.001ms
  operations processing ........................................................ 1          996.366ms   2% +0.003ms
    add operations ............................................................. 10           0.016ms 159%
    update monitoring state .................................................... 10           0.006ms 146%
    stream stopped ............................................................. 1                         +996.363ms
    reset monitoring state ..................................................... 1            0.001ms 315% +996.364ms
  monitor operations ........................................................... 1            2.243ms 136% +996.369ms
    monitor_operations RPC ..................................................... 1            1.321ms 167% +0.000ms
    shell_header RPC ........................................................... 1            0.917ms  92% +1.322ms

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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading