Skip to content
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

feat(trie): metrics #6943

Merged
merged 8 commits into from
Mar 4, 2024
Merged

feat(trie): metrics #6943

merged 8 commits into from
Mar 4, 2024

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Mar 3, 2024

Description

Instrument root calculators with general trie metrics.

@rkrasiuk rkrasiuk added A-observability Related to tracing, metrics, logs and other observability tools A-trie Related to Merkle Patricia Trie implementation labels Mar 3, 2024
@rkrasiuk rkrasiuk requested a review from gakonst as a code owner March 3, 2024 16:32

impl TrieRootMetrics {
pub(crate) fn new(ty: TrieType) -> Self {
Self::new_with_labels(&[("type", ty.as_str())])
Copy link
Collaborator

@shekhirin shekhirin Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, we should cache this initialization, see #6730.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6730 was impactful because metrics initialization was on a hot code path. not the case here, so i wouldn't worry too much

@rkrasiuk rkrasiuk requested a review from shekhirin March 4, 2024 13:04
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only nits

crates/trie/Cargo.toml Outdated Show resolved Hide resolved
crates/trie/src/trie.rs Show resolved Hide resolved
@rkrasiuk rkrasiuk enabled auto-merge March 4, 2024 14:22
@rkrasiuk rkrasiuk added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit 53e67c2 Mar 4, 2024
30 checks passed
@rkrasiuk rkrasiuk deleted the rkrasiuk/trie-metrics branch March 4, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability Related to tracing, metrics, logs and other observability tools A-trie Related to Merkle Patricia Trie implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants