perf bench futex: Use NSEC_PER_USEC
Following kernel practices and better documentin Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-xncwqxegjp13g2nxih3lp9mx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <subcmd/parse-options.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/time64.h>
|
||||
#include <errno.h>
|
||||
#include "bench.h"
|
||||
#include "futex.h"
|
||||
@@ -81,7 +82,7 @@ static void print_summary(void)
|
||||
printf("Wokeup %d of %d threads in %.4f ms (+-%.2f%%)\n",
|
||||
wakeup_avg,
|
||||
nthreads,
|
||||
waketime_avg/1e3,
|
||||
waketime_avg / USEC_PER_MSEC,
|
||||
rel_stddev_stats(waketime_stddev, waketime_avg));
|
||||
}
|
||||
|
||||
@@ -182,7 +183,7 @@ int bench_futex_wake(int argc, const char **argv,
|
||||
|
||||
if (!silent) {
|
||||
printf("[Run %d]: Wokeup %d of %d threads in %.4f ms\n",
|
||||
j + 1, nwoken, nthreads, runtime.tv_usec/1e3);
|
||||
j + 1, nwoken, nthreads, runtime.tv_usec / (double)USEC_PER_MSEC);
|
||||
}
|
||||
|
||||
for (i = 0; i < nthreads; i++) {
|
||||
|
Reference in New Issue
Block a user