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
This commit is contained in:
Mickey Rose 2016-02-27 22:19:08 +01:00
parent e836836bdc
commit 3fdc799e84
2 changed files with 10 additions and 4 deletions

View file

@ -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<std::string>("log-severity")) {
if (auto severity = params.get<std::string>("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";
}
}

View file

@ -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