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(starknet_monitoring_endpoint): add metric test utils #2884

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

Itay-Tsabary-Starkware
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware commented Dec 22, 2024

Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.519 ms 34.562 ms 34.611 ms]
change: [-4.1576% -2.5220% -1.0849%] (p = 0.00 < 0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) high mild
1 (1.00%) high severe

Copy link
Collaborator

@nadin-Starkware nadin-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 2 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/starknet_monitoring_endpoint/src/test_utils.rs line 87 at r1 (raw file):

        // Parse the response body.
        let body_bytes = hyper::body::to_bytes(response.into_body()).await.unwrap();

Import hyper::body::to_bytes

Code quote:

hyper::body::to_bytes

crates/starknet_monitoring_endpoint/src/test_utils.rs line 88 at r1 (raw file):

        // Parse the response body.
        let body_bytes = hyper::body::to_bytes(response.into_body()).await.unwrap();
        let body_string = String::from_utf8(body_bytes.to_vec()).unwrap();

Same

Code quote:

String::from_utf8

crates/starknet_monitoring_endpoint/src/test_utils.rs line 96 at r1 (raw file):

}

pub(crate) fn build_request(ip: &IpAddr, port: u16, method: &str) -> Request<Body> {

Please add TODO to pass the socket as an arg instead.

Code quote:

ip: &IpAddr, port: u16

Copy link
Contributor Author

@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: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @nadin-Starkware)


crates/starknet_monitoring_endpoint/src/test_utils.rs line 87 at r1 (raw file):

Previously, nadin-Starkware (Nadin Jbara) wrote…

Import hyper::body::to_bytes

Done.


crates/starknet_monitoring_endpoint/src/test_utils.rs line 88 at r1 (raw file):

Previously, nadin-Starkware (Nadin Jbara) wrote…

Same

Doesn't apply here, it's a class function of A (like calling A::new()), it's not a function from a module String.


crates/starknet_monitoring_endpoint/src/test_utils.rs line 96 at r1 (raw file):

Previously, nadin-Starkware (Nadin Jbara) wrote…

Please add TODO to pass the socket as an arg instead.

Done.

Copy link
Collaborator

@nadin-Starkware nadin-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 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

Copy link
Contributor Author

@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.

Reviewed 2 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

Copy link
Collaborator

@nadin-Starkware nadin-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 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

Copy link
Contributor Author

@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.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware changed the base branch from spr/main/e1f0b265 to main December 24, 2024 12:41
@Itay-Tsabary-Starkware Itay-Tsabary-Starkware merged commit 047cb48 into main Dec 24, 2024
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2024
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