Commit 83b88c86 authored by Paul E. McKenney's avatar Paul E. McKenney

refperf: Allow decimal nanoseconds

The CONFIG_PREEMPT=n rcu_read_lock()/rcu_read_unlock() pair's overhead,
even including loop overhead, is far less than one nanosecond.
Since logscale plots are not all that happy with zero values, provide
picoseconds as decimals.

Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 75dd8efe
......@@ -375,7 +375,7 @@ static int main_func(void *arg)
if (torture_must_stop())
goto end;
reader_tasks[exp].result_avg = process_durations(exp) / ((exp + 1) * loops);
reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
}
// Print the average of all experiments
......@@ -386,7 +386,7 @@ static int main_func(void *arg)
strcat(buf, "Threads\tTime(ns)\n");
for (exp = 0; exp < nreaders; exp++) {
sprintf(buf1, "%d\t%llu\n", exp + 1, reader_tasks[exp].result_avg);
sprintf(buf1, "%d\t%llu.%03d\n", exp + 1, reader_tasks[exp].result_avg / 1000, (int)(reader_tasks[exp].result_avg % 1000));
strcat(buf, buf1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment