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

Closed
wants to merge 1 commit into 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

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.838 ms 34.881 ms 34.925 ms]
change: [-5.0484% -3.5723% -2.3068%] (p = 0.00 < 0.05)
Performance has improved.

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.428 ms 34.494 ms 34.574 ms]
change: [-5.0558% -3.5469% -2.2005%] (p = 0.00 < 0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
2 (2.00%) high mild
2 (2.00%) high severe

full_committer_flow performance improved 😺
full_committer_flow time: [30.106 ms 30.143 ms 30.182 ms]
change: [-1.8519% -1.6241% -1.4114%] (p = 0.00 < 0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.158 ms 34.183 ms 34.211 ms]
change: [-5.1965% -3.7358% -2.4751%] (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

full_committer_flow performance improved 😺
full_committer_flow time: [30.073 ms 30.107 ms 30.143 ms]
change: [-1.6233% -1.3207% -1.0881%] (p = 0.00 < 0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

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 7 files reviewed, 1 unresolved discussion


crates/starknet_sequencer_infra/src/metrics.rs line 8 at r2 (raw file):

/// A struct to contain all metrics for the a server/component.
pub struct InfraMetrics {
    mock: bool,

Please remove the draft parts from this pr, e.g., mock: bool

Code quote:

 mock: bool,

@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants