diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-30 00:28:07 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-30 00:28:07 +0000 |
commit | c123c31f979018eaa10d71131a8e9a915e1d7eb4 (patch) | |
tree | 56b5486685efa1c9c3f888aa35f7575a5859fc36 /hardinfo2/benchmark.c | |
parent | b803a43e033df3d040e1c6d67c57dba55812615c (diff) |
Show some results in bytes/second. Allow results to be sorted in reverse order.
Diffstat (limited to 'hardinfo2/benchmark.c')
-rw-r--r-- | hardinfo2/benchmark.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index 5cc23cdd..ed62ba19 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -40,7 +40,8 @@ static ModuleEntry hi_entries[] = { }; static gchar * -benchmark_include_results(gchar *results, const gchar *benchmark) +__benchmark_include_results(gchar *results, const gchar *benchmark, + ShellOrderType order_type) { GKeyFile *conf; gchar **machines, *bconf_path; @@ -61,9 +62,22 @@ benchmark_include_results(gchar *results, const gchar *benchmark) g_key_file_free(conf); g_free(bconf_path); - return g_strconcat("[$ShellParam$]\n" - "Zebra=1\n" - "ViewType=3\n", results, NULL); + return g_strdup_printf("[$ShellParam$]\n" + "Zebra=1\n" + "OrderType=%d\n" + "ViewType=3\n%s", order_type, results); +} + +static gchar * +benchmark_include_results_reverse(gchar *results, const gchar *benchmark) +{ + return __benchmark_include_results(results, benchmark, SHELL_ORDER_DESCENDING); +} + +static gchar * +benchmark_include_results(gchar *results, const gchar *benchmark) +{ + return __benchmark_include_results(results, benchmark, SHELL_ORDER_ASCENDING); } #include <arch/common/fib.h> |