diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-08-19 18:16:09 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-08-30 17:16:48 +0200 |
commit | f51cd027f9b98cb1f6d6e0db57a8e09ea15e015e (patch) | |
tree | 469083924e148de076a73c5e9f05fea6ad6903f2 /utils | |
parent | 7723e4fbe136c70cac64f9e8bf1a32d1943df751 (diff) | |
download | tracker-f51cd027f9b98cb1f6d6e0db57a8e09ea15e015e.tar.gz |
utils: Improve output of tracker-benchmark
In order to provide a clue about the benchmark that it's currently
busy with, do not wait for the benchmark to be complete to print its
title.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/benchmark/tracker-benchmark.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/benchmark/tracker-benchmark.c b/utils/benchmark/tracker-benchmark.c index 811c81b4b..d4471863c 100644 --- a/utils/benchmark/tracker-benchmark.c +++ b/utils/benchmark/tracker-benchmark.c @@ -452,6 +452,8 @@ run_benchmarks (TrackerSparqlConnection *conn) double elapsed = 0, min = G_MAXDOUBLE, max = -G_MAXDOUBLE, adjusted, avg; int elems = 0; + g_print ("%*s\t\t", max_len, benchmarks[i].desc); + benchmarks[i].func (conn, benchmarks[i].data_func, &elapsed, &elems, &min, &max); @@ -466,8 +468,7 @@ run_benchmarks (TrackerSparqlConnection *conn) } avg = elapsed / elems; - g_print ("%*s\t\t%.3f\t%.3f\t%.3f %s\t%.3f %s\t%3.3f %s\n", - max_len, benchmarks[i].desc, + g_print ("%.3f\t%.3f\t%.3f %s\t%.3f %s\t%3.3f %s\n", adjusted, elems / elapsed, transform_unit (min), unit_string (min), |