Skip to content
Snippets Groups Projects
Unverified Commit c86b6336 authored by Oliver Tale-Yazdi's avatar Oliver Tale-Yazdi Committed by GitHub
Browse files

Sort the benchmarks before listing them (#2026)


Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
parent b7a8532d
Branches
No related merge requests found
Pipeline #404989 passed with stages
in 55 minutes and 47 seconds
......@@ -748,13 +748,17 @@ impl CliConfiguration for PalletCmd {
/// List the benchmarks available in the runtime, in a CSV friendly format.
fn list_benchmark(
benchmarks_to_run: Vec<(
mut benchmarks_to_run: Vec<(
Vec<u8>,
Vec<u8>,
Vec<(BenchmarkParameter, u32, u32)>,
Vec<(String, String)>,
)>,
) {
// Sort and de-dub by pallet and function name.
benchmarks_to_run.sort_by(|(pa, sa, _, _), (pb, sb, _, _)| (pa, sa).cmp(&(pb, sb)));
benchmarks_to_run.dedup_by(|(pa, sa, _, _), (pb, sb, _, _)| (pa, sa) == (pb, sb));
println!("pallet, benchmark");
for (pallet, extrinsic, _, _) in benchmarks_to_run {
println!("{}, {}", String::from_utf8_lossy(&pallet), String::from_utf8_lossy(&extrinsic));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment