Skip to content

Commit 59129c2

Browse files
authored
Multii instance support. (#342)
1 parent 9926f4b commit 59129c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

benchmarking/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ macro_rules! impl_benchmark_test {
10801080
macro_rules! add_benchmark {
10811081
( $params:ident, $batches:ident, $name:ident, $( $location:tt )* ) => (
10821082
let name_string = stringify!($name).as_bytes();
1083+
let instance_string = stringify!( $( $location )* ).as_bytes();
10831084
let (config, whitelist) = $params;
10841085
let $crate::BenchmarkConfig {
10851086
pallet,
@@ -1095,6 +1096,7 @@ macro_rules! add_benchmark {
10951096
if &pallet[..] == &b"*"[..] || &benchmark[..] == &b"*"[..] {
10961097
for benchmark in $( $location )*::Benchmark::benchmarks(*extra).into_iter() {
10971098
$batches.push($crate::BenchmarkBatch {
1099+
instance: instance_string.to_vec(),
10981100
results: $( $location )*::Benchmark::run_benchmark(
10991101
benchmark,
11001102
&lowest_range_values[..],
@@ -1110,6 +1112,7 @@ macro_rules! add_benchmark {
11101112
}
11111113
} else {
11121114
$batches.push($crate::BenchmarkBatch {
1115+
instance: instance_string.to_vec(),
11131116
results: $( $location )*::Benchmark::run_benchmark(
11141117
&benchmark[..],
11151118
&lowest_range_values[..],

0 commit comments

Comments
 (0)