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(starknet_sequencer_infra): adding metrics counters to local servers #4068

Open
wants to merge 1 commit into
base: spr/main/34419b89
Choose a base branch
from

Conversation

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.718 ms 34.782 ms 34.861 ms]
change: [-4.0584% -2.4582% -1.0708%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion


crates/starknet_sequencer_infra/src/metrics.rs line 20 at r1 (raw file):

    if counter.is_none() {
        warn!("Counter {} not found", name);
    }

Please use expect("Metric {} should be available") instead of checking is_none().
(use the proper expect and formatting syntax 🙏 )

Code quote:

    let counter = METRIC_COUNTERS_MAP.get(name);
    if counter.is_none() {
        warn!("Counter {} not found", name);
    }

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on @lev-starkware)


crates/starknet_sequencer_infra/src/metrics.rs line 20 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Please use expect("Metric {} should be available") instead of checking is_none().
(use the proper expect and formatting syntax 🙏 )

This will also require removing the Option from the return type ^

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on @lev-starkware)


crates/starknet_sequencer_infra/src/metrics.rs line 20 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

This will also require removing the Option from the return type ^

OK I went over the code and I understand why you made it like this: you wanted the metrics map not to include mock metrics (which is great, the production code should not include mocks like that). But, this results in needing to hold the mock field, which contradicts the above.

I'd like a solution that has neither: no mock metrics defined in the global level, and no mock fields or getters in the production code. Let's discuss this in person.

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.671 ms 34.696 ms 34.726 ms]
change: [-5.8641% -4.3199% -2.9652%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) low mild
1 (1.00%) high mild
5 (5.00%) high severe

full_committer_flow performance improved 😺
full_committer_flow time: [30.618 ms 30.662 ms 30.712 ms]
change: [-2.6939% -2.1042% -1.6278%] (p = 0.00 < 0.05)
Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe

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.

3 participants