nearcore icon indicating copy to clipboard operation
nearcore copied to clipboard

Add `tracing::debug_span` calls throughout runtime

Open matklad opened this issue 3 years ago • 2 comments

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

matklad avatar Nov 10 '21 16:11 matklad

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.

stale[bot] avatar Mar 13 '22 17:03 stale[bot]

Related to #6731

nikurt avatar May 02 '22 14:05 nikurt

Nikolay Kurtov commented:

Experimenting with the tracing data shows that all important pieces are annotated with tracing::debug_span or tracing::trace_span.

exalate-issue-sync[bot] avatar Oct 03 '22 14:10 exalate-issue-sync[bot]