Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

improve run_benchmark #13935

Closed
wants to merge 1 commit into from
Closed

improve run_benchmark #13935

wants to merge 1 commit into from

Conversation

itmilos
Copy link
Contributor

@itmilos itmilos commented Apr 17, 2023

Added rayon to create parallel iterator, added map, and used sorted vector.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-each-crate
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2692779

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2692763

durations.push(duration.as_nanos());
}
let durations: Vec<u128> = (0..50)
.into_par_iter()
Copy link
Member

Choose a reason for hiding this comment

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

These benches run serially since they otherwise influence each other.

Also this code is pretty dated and should eventually be removed (https://github.com/paritytech/substrate/issues/12218).

@itmilos itmilos closed this Apr 17, 2023
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