aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/benchmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/benchmark.c')
-rw-r--r--hardinfo2/benchmark.c22
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>