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

chore(infra): add run_until utility fn #2320

Closed
wants to merge 4 commits into from

Conversation

Itay-Tsabary-Starkware
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware commented Nov 28, 2024

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

github-actions bot commented Nov 28, 2024

Copy link

Benchmark movements:
full_committer_flow performance improved 😺
full_committer_flow time: [29.703 ms 29.744 ms 29.789 ms]
change: [-4.1874% -4.0066% -3.8218%] (p = 0.00 < 0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware changed the base branch from spr/main/2959cc90 to main November 28, 2024 08:59
@Itay-Tsabary-Starkware Itay-Tsabary-Starkware changed the base branch from main to spr/main/4d0abfb5 November 28, 2024 09:00
Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.712 ms 34.770 ms 34.837 ms]
change: [-4.6361% -3.1375% -1.8010%] (p = 0.00 < 0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
4 (4.00%) high mild
2 (2.00%) high severe

full_committer_flow performance improved 😺
full_committer_flow time: [30.326 ms 30.393 ms 30.463 ms]
change: [-3.6859% -3.3924% -3.0925%] (p = 0.00 < 0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 57.69231% with 33 lines in your changes missing coverage. Please review.

Please upload report for BASE (spr/main/4d0abfb5@8edd6d7). Learn more about missing BASE report.

Files with missing lines Patch % Lines
crates/infra_utils/src/run_until.rs 44.89% 21 Missing and 6 partials ⚠️
...rknet_sequencer_node/src/test_utils/compilation.rs 79.31% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             spr/main/4d0abfb5    #2320   +/-   ##
====================================================
  Coverage                     ?   77.40%           
====================================================
  Files                        ?      387           
  Lines                        ?    40685           
  Branches                     ?    40685           
====================================================
  Hits                         ?    31493           
  Misses                       ?     6862           
  Partials                     ?     2330           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@lev-starkware lev-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/infra_utils/src/run_until_test.rs line 20 at r1 (raw file):

    // Run the function with a short interval and a maximum of 5 attempts.
    let result = run_until(100, 5, mock_executable, condition, None).await;

Don't you want to test that tracing works?


crates/infra_utils/src/run_until.rs line 11 at r1 (raw file):

pub struct TraceConfig {
    pub level: LogLevel,
    pub message: String,

I think its more message_prefix than message.

Code quote:

message

crates/infra_utils/src/run_until.rs line 79 at r1 (raw file):

    if let Some(config) = &trace_config {
        let failure_message =
            format!("{}: Condition not met after {} attempts.", config.message, max_attempts);

I suggest something like: Condition not met after the maximum number of attempts - {}

Code quote:

Condition not met after {} attempts

Copy link

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Dec 29, 2024
@github-actions github-actions bot closed this Jan 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants