summaryrefslogtreecommitdiff
path: root/modules/benchmark
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-12-14 21:29:11 -0600
committerLeandro A. F. Pereira <leandro@hardinfo.org>2018-02-27 07:41:51 -0800
commit8fb9ed49987ca006495891f04e5250496d6e00f4 (patch)
tree4cd38dc3ddd161214286bc8c6e9a6dfb70f20f04 /modules/benchmark
parent2ae6301cc9abcb26e4d98d44c8cf267052d0622a (diff)
struct simple_machine renamed to bench_machine
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/benchmark')
-rw-r--r--modules/benchmark/bench_results.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/modules/benchmark/bench_results.c b/modules/benchmark/bench_results.c
index 226f595c..6c03250b 100644
--- a/modules/benchmark/bench_results.c
+++ b/modules/benchmark/bench_results.c
@@ -32,13 +32,13 @@ typedef struct {
int cores;
int threads;
char *mid;
-} simple_machine;
+} bench_machine;
typedef struct {
char *name;
float result;
int threads;
- simple_machine *machine;
+ bench_machine *machine;
int legacy; /* an old benchmark.conf result */
} bench_result;
@@ -112,7 +112,7 @@ static int cpu_config_is_close(char *str0, char *str1) {
return 0;
}
-static gen_machine_id(simple_machine *m) {
+static gen_machine_id(bench_machine *m) {
char *s;
if (m) {
if (m->mid != NULL)
@@ -135,19 +135,19 @@ static gen_machine_id(simple_machine *m) {
}
}
-simple_machine *simple_machine_new() {
- simple_machine *m = NULL;
- m = malloc(sizeof(simple_machine));
+bench_machine *bench_machine_new() {
+ bench_machine *m = NULL;
+ m = malloc(sizeof(bench_machine));
if (m)
- memset(m, 0, sizeof(simple_machine));
+ memset(m, 0, sizeof(bench_machine));
return m;
}
-simple_machine *simple_machine_this() {
- simple_machine *m = NULL;
+bench_machine *bench_machine_this() {
+ bench_machine *m = NULL;
char *tmp;
- m = simple_machine_new();
+ m = bench_machine_new();
if (m) {
m->board = module_call_method("devices::getMotherboard");
m->cpu_name = module_call_method("devices::getProcessorName");
@@ -170,7 +170,7 @@ simple_machine *simple_machine_this() {
return m;
}
-void simple_machine_free(simple_machine *s) {
+void bench_machine_free(bench_machine *s) {
if (s) {
free(s->board);
free(s->cpu_name);
@@ -183,7 +183,7 @@ void simple_machine_free(simple_machine *s) {
void bench_result_free(bench_result *s) {
if (s) {
free(s->name);
- simple_machine_free(s->machine);
+ bench_machine_free(s->machine);
}
}
@@ -193,7 +193,7 @@ bench_result *bench_result_this_machine(const char *bench_name, float result, in
b = malloc(sizeof(bench_result));
if (b) {
memset(b, 0, sizeof(bench_result));
- b->machine = simple_machine_this();
+ b->machine = bench_machine_this();
b->name = strdup(bench_name);
b->result = result;
b->threads = threads;
@@ -232,7 +232,7 @@ bench_result *bench_result_benchmarkconf(const char *section, const char *key, c
b = malloc(sizeof(bench_result));
if (b) {
memset(b, 0, sizeof(bench_result));
- b->machine = simple_machine_new();
+ b->machine = bench_machine_new();
b->name = strdup(section);
if (vl >= 10) { /* the 11th could be empty */