benchmark - slightly better stderr

This commit is contained in:
Artem Pavlenko 2018-01-10 10:04:10 +00:00
parent b193d03151
commit 5ab6db2607
2 changed files with 4 additions and 4 deletions

View file

@ -240,7 +240,7 @@ int run(T const& test_runner, std::string const& name)
big_number_fmt ips(5, total_iters / seconds<double>(elapsed_nonzero).count());
std::snprintf(msg, sizeof(msg),
"%-43s %3zu threads %*.0f%s iters %6.0f milliseconds %*.0f%s i/s\n",
"%-43s %3zu thread(s) %*.0f%s iters %6.0f milliseconds %*.0f%s i/s\n",
name.c_str(),
num_threads,
itersf.w, itersf.v, itersf.u,

View file

@ -10,7 +10,7 @@ function run {
local threads="$2"
local iters="$3"
shift 3
$runner --threads 0 --iterations $iters "$@"
$runner --threads 1 --iterations $iters "$@"
if test $threads -gt 0; then
$runner --threads $threads --iterations $((iters/threads)) "$@"
fi