From 3fdc799e84f8588221da442f0057d0c0ce933fcf Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sat, 27 Feb 2016 22:19:08 +0100 Subject: [PATCH] benchmarks: rename option --log-severity to --log for consistency - haven't noticed before that test/visual/run already had --log, and test/unit/run received that option recently - pass --log=none by default in benchmark/run script --- benchmark/bench_framework.hpp | 4 ++-- benchmark/run | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/benchmark/bench_framework.hpp b/benchmark/bench_framework.hpp index 34c63a8e7..585ba0bb8 100644 --- a/benchmark/bench_framework.hpp +++ b/benchmark/bench_framework.hpp @@ -92,7 +92,7 @@ inline int parse_args(int argc, char** argv, mapnik::parameters & params) inline void handle_common_args(mapnik::parameters const& params) { - if (auto severity = params.get("log-severity")) { + if (auto severity = params.get("log")) { if (*severity == "debug") mapnik::logger::set_severity(mapnik::logger::debug); else if (*severity == "warn") @@ -102,7 +102,7 @@ inline void handle_common_args(mapnik::parameters const& params) else if (*severity == "none") mapnik::logger::set_severity(mapnik::logger::none); else - std::clog << "ignoring option --log-severity='" << *severity + std::clog << "ignoring option --log='" << *severity << "' (allowed values are: debug, warn, error, none)\n"; } } diff --git a/benchmark/run b/benchmark/run index 00285b2ba..6850f8326 100755 --- a/benchmark/run +++ b/benchmark/run @@ -6,8 +6,14 @@ source ./localize.sh BASE=./benchmark/out function run { - ${BASE}/$1 --threads 0 --iterations $3; - ${BASE}/$1 --threads $2 --iterations $(expr $3 / $2); + local runner="$BASE/$1 --log=none" + local threads="$2" + local iters="$3" + shift 3 + $runner --threads 0 --iterations $iters "$@" + if test $threads -gt 0; then + $runner --threads $threads --iterations $((iters/threads)) "$@" + fi } run test_getline 30 10000000 #run test_array_allocation 20 100000