aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-08-20 10:50:04 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2017-08-21 05:47:00 -0700
commit573e8cd1ecb6a74751931a93f75d71102952afc0 (patch)
tree3da5abdf7c81212339bd0902cdf56c8094c281b5 /modules/benchmark.c
parent72cd4f205211b7fffc6c5cd8926921d4eef6ab6a (diff)
Add ability to specify selected row, use it in benchmark results
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/benchmark.c')
-rw-r--r--modules/benchmark.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/benchmark.c b/modules/benchmark.c
index 2159fffb..76c36ecf 100644
--- a/modules/benchmark.c
+++ b/modules/benchmark.c
@@ -204,13 +204,14 @@ gchar *hi_get_field(gchar * field)
return g_strdup(field);
}
-static void br_mi_add(char **results_list, bench_result *b) {
+static void br_mi_add(char **results_list, bench_result *b, gboolean select) {
gchar *ckey, *rkey;
ckey = hardinfo_clean_label(b->machine->cpu_name, 0);
rkey = strdup(b->machine->mid);
- *results_list = h_strdup_cprintf("$%s$%s=%.2f|%s\n", *results_list, rkey, ckey,
+ *results_list = h_strdup_cprintf("$%s%s$%s=%.2f|%s\n", *results_list,
+ select ? "*" : "", rkey, ckey,
b->result, b->machine->cpu_config);
moreinfo_add_with_prefix("BENCH", rkey, bench_result_more_info(b) );
@@ -237,7 +238,7 @@ static gchar *__benchmark_include_results(gdouble result,
g_free(temp); temp = NULL;
b = bench_result_this_machine(benchmark, result, n_threads);
- br_mi_add(&results, b);
+ br_mi_add(&results, b, 1);
temp = bench_result_benchmarkconf_line(b);
printf("[%s]\n%s", benchmark, temp);
@@ -264,7 +265,7 @@ static gchar *__benchmark_include_results(gdouble result,
values = g_key_file_get_string_list(conf, benchmark, machines[i], NULL, NULL);
sbr = bench_result_benchmarkconf(benchmark, machines[i], values);
- br_mi_add(&results, sbr);
+ br_mi_add(&results, sbr, 0);
bench_result_free(sbr);
g_strfreev(values);