This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add performance tracing to validate_transaction#5671
Merged
Conversation
bkchr
reviewed
Apr 16, 2020
| 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"); |
Member
There was a problem hiding this comment.
Goes into the direction what I proposed here: #5657 (comment)
Contributor
mattrutherford
left a comment
There was a problem hiding this comment.
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.
mattrutherford
approved these changes
Apr 16, 2020
# Conflicts: # client/transaction-pool/Cargo.toml
NikVolf
approved these changes
Apr 16, 2020
bkchr
approved these changes
Apr 17, 2020
Member
bkchr
left a comment
There was a problem hiding this comment.
I'm no fan of the code bloat, but there seems to be not better way currently :(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.