Skip to content

Commit

Permalink
Switch to per iteration measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
bantonsson committed Sep 13, 2024
1 parent 62692cc commit 6f7c6da
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
concentrator.add_span(span);
}
},
criterion::BatchSize::LargeInput,
criterion::BatchSize::PerIteration,
);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn normalize_fnmut_string<F>(
black_box(function(black_box(string)));
});
},
BatchSize::LargeInput,
BatchSize::PerIteration,
)
},
);
Expand Down Expand Up @@ -134,7 +134,7 @@ fn normalize_span_bench(c: &mut Criterion) {
b.iter_batched_ref(
|| case.to_owned(),
|t| black_box(normalize_trace(black_box(t))),
BatchSize::LargeInput,
BatchSize::PerIteration,
)
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn bench_is_card_number(c: &mut Criterion, function_name: &str, validate_luhn: b
black_box(is_card_number(black_box(i), black_box(validate_luhn)));
})
},
BatchSize::SmallInput,
BatchSize::PerIteration,
)
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ SET k v
res.push(black_box(redis::obfuscate_redis_string(c)));
}
},
criterion::BatchSize::LargeInput,
criterion::BatchSize::PerIteration,
)
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn criterion_benchmark(c: &mut Criterion) {
b.iter_batched_ref(
|| trace.to_owned(),
|t| replacer::replace_trace_tags(black_box(t), black_box(rules)),
criterion::BatchSize::LargeInput,
criterion::BatchSize::PerIteration,
)
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn sql_obfuscation(c: &mut Criterion) {
res.push(black_box(obfuscate_sql_string(input)));
}
},
criterion::BatchSize::LargeInput,
criterion::BatchSize::PerIteration,
)
});
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/trace-utils-benches/benches/deserialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn deserialize_msgpack_to_internal(c: &mut Criterion) {
// Return the result to avoid measuring the deallocation time
result
},
criterion::BatchSize::LargeInput,
criterion::BatchSize::PerIteration,
);
},
);
Expand Down

0 comments on commit 6f7c6da

Please sign in to comment.