8000 fix(state-parts): Instrument creation of state parts by nikurt · Pull Request #9148 · near/nearcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 9 commits into from
Jun 7, 2023
Merged

fix(state-parts): Instrument creation of state parts #9148

merged 9 commits into from
Jun 7, 2023

Conversation

nikurt
Copy link
Contributor
@nikurt nikurt commented Jun 6, 2023

Metrics for creation of state parts:

  • Durations of various stages
  • Numbers of nodes created during various stages

… the number of nodes at various stages and durations of various stages
@nikurt nikurt requested a review from a team as a code owner June 6, 2023 12:12
@nikurt nikurt requested review from akhi3030 and Longarithm June 6, 2023 12:12
@@ -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(|| {
Copy link
Member

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

Copy link
Contributor Author
@nikurt nikurt Jun 6, 2023

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.

Ekleog-NEAR and others added 3 commits June 6, 2023 15:52
* stabilize finite-wasm and near-vm

* fix tests that were not prepared by nightly integration
@nikurt nikurt requested a review from Longarithm June 6, 2023 13:54
Copy link
Member
@Longarithm Longarithm left a 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.

Comment on lines 97 to 98
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)?
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Nikolay Kurtov and others added 5 commits June 7, 2023 19:35
…e dependency graph for near-jsonrpc-client (#9145)

Hopefully, it is the last PR related to #8888.

I just made near-o11y an optional dependency of near-chain-configs crate.
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
@nikurt
Copy link
Contributor Author
nikurt commented Jun 7, 2023

I pushed a commit to the branch of the fork, but I don't see the diff updated in this 8000 PR 🤔
https://github.com/nikurt/nearcore/commits/nikurt-state-parts-metrics

@near-bulldozer near-bulldozer bot merged commit f8c3548 into near:master Jun 7, 2023
nikurt added a commit that referenced this pull request Jun 9, 2023
Metrics for creation of state parts:
* Durations of various stages
* Numbers of nodes created during various stages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0