From c5bb1fd01c8dd64d99659929e7cd24358d0eb4e2 Mon Sep 17 00:00:00 2001 From: Clint Frederickson Date: Thu, 18 Oct 2018 11:42:23 -0600 Subject: [PATCH] [#14] * filter out benchmark changes < 2% * return sample size to 20 --- .travis_scripts/cmp-bench.sh | 3 ++- benches/api_benchmark.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis_scripts/cmp-bench.sh b/.travis_scripts/cmp-bench.sh index c00cbc0..f669d27 100755 --- a/.travis_scripts/cmp-bench.sh +++ b/.travis_scripts/cmp-bench.sh @@ -42,5 +42,6 @@ if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ]; then # Bench the current commit that was pushed git checkout -f "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" cargo bench -- --save-baseline current-benchmark - critcmp master-benchmark current-benchmark + # compare the before/after results; filter out anything less than 2% change + critcmp master-benchmark current-benchmark -t 2 fi diff --git a/benches/api_benchmark.rs b/benches/api_benchmark.rs index 8007e02..0aca47f 100644 --- a/benches/api_benchmark.rs +++ b/benches/api_benchmark.rs @@ -293,7 +293,7 @@ fn criterion_benchmark(c: &mut Criterion) { criterion_group! { name = benches; - config = Criterion::default().sample_size(5); //TODO temp change for faster testing, change back to 20 + config = Criterion::default().sample_size(20); targets = criterion_benchmark } criterion_main!(benches);