aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2020-05-03 11:05:30 -0700
committerLeandro Pereira <leandro@hardinfo.org>2020-05-03 14:08:12 -0700
commitc207bb93a0f1e71c9d7a4ca2bf9bbdefcb0de554 (patch)
tree9b4292a41884bbb4ba3f6d23e05217b9625c7910 /modules/benchmark
parent61b65dc913a9997134417d7ecc6d6d8a097c64a2 (diff)
Reindent bench_results.c
Diffstat (limited to 'modules/benchmark')
-rw-r--r--modules/benchmark/bench_results.c372
1 files changed, 202 insertions, 170 deletions
diff --git a/modules/benchmark/bench_results.c b/modules/benchmark/bench_results.c
index 429d0f1b..8637fd6b 100644
--- a/modules/benchmark/bench_results.c
+++ b/modules/benchmark/bench_results.c
@@ -24,7 +24,8 @@
uint64_t memory_devices_get_system_memory_MiB();
gchar *memory_devices_get_system_memory_types_str();
-/*/ Used for an unknown value. Having it in only one place cleans up the .po line references */
+/*/ Used for an unknown value. Having it in only one place cleans up the .po
+ * line references */
static const char *unk = N_("(Unknown)");
typedef struct {
@@ -39,8 +40,8 @@ typedef struct {
int cores;
int threads;
char *mid;
- int ptr_bits; /* 32, 64... BENCH_PTR_BITS; 0 for unspecified */
- int is_su_data; /* 1 = data collected as root */
+ int ptr_bits; /* 32, 64... BENCH_PTR_BITS; 0 for unspecified */
+ int is_su_data; /* 1 = data collected as root */
uint64_t memory_phys_MiB; /* from DMI/SPD/DTree/Table/Blocks, etc. */
char *ram_types;
int machine_data_version;
@@ -53,7 +54,8 @@ typedef struct {
int legacy; /* an old benchmark.conf result */
} bench_result;
-static char *cpu_config_retranslate(char *str, int force_en, int replacing) {
+static char *cpu_config_retranslate(char *str, int force_en, int replacing)
+{
char *new_str = NULL;
char *mhz = (force_en) ? "MHz" : _("MHz");
char *c = str, *tmp;
@@ -63,19 +65,19 @@ static char *cpu_config_retranslate(char *str, int force_en, int replacing) {
if (str != NULL) {
new_str = strdup("");
if (strchr(str, 'x')) {
- while (c != NULL && sscanf(c, "%dx %f", &t, &f) ) {
- tmp = g_strdup_printf("%s%s%dx %.2f %s",
- new_str, strlen(new_str) ? " + " : "",
- t, f, mhz );
+ while (c != NULL && sscanf(c, "%dx %f", &t, &f)) {
+ tmp = g_strdup_printf("%s%s%dx %.2f %s", new_str,
+ strlen(new_str) ? " + " : "", t, f, mhz);
free(new_str);
new_str = tmp;
- c = strchr(c+1, '+'); if (c) c++; /* move past the + */
+ c = strchr(c + 1, '+');
+ if (c)
+ c++; /* move past the + */
}
} else {
sscanf(c, "%f", &f);
- tmp = g_strdup_printf("%s%s%dx %.2f %s",
- new_str, strlen(new_str) ? " + " : "",
- 1, f, mhz );
+ tmp = g_strdup_printf("%s%s%dx %.2f %s", new_str,
+ strlen(new_str) ? " + " : "", 1, f, mhz);
free(new_str);
new_str = tmp;
}
@@ -88,15 +90,18 @@ static char *cpu_config_retranslate(char *str, int force_en, int replacing) {
}
/* "2x 1400.00 MHz + 2x 800.00 MHz" -> 4400.0 */
-static float cpu_config_val(char *str) {
+static float cpu_config_val(char *str)
+{
char *c = str;
int t;
float f, r = 0.0;
if (str != NULL) {
if (strchr(str, 'x')) {
- while (c != NULL && sscanf(c, "%dx %f", &t, &f) ) {
+ while (c != NULL && sscanf(c, "%dx %f", &t, &f)) {
r += f * t;
- c = strchr(c+1, '+'); if (c) c++; /* move past the + */
+ c = strchr(c + 1, '+');
+ if (c)
+ c++; /* move past the + */
}
} else {
sscanf(c, "%f", &r);
@@ -105,16 +110,20 @@ static float cpu_config_val(char *str) {
return r;
}
-static int cpu_config_cmp(char *str0, char *str1) {
+static int cpu_config_cmp(char *str0, char *str1)
+{
float r0, r1;
r0 = cpu_config_val(str0);
r1 = cpu_config_val(str1);
- if (r0 == r1) return 0;
- if (r0 < r1) return -1;
+ if (r0 == r1)
+ return 0;
+ if (r0 < r1)
+ return -1;
return 1;
}
-static int cpu_config_is_close(char *str0, char *str1) {
+static int cpu_config_is_close(char *str0, char *str1)
+{
float r0, r1, r1n;
r0 = cpu_config_val(str0);
r1 = cpu_config_val(str1);
@@ -124,30 +133,30 @@ static int cpu_config_is_close(char *str0, char *str1) {
return 0;
}
-static void gen_machine_id(bench_machine *m) {
+static void gen_machine_id(bench_machine *m)
+{
char *s;
if (m) {
if (m->mid != NULL)
free(m->mid);
- /* Don't try and translate unknown. The mid string needs to be made of all
- * untranslated elements.*/
+ /* Don't try and translate unknown. The mid string needs to be made of
+ * all untranslated elements.*/
m->mid = g_strdup_printf("%s;%s;%.2f",
- (m->board != NULL) ? m->board : "(Unknown)", m->cpu_name, cpu_config_val(m->cpu_config) );
+ (m->board != NULL) ? m->board : "(Unknown)",
+ m->cpu_name, cpu_config_val(m->cpu_config));
s = m->mid;
while (*s != 0) {
if (!isalnum(*s)) {
- if (*s != ';'
- && *s != '('
- && *s != '('
- && *s != ')')
- *s = '_';
+ if (*s != ';' && *s != '(' && *s != '(' && *s != ')')
+ *s = '_';
}
s++;
}
}
}
-bench_machine *bench_machine_new() {
+bench_machine *bench_machine_new()
+{
bench_machine *m = NULL;
m = malloc(sizeof(bench_machine));
if (m)
@@ -155,7 +164,8 @@ bench_machine *bench_machine_new() {
return m;
}
-bench_machine *bench_machine_this() {
+bench_machine *bench_machine_this()
+{
bench_machine *m = NULL;
char *tmp;
@@ -166,7 +176,8 @@ bench_machine *bench_machine_this() {
m->board = module_call_method("devices::getMotherboard");
m->cpu_name = module_call_method("devices::getProcessorName");
m->cpu_desc = module_call_method("devices::getProcessorDesc");
- m->cpu_config = module_call_method("devices::getProcessorFrequencyDesc");
+ m->cpu_config =
+ module_call_method("devices::getProcessorFrequencyDesc");
m->gpu_desc = module_call_method("devices::getGPUList");
m->ogl_renderer = module_call_method("computer::getOGLRenderer");
tmp = module_call_method("computer::getMemoryTotal");
@@ -181,7 +192,8 @@ bench_machine *bench_machine_this() {
return m;
}
-void bench_machine_free(bench_machine *s) {
+void bench_machine_free(bench_machine *s)
+{
if (s) {
free(s->board);
free(s->cpu_name);
@@ -192,14 +204,16 @@ void bench_machine_free(bench_machine *s) {
}
}
-void bench_result_free(bench_result *s) {
+void bench_result_free(bench_result *s)
+{
if (s) {
free(s->name);
bench_machine_free(s->machine);
}
}
-bench_result *bench_result_this_machine(const char *bench_name, bench_value r) {
+bench_result *bench_result_this_machine(const char *bench_name, bench_value r)
+{
bench_result *b = NULL;
b = malloc(sizeof(bench_result));
@@ -214,13 +228,14 @@ bench_result *bench_result_this_machine(const char *bench_name, bench_value r) {
}
/* -1 for none */
-static int nx_prefix(const char *str) {
+static int nx_prefix(const char *str)
+{
char *s, *x;
if (str != NULL) {
- s = (char*)str;
+ s = (char *)str;
x = strchr(str, 'x');
- if (x && x-s >= 1) {
- while(s != x) {
+ if (x && x - s >= 1) {
+ while (s != x) {
if (!isdigit(*s))
return -1;
s++;
@@ -233,11 +248,13 @@ static int nx_prefix(const char *str) {
}
/* old results didn't store the actual number of threads used */
-static int guess_threads_old_result(const char *bench_name, int threads_available) {
+static int guess_threads_old_result(const char *bench_name,
+ int threads_available)
+{
#define CHKBNAME(BN) (strcmp(bench_name, BN) == 0)
- if (CHKBNAME("CPU Fibonacci") )
+ if (CHKBNAME("CPU Fibonacci"))
return 1;
- if (CHKBNAME("FPU FFT") ) {
+ if (CHKBNAME("FPU FFT")) {
if (threads_available >= 4)
return 4;
else if (threads_available >= 2)
@@ -245,7 +262,7 @@ static int guess_threads_old_result(const char *bench_name, int threads_availabl
else
return 1;
}
- if (CHKBNAME("CPU N-Queens") ) {
+ if (CHKBNAME("CPU N-Queens")) {
if (threads_available >= 10)
return 10;
else if (threads_available >= 5)
@@ -258,7 +275,9 @@ static int guess_threads_old_result(const char *bench_name, int threads_availabl
return threads_available;
}
-bench_result *bench_result_benchmarkconf(const char *section, const char *key, char **values) {
+bench_result *
+bench_result_benchmarkconf(const char *section, const char *key, char **values)
+{
bench_result *b = NULL;
char *s0, *s1, *s2;
int nx = 0, vl = 0;
@@ -323,7 +342,8 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
b->machine->threads = nx;
}
- b->bvalue.threads_used = guess_threads_old_result(section, b->machine->threads);
+ b->bvalue.threads_used =
+ guess_threads_old_result(section, b->machine->threads);
/* If the clock rate in the id string is more than the
* config string, use that. Older hardinfo used current cpu freq
@@ -333,22 +353,23 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
s2 = strstr(s0, "Hz");
if (s2 && s2 > s0 + 2) {
m = 1; /* assume M */
- if (*(s2-1) == 'G')
+ if (*(s2 - 1) == 'G')
m = 1000;
s1 = s2 - 2;
while (s1 > s0) {
- if (!( isdigit(*s1) || *s1 == '.' || *s1 == ' '))
+ if (!(isdigit(*s1) || *s1 == '.' || *s1 == ' '))
break;
s1--;
}
if (s1 > s0) {
- n = atof(s1+1);
+ n = atof(s1 + 1);
n *= m;
- s1 = g_strdup_printf("%dx %.2f %s", b->bvalue.threads_used, n, _("MHz"));
- if ( cpu_config_cmp(b->machine->cpu_config, s1) == -1
- && !cpu_config_is_close(b->machine->cpu_config, s1) ) {
+ s1 = g_strdup_printf("%dx %.2f %s", b->bvalue.threads_used,
+ n, _("MHz"));
+ if (cpu_config_cmp(b->machine->cpu_config, s1) == -1 &&
+ !cpu_config_is_close(b->machine->cpu_config, s1)) {
free(b->machine->cpu_config);
b->machine->cpu_config = s1;
} else {
@@ -363,15 +384,16 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
/* 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") ) {
+ 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);
+ b->machine->cpu_config =
+ cpu_config_retranslate(b->machine->cpu_config, 0, 1);
if (b->machine->board != NULL && strlen(b->machine->board) == 0) {
free(b->machine->board);
b->machine->board = NULL;
@@ -385,43 +407,47 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
return b;
}
-char *bench_result_benchmarkconf_line(bench_result *b) {
+char *bench_result_benchmarkconf_line(bench_result *b)
+{
char *cpu_config = cpu_config_retranslate(b->machine->cpu_config, 1, 0);
char *bv = bench_value_to_str(b->bvalue);
-#define prep_str(s) (s ? (char*)auto_free(gg_key_file_parse_string_as_value(s, '|')) : "")
- char *ret = g_strdup_printf("%s=%s|%d|%s|%s|%s|%s|%"PRId64"|%d|%d|%d|%s|%s|%d|%d|%d|%"PRId64"|%s\n",
- b->machine->mid, bv, b->bvalue.threads_used,
- prep_str(b->machine->board),
- prep_str(b->machine->cpu_name),
- prep_str(b->machine->cpu_desc),
- prep_str(cpu_config),
- b->machine->memory_kiB,
- b->machine->processors, b->machine->cores, b->machine->threads,
- prep_str(b->machine->ogl_renderer),
- prep_str(b->machine->gpu_desc),
- b->machine->machine_data_version, // [12]
- b->machine->ptr_bits, // [13]
- b->machine->is_su_data, // [14]
- b->machine->memory_phys_MiB, // [15]
- b->machine->ram_types // [16]
- );
+#define prep_str(s) \
+ (s ? (char *)auto_free(gg_key_file_parse_string_as_value(s, '|')) : "")
+ char *ret = g_strdup_printf(
+ "%s=%s|%d|%s|%s|%s|%s|%" PRId64 "|%d|%d|%d|%s|%s|%d|%d|%d|%" PRId64
+ "|%s\n",
+ b->machine->mid, bv, b->bvalue.threads_used,
+ prep_str(b->machine->board), prep_str(b->machine->cpu_name),
+ prep_str(b->machine->cpu_desc), prep_str(cpu_config),
+ b->machine->memory_kiB, b->machine->processors, b->machine->cores,
+ b->machine->threads, prep_str(b->machine->ogl_renderer),
+ prep_str(b->machine->gpu_desc),
+ b->machine->machine_data_version, // [12]
+ b->machine->ptr_bits, // [13]
+ b->machine->is_su_data, // [14]
+ b->machine->memory_phys_MiB, // [15]
+ b->machine->ram_types // [16]
+ );
free(cpu_config);
free(bv);
return ret;
}
-static char *bench_result_more_info_less(bench_result *b) {
+static char *bench_result_more_info_less(bench_result *b)
+{
char *memory = NULL;
if (b->machine->memory_phys_MiB) {
- memory = g_strdup_printf("%"PRId64" %s %s",
- b->machine->memory_phys_MiB, _("MiB"), b->machine->ram_types);
+ memory =
+ g_strdup_printf("%" PRId64 " %s %s", b->machine->memory_phys_MiB,
+ _("MiB"), b->machine->ram_types);
} else {
memory =
(b->machine->memory_kiB > 0)
- ? g_strdup_printf("%"PRId64" %s %s", b->machine->memory_kiB, _("kiB"), problem_marker() )
- : g_strdup(_(unk));
+ ? g_strdup_printf("%" PRId64 " %s %s", b->machine->memory_kiB,
+ _("kiB"), problem_marker())
+ : g_strdup(_(unk));
}
char bench_str[256] = "";
if (b->bvalue.revision >= 0)
@@ -430,110 +456,116 @@ static char *bench_result_more_info_less(bench_result *b) {
if (b->machine->ptr_bits)
snprintf(bits, 23, _("%d-bit"), b->machine->ptr_bits);
- char *ret = g_strdup_printf("[%s]\n"
- /* threads */ "%s=%d\n"
- /* elapsed */ "%s=%0.4f %s\n"
- "%s=%s\n"
- "%s=%s\n"
- "%s=%s\n"
- /* legacy */ "%s%s=%s\n"
- "[%s]\n"
- /* board */ "%s=%s\n"
- /* cpu */ "%s=%s\n"
- /* cpudesc */ "%s=%s\n"
- /* cpucfg */ "%s=%s\n"
- /* threads */ "%s=%d\n"
- /* gpu desc */ "%s=%s\n"
- /* ogl rend */ "%s=%s\n"
- /* mem */ "%s=%s\n"
- /* bits */ "%s=%s\n",
- _("Benchmark Result"),
- _("Threads"), b->bvalue.threads_used,
- _("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"),
- _("Board"), (b->machine->board != NULL) ? b->machine->board : _(unk),
- _("CPU Name"), b->machine->cpu_name,
- _("CPU Description"), (b->machine->cpu_desc != NULL) ? b->machine->cpu_desc : _(unk),
- _("CPU Config"), b->machine->cpu_config,
- _("Threads Available"), b->machine->threads,
- _("GPU"), (b->machine->gpu_desc != NULL) ? b->machine->gpu_desc : _(unk),
- _("OpenGL Renderer"), (b->machine->ogl_renderer != NULL) ? b->machine->ogl_renderer : _(unk),
- _("Memory"), memory,
- b->machine->ptr_bits ? _("Pointer Size"): "#AddySize", bits
- );
+ char *ret = g_strdup_printf(
+ "[%s]\n"
+ /* threads */ "%s=%d\n"
+ /* elapsed */ "%s=%0.4f %s\n"
+ "%s=%s\n"
+ "%s=%s\n"
+ "%s=%s\n"
+ /* legacy */ "%s%s=%s\n"
+ "[%s]\n"
+ /* board */ "%s=%s\n"
+ /* cpu */ "%s=%s\n"
+ /* cpudesc */ "%s=%s\n"
+ /* cpucfg */ "%s=%s\n"
+ /* threads */ "%s=%d\n"
+ /* gpu desc */ "%s=%s\n"
+ /* ogl rend */ "%s=%s\n"
+ /* mem */ "%s=%s\n"
+ /* bits */ "%s=%s\n",
+ _("Benchmark Result"), _("Threads"), b->bvalue.threads_used,
+ _("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"), _("Board"),
+ (b->machine->board != NULL) ? b->machine->board : _(unk), _("CPU Name"),
+ b->machine->cpu_name, _("CPU Description"),
+ (b->machine->cpu_desc != NULL) ? b->machine->cpu_desc : _(unk),
+ _("CPU Config"), b->machine->cpu_config, _("Threads Available"),
+ b->machine->threads, _("GPU"),
+ (b->machine->gpu_desc != NULL) ? b->machine->gpu_desc : _(unk),
+ _("OpenGL Renderer"),
+ (b->machine->ogl_renderer != NULL) ? b->machine->ogl_renderer : _(unk),
+ _("Memory"), memory,
+ b->machine->ptr_bits ? _("Pointer Size") : "#AddySize", bits);
free(memory);
return ret;
}
-static char *bench_result_more_info_complete(bench_result *b) {
+static char *bench_result_more_info_complete(bench_result *b)
+{
char bench_str[256] = "";
strncpy(bench_str, b->name, 127);
if (b->bvalue.revision >= 0)
- snprintf(bench_str + strlen(bench_str), 127, " (r%d)", b->bvalue.revision);
+ snprintf(bench_str + strlen(bench_str), 127, " (r%d)",
+ b->bvalue.revision);
char bits[24] = "";
if (b->machine->ptr_bits)
snprintf(bits, 23, _("%d-bit"), b->machine->ptr_bits);
- return g_strdup_printf("[%s]\n"
- /* bench name */"%s=%s\n"
- /* threads */ "%s=%d\n"
- /* result */ "%s=%0.2f\n"
- /* elapsed */ "%s=%0.4f %s\n"
- "%s=%s\n"
- "%s=%s\n"
- /* legacy */ "%s%s=%s\n"
- "[%s]\n"
- /* board */ "%s=%s\n"
- /* cpu */ "%s=%s\n"
- /* cpudesc */ "%s=%s\n"
- /* cpucfg */ "%s=%s\n"
- /* threads */ "%s=%d\n"
- /* gpu desc */ "%s=%s\n"
- /* ogl rend */ "%s=%s\n"
- /* mem */ "%s=%"PRId64" %s\n"
- /* mem phys */ "%s=%"PRId64" %s %s\n"
- /* bits */ "%s=%s\n"
- "%s=%d\n"
- "%s=%d\n"
- "[%s]\n"
- /* mid */ "%s=%s\n"
- /* cfg_val */ "%s=%.2f\n",
- _("Benchmark Result"),
- _("Benchmark"), bench_str,
- _("Threads"), b->bvalue.threads_used,
- _("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"),
- _("Board"), (b->machine->board != NULL) ? b->machine->board : _(unk),
- _("CPU Name"), b->machine->cpu_name,
- _("CPU Description"), (b->machine->cpu_desc != NULL) ? b->machine->cpu_desc : _(unk),
- _("CPU Config"), b->machine->cpu_config,
- _("Threads Available"), b->machine->threads,
- _("GPU"), (b->machine->gpu_desc != NULL) ? b->machine->gpu_desc : _(unk),
- _("OpenGL Renderer"), (b->machine->ogl_renderer != NULL) ? b->machine->ogl_renderer : _(unk),
- _("Memory"), b->machine->memory_kiB, _("kiB"),
- _("Physical Memory"), b->machine->memory_phys_MiB, _("MiB"), b->machine->ram_types,
- b->machine->ptr_bits ? _("Pointer Size"): "#AddySize", bits,
- ".machine_data_version", b->machine->machine_data_version,
- ".is_su_data", b->machine->is_su_data,
- _("Handles"),
- _("mid"), b->machine->mid,
- _("cfg_val"), cpu_config_val(b->machine->cpu_config)
- );
+ return g_strdup_printf(
+ "[%s]\n"
+ /* bench name */ "%s=%s\n"
+ /* threads */ "%s=%d\n"
+ /* result */ "%s=%0.2f\n"
+ /* elapsed */ "%s=%0.4f %s\n"
+ "%s=%s\n"
+ "%s=%s\n"
+ /* legacy */ "%s%s=%s\n"
+ "[%s]\n"
+ /* board */ "%s=%s\n"
+ /* cpu */ "%s=%s\n"
+ /* cpudesc */ "%s=%s\n"
+ /* cpucfg */ "%s=%s\n"
+ /* threads */ "%s=%d\n"
+ /* gpu desc */ "%s=%s\n"
+ /* ogl rend */ "%s=%s\n"
+ /* mem */ "%s=%" PRId64 " %s\n"
+ /* mem phys */ "%s=%" PRId64 " %s %s\n"
+ /* bits */ "%s=%s\n"
+ "%s=%d\n"
+ "%s=%d\n"
+ "[%s]\n"
+ /* mid */ "%s=%s\n"
+ /* cfg_val */ "%s=%.2f\n",
+ _("Benchmark Result"), _("Benchmark"), bench_str, _("Threads"),
+ b->bvalue.threads_used, _("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"), _("Board"),
+ (b->machine->board != NULL) ? b->machine->board : _(unk), _("CPU Name"),
+ b->machine->cpu_name, _("CPU Description"),
+ (b->machine->cpu_desc != NULL) ? b->machine->cpu_desc : _(unk),
+ _("CPU Config"), b->machine->cpu_config, _("Threads Available"),
+ b->machine->threads, _("GPU"),
+ (b->machine->gpu_desc != NULL) ? b->machine->gpu_desc : _(unk),
+ _("OpenGL Renderer"),
+ (b->machine->ogl_renderer != NULL) ? b->machine->ogl_renderer : _(unk),
+ _("Memory"), b->machine->memory_kiB, _("kiB"), _("Physical Memory"),
+ b->machine->memory_phys_MiB, _("MiB"), b->machine->ram_types,
+ b->machine->ptr_bits ? _("Pointer Size") : "#AddySize", bits,
+ ".machine_data_version", b->machine->machine_data_version,
+ ".is_su_data", b->machine->is_su_data, _("Handles"), _("mid"),
+ b->machine->mid, _("cfg_val"), cpu_config_val(b->machine->cpu_config));
}
-char *bench_result_more_info(bench_result *b) {
- //return bench_result_more_info_complete(b);
+char *bench_result_more_info(bench_result *b)
+{
+ // return bench_result_more_info_complete(b);
return bench_result_more_info_less(b);
}