aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark/bench_results.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-08-10 23:11:21 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-08-14 20:02:42 -0700
commitd17909c82b03ad0427a285c66766421751546c42 (patch)
tree485588a0822984d437fcd22ed9f23f441760ca72 /modules/benchmark/bench_results.c
parent30508a10bf269e5ca06226fb50c86f5249cc746a (diff)
Benchmark: fixes, user_note, verifiable test data
* fix zlib display order * fix cryptohash MiB/s calculation * revision and params for other benchmarks * allow attaching user note to bench result with -u * don't inlcude the new result value bits if they are empty/invalid in bench_value_to_str(). bench_value_from_str() doesn't need to be modified. * bench_results: clean old result cpu name for x86 * use problem_marker() from dmi_memory to mark old version bench results * benchmark: verifiable test data size and content - The test data benchmark.data is stored in a file that could be edited to change the size or content. /* to guarantee size */ gchar *get_test_data(gsize min_size); /* to checksum content */ char *md5_digest_str(const char *data, unsigned int len); Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/benchmark/bench_results.c')
-rw-r--r--modules/benchmark/bench_results.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/benchmark/bench_results.c b/modules/benchmark/bench_results.c
index 3609a5dd..171285d1 100644
--- a/modules/benchmark/bench_results.c
+++ b/modules/benchmark/bench_results.c
@@ -334,6 +334,15 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
/* old results only give threads */
b->machine->processors = -1;
b->machine->cores = -1;
+
+ /* clean the old result's CPU model name
+ * if it was probably an x86 */
+ if (strstr(b->machine->cpu_name, "Intel")
+ || strstr(b->machine->cpu_name, "AMD")
+ || strstr(b->machine->cpu_name, "VIA")
+ || strstr(b->machine->cpu_name, "Cyrix") ) {
+ nice_name_x86_cpuid_model_string(b->machine->cpu_name);
+ }
}
b->machine->cpu_config = cpu_config_retranslate(b->machine->cpu_config, 0, 1);
@@ -383,7 +392,8 @@ static char *bench_result_more_info_less(bench_result *b) {
/* elapsed */ "%s=%0.4f %s\n"
"%s=%s\n"
"%s=%s\n"
- /* legacy */ "%s=%s\n"
+ "%s=%s\n"
+ /* legacy */ "%s%s=%s\n"
"[%s]\n"
/* board */ "%s=%s\n"
/* cpu */ "%s=%s\n"
@@ -398,6 +408,8 @@ static char *bench_result_more_info_less(bench_result *b) {
_("Elapsed Time"), b->bvalue.elapsed_time, _("seconds"),
*bench_str ? _("Revision") : _("#Revision"), bench_str,
*b->bvalue.extra ? _("Extra Information") : _("#Extra"), b->bvalue.extra,
+ *b->bvalue.user_note ? _("User Note") : _("#User Note"), b->bvalue.user_note,
+ b->legacy ? problem_marker() : "",
b->legacy ? _("Note") : "#Note",
b->legacy ? _("This result is from an old version of HardInfo. Results might not be comparable to current version. Some details are missing.") : "",
_("Machine"),
@@ -426,7 +438,8 @@ static char *bench_result_more_info_complete(bench_result *b) {
/* result */ "%s=%0.2f\n"
/* elapsed */ "%s=%0.4f %s\n"
"%s=%s\n"
- /* legacy */ "%s=%s\n"
+ "%s=%s\n"
+ /* legacy */ "%s%s=%s\n"
"[%s]\n"
/* board */ "%s=%s\n"
/* cpu */ "%s=%s\n"
@@ -445,6 +458,8 @@ static char *bench_result_more_info_complete(bench_result *b) {
_("Result"), b->bvalue.result,
_("Elapsed Time"), b->bvalue.elapsed_time, _("seconds"),
*b->bvalue.extra ? _("Extra Information") : _("#Extra"), b->bvalue.extra,
+ *b->bvalue.user_note ? _("User Note") : _("#User Note"), b->bvalue.user_note,
+ b->legacy ? problem_marker() : "",
b->legacy ? _("Note") : "#Note",
b->legacy ? _("This result is from an old version of HardInfo. Results might not be comparable to current version. Some details are missing.") : "",
_("Machine"),