nearcore
nearcore copied to clipboard
Add `tracing::debug_span` calls throughout runtime
In https://github.com/near/nearcore/pull/4038/ we added some basic tracing support for runtime. We should complete that work and add enough spans to all the critical code-paths to get a full picture of runtime performance.
For example, right now I am debugging an estimator issue, and I am looking at the following trace:
2.01ms Runtime::process_receipt 140.25µs run_vm 134.64µs run_wasmer2 1.24µs get_key 54.26µs deserialize_wasmer2 32.21µs run_method 27.67µs run_method/instantiate 500.00ns run_method/call 1.10µs run_method/drop_instance
It would be really great to understand where those extra 1.860ms of time went!
cc @nikurt
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Related to #6731
Nikolay Kurtov commented:
Experimenting with the tracing data shows that all important pieces are annotated with tracing::debug_span
or tracing::trace_span
.