-
Notifications
You must be signed in to change notification settings - Fork 706
fix(state-parts): Instrument creation of state parts #9148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… the number of nodes at various stages and durations of various stages
core/store/src/metrics.rs
Outdated
@@ -236,6 +237,91 @@ pub static COLD_COPY_DURATION: Lazy<Histogram> = Lazy::new(|| { | |||
.unwrap() | |||
}); | |||
|
|||
pub(crate) static GET_STATE_PART_WITH_FS_ELAPSED: Lazy<Histogram> = Lazy::new(|| { |
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.
Two comments:
- does histogram allow to track the sum of all captured times? I think it is more useful for identifying bottlenecks.
- we need a label
shard_id
for all these metrics
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.
Yes, histograms export:
- Count per bucket
- Sum of all values
- Count of all values
Added shard_id
to all metrics.
* stabilize finite-wasm and near-vm * fix tests that were not prepared by nightly integration
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.
Approving to unblock, but have one more piece of feedback.
core/store/src/trie/state_parts.rs
Outdated
let trie_values = if self.is_flat_storage_head_at(prev_hash) { | ||
self.get_trie_nodes_for_part_with_flat_storage(part_id)? | ||
self.get_trie_nodes_for_part_with_flat_storage(part_id, shard_id)? |
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.
Sanity check - is there any potential for a race condition here?
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.
Maaaaybe, but #9090 will make it impossible. This will use static DB snapshots.
As the test requires some dependencies like `base58` and `retrying` which are not available by default.
Mainly adding some type annotations across the code to make pyright type checker happy. To use the type checker, you'll need to install it [1] and run "pyright file.py" to show the warnings. [1] https://github.com/microsoft/pyright
I pushed a commit to the branch of the fork, but I don't see the diff updated in this
8000
PR 🤔 |
Metrics for creation of state parts: * Durations of various stages * Numbers of nodes created during various stages
Metrics for creation of state parts: