Permalink
Browse files

bench_results: store int processors/cores/threads

In the future, won't have to rely on a translated string.

Signed-off-by: Burt P <pburt0@gmail.com>
  • Loading branch information...
bp0 authored and lpereira committed Aug 16, 2017
1 parent f85e67c commit 72cd4f205211b7fffc6c5cd8926921d4eef6ab6a
Showing with 37 additions and 21 deletions.
  1. +15 −15 benchmark.conf
  2. +22 −6 modules/benchmark/bench_results.c
View
@@ -51,8 +51,8 @@ AMD Athlon(tm) XP 2200+=22.197|1782 MHz|Unknown
Intel(R) Pentium(R) 4 CPU 3.06GHz=7.454|2x 3065 MHz|Unknown
AMD Processor model unknown=5.242|2x 3006 MHz|Unknown
AMD Turion(tm) 64 X2 Mobile Technology TL-62=7.519|2x 800 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=11.97|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=114.42|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=11.97|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=114.42|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
[CPU CryptoHash]
Intel(R) Atom(TM) CPU330 @ 1.60GHz=105.569|4x 1596 MHz|Unknown
Intel(R) Core(TM)2 Duo CPU T5250@ 1.50GHz=102.949|2x 1000 MHz|Unknown
@@ -104,8 +104,8 @@ AMD Turion(tm) 64 Mobile Technology ML-37=42.208|2000 MHz|Unknown
Intel(R) Xeon(R) CPU3040@ 1.86GHz=127.825|2x 1862 MHz|Unknown
AMD Athlon(tm) XP 2500+=39.659|1792 MHz|Unknown
Intel(R) Core(TM)2 Duo CPU T9500@ 2.60GHz=172.640|2x 2593 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=98.27|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=11.70|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=98.27|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=11.70|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
[CPU N-Queens]
AMD Athlon(tm) 64 X2 Dual Core Processor 5400+=15.057|2x 1000 MHz|Unknown
Genuine Intel(R) CPU T2080@ 1.73GHz=33.309|2x 800 MHz|Unknown
@@ -157,8 +157,8 @@ AMD Athlon(tm) XP processor 1800+=17.547|1533 MHz|Unknown
Intel(R) Core(TM)2 Duo CPU T5750@ 2.00GHz=11.140|2x 1994 MHz|Unknown
Intel(R) Core(TM)2 Duo CPU T7250@ 2.00GHz=11.387|2x 2001 MHz|Unknown
Intel(R) Pentium(R) 4 CPU 1500MHz=28.460|1495 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=22.83|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=65.80|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=22.83|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=65.80|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
[FPU Raytracing]
Intel(R) Core(TM) Duo CPUT2450@ 2.00GHz=28.359|2x 800 MHz|Unknown
AMD Athlon(tm) XP 2200+=29.739|1782 MHz|Unknown
@@ -210,8 +210,8 @@ Intel(R) Pentium(R) M processor 1.80GHz=27.133|600 MHz|Unknown
Intel(R) Celeron(R) CPU 2.80GHz=81.047|2793 MHz|Unknown
Genuine Intel(R) CPU T1350@ 1.86GHz=222.178|1867 MHz|Unknown
Intel(R) Pentium(R) 4 CPU 2.80GHz=28.658|2791 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=16.21|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=112.48|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=16.21|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=112.48|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
PowerPC 740/750=161.312647|280.00 MHz|Unknown
[CPU Blowfish]
Intel(R) Pentium(R) D CPU 3.00GHz=10.838|2x 3000 MHz|Unknown
@@ -264,8 +264,8 @@ Intel(R) Core(TM)2 Duo CPU T9400@ 2.53GHz=6.757|2x 800 MHz|Unknown
AMD Athlon(tm) 64 X2 Dual Core Processor 4800+=8.735|2x 2512 MHz|Unknown
Intel(R) Celeron(R) M CPU520@ 1.60GHz=22.072|1600 MHz|Unknown
Intel(R) Core(TM)2 Quad CPUQ8300@ 2.50GHz=3.346|4x 2497 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=10.41|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=77.47|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=10.41|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=77.47|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
PowerPC 740/750=172.816713|280.00 MHz|Unknown
[CPU SHA1]
[CPU MD5]
@@ -320,12 +320,12 @@ AMD Sempron(tm) Processor 3600+=5.696|1000 MHz|Unknown
AMD Athlon(tm)=4.475|2305 MHz|Unknown
AMD Athlon(tm) X2 Dual Core Processor BE-2300=4.373|2x 1899 MHz|Unknown
Intel(R) Core(TM)2 Duo CPU E6750@ 2.66GHz=4.096|2x 2671 MHz|Unknown
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=12.29|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=20.15|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=12.29|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=20.15|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
PowerPC 740/750=58.07682|280.00 MHz|Unknown
[CPU Zlib]
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=0.18|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=7169.12|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=0.18|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_Model_B_Rev_1;Broadcom_BCM2835;900_00=7169.12|1|Raspberry Pi Model B Rev 1|Broadcom BCM2835|1x ARM ARM1176 r0p7 (AArch32)|1x 900.00 MHz|233620|1|1|1
PowerPC 740/750=2150.597408|280.00 MHz|Unknown
[GPU Drawing]
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=3984.56|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Raspberry_Pi_3_Model_B_Rev_1_2;Broadcom_BCM2837;4800_00=3984.56|4|Raspberry Pi 3 Model B Rev 1.2|Broadcom BCM2837|4x ARM Cortex-A53 r0p4 (AArch32)|4x 1200.00 MHz|945512|4|4|4|Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
@@ -25,6 +25,8 @@ typedef struct {
char *cpu_desc;
char *cpu_config;
char *ogl_renderer;
int processors;
int cores;
int threads;
char *mid;
} simple_machine;
@@ -141,6 +143,7 @@ simple_machine *simple_machine_new() {
simple_machine *simple_machine_this() {
simple_machine *m = NULL;
char *tmp;
m = simple_machine_new();
if (m) {
m->board = module_call_method("devices::getMotherboard");
@@ -151,9 +154,14 @@ simple_machine *simple_machine_this() {
tmp = module_call_method("devices::getMemoryTotal");
m->memory_kiB = atoi(tmp);
free(tmp);
cpu_procs_cores_threads(&m->processors, &m->cores, &m->threads);
/*
tmp = module_call_method("devices::getProcessorCount");
m->threads = atoi(tmp);
free(tmp);
*/
gen_machine_id(m);
}
return m;
@@ -224,7 +232,7 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
b->machine = simple_machine_new();
b->name = strdup(section);
if (vl >= 8) { /* the 9th could be empty */
if (vl >= 10) { /* the 11th could be empty */
b->machine->mid = strdup(key);
b->result = atof(values[0]);
b->threads = atoi(values[1]);
@@ -233,9 +241,11 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
b->machine->cpu_desc = strdup(values[4]);
b->machine->cpu_config = strdup(values[5]);
b->machine->memory_kiB = atoi(values[6]);
b->machine->threads = atoi(values[7]);
if (vl >= 9)
b->machine->ogl_renderer = strdup(values[8]);
b->machine->processors = atoi(values[7]);
b->machine->cores = atoi(values[8]);
b->machine->threads = atoi(values[9]);
if (vl >= 11)
b->machine->ogl_renderer = strdup(values[10]);
b->legacy = 0;
} else if (vl >= 2) {
b->result = atof(values[0]);
@@ -292,7 +302,12 @@ 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;
}
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);
@@ -309,13 +324,14 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
char *bench_result_benchmarkconf_line(bench_result *b) {
char *cpu_config = cpu_config_retranslate(b->machine->cpu_config, 1, 0);
char *ret = g_strdup_printf("%s=%.2f|%d|%s|%s|%s|%s|%d|%d|%s\n",
char *ret = g_strdup_printf("%s=%.2f|%d|%s|%s|%s|%s|%d|%d|%d|%d|%s\n",
b->machine->mid, b->result, b->threads,
(b->machine->board != NULL) ? b->machine->board : "",
b->machine->cpu_name,
(b->machine->cpu_desc != NULL) ? b->machine->cpu_desc : "",
cpu_config,
b->machine->memory_kiB, b->machine->threads,
b->machine->memory_kiB,
b->machine->processors, b->machine->cores, b->machine->threads,
(b->machine->ogl_renderer != NULL) ? b->machine->ogl_renderer : ""
);
free(cpu_config);

0 comments on commit 72cd4f2

Please sign in to comment.