-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add performance tracing to validate_transaction #5671
Conversation
| let at = at.clone(); | ||
|
|
||
| self.pool.spawn_ok(futures_diagnose::diagnose("validate-transaction", async move { | ||
| let span = tracing::span!(tracing::Level::DEBUG, "validate_transaction::check_version"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goes into the direction what I proposed here: #5657 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good initiative here, definitely helps with readability/usability. I think actually readability in executive, although diminished by the addition of tracing, is not too bad, because the eye can filter the pattern of the macro and focus on the code contained within.
# Conflicts: # client/transaction-pool/Cargo.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no fan of the code bloat, but there seems to be not better way currently :(
Turns my half-baked, println-based validate transaction measuring branch into a proper tracing that may stay here for longer.
The code readability in
executiveis heavily impacted unfortunately, but I didn't find a good way to make it look nicer. Thespanandguardborrow relationship makes it super annoying to build a nicer API.Added a bunch of runtime tracing helpers though, to make it easier to instrument
pallets without anoying conditional compilation.