aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-19 16:20:51 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-19 16:20:51 +0000
commitc19e93f76ccd2d86a75acdafa4702339fed014a0 (patch)
tree4da2697bd2df2066e20813bb93485ebea340ae51 /hardinfo2
parent731fe831d99a672dc078d248b953f0ee8a5b202b (diff)
SyncManager finally working... we need to cleanup the code now :(
Diffstat (limited to 'hardinfo2')
-rw-r--r--hardinfo2/arch/common/blowfish.h2
-rw-r--r--hardinfo2/arch/common/fib.h2
-rw-r--r--hardinfo2/arch/common/md5.h2
-rw-r--r--hardinfo2/arch/common/raytrace.h2
-rw-r--r--hardinfo2/arch/common/sha1.h2
-rw-r--r--hardinfo2/arch/common/zlib.h2
-rw-r--r--hardinfo2/benchmark.c31
-rw-r--r--hardinfo2/benchmark.conf71
-rw-r--r--hardinfo2/syncmanager.c4
9 files changed, 50 insertions, 68 deletions
diff --git a/hardinfo2/arch/common/blowfish.h b/hardinfo2/arch/common/blowfish.h
index 6ece3b23..07160690 100644
--- a/hardinfo2/arch/common/blowfish.h
+++ b/hardinfo2/arch/common/blowfish.h
@@ -66,5 +66,5 @@ benchmark_fish(void)
gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n"
"<i>This Machine</i>=%.2f\n", elapsed);
- return benchmark_include_results(retval, "Blowfish");
+ return benchmark_include_results(retval, "CPU Blowfish");
}
diff --git a/hardinfo2/arch/common/fib.h b/hardinfo2/arch/common/fib.h
index f78ecab8..e676e38e 100644
--- a/hardinfo2/arch/common/fib.h
+++ b/hardinfo2/arch/common/fib.h
@@ -48,5 +48,5 @@ benchmark_fib(void)
gchar *retval = g_strdup_printf("[Results]\n"
"<i>This Machine</i>=%.3f s\n", elapsed);
- return benchmark_include_results(retval, "Fibonacci");
+ return benchmark_include_results(retval, "CPU Fibonacci");
}
diff --git a/hardinfo2/arch/common/md5.h b/hardinfo2/arch/common/md5.h
index 4bfc8e6e..601eef94 100644
--- a/hardinfo2/arch/common/md5.h
+++ b/hardinfo2/arch/common/md5.h
@@ -63,6 +63,6 @@ benchmark_md5(void)
gchar *retval = g_strdup_printf("[Results]\n"
"<i>This Machine</i>=%.2f MiB/s\n", 312.0 / elapsed);
- return benchmark_include_results_reverse(retval, "MD5");
+ return benchmark_include_results_reverse(retval, "CPU MD5");
}
diff --git a/hardinfo2/arch/common/raytrace.h b/hardinfo2/arch/common/raytrace.h
index 5da34860..d574779d 100644
--- a/hardinfo2/arch/common/raytrace.h
+++ b/hardinfo2/arch/common/raytrace.h
@@ -45,6 +45,6 @@ benchmark_raytrace(void)
gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n"
"<i>This Machine</i>=%.2f\n", elapsed);
- return benchmark_include_results(retval, "FBENCH");
+ return benchmark_include_results(retval, "CPU Raytracing");
}
diff --git a/hardinfo2/arch/common/sha1.h b/hardinfo2/arch/common/sha1.h
index cd00b9be..79cfebcf 100644
--- a/hardinfo2/arch/common/sha1.h
+++ b/hardinfo2/arch/common/sha1.h
@@ -62,6 +62,6 @@ benchmark_sha1(void)
gchar *retval = g_strdup_printf("[Results]\n"
"<i>This Machine</i>=%.2f MiB/s\n", 312.0 / elapsed);
- return benchmark_include_results_reverse(retval, "SHA1");
+ return benchmark_include_results_reverse(retval, "CPU SHA1");
}
diff --git a/hardinfo2/arch/common/zlib.h b/hardinfo2/arch/common/zlib.h
index 7a8d0666..3a091ac0 100644
--- a/hardinfo2/arch/common/zlib.h
+++ b/hardinfo2/arch/common/zlib.h
@@ -86,5 +86,5 @@ benchmark_zlib(void)
gchar *retval = g_strdup_printf("[Results]\n"
"<i>This Machine</i>=%.3f KiB/s\n",
65536.0 / elapsed);
- return benchmark_include_results_reverse(retval, "ZLib");
+ return benchmark_include_results_reverse(retval, "CPU ZLib");
}
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c
index 4d4d347c..d16c1388 100644
--- a/hardinfo2/benchmark.c
+++ b/hardinfo2/benchmark.c
@@ -62,23 +62,38 @@ static gchar *__benchmark_include_results(gchar * results,
{
GKeyFile *conf;
gchar **machines;
+ gchar *path;
int i;
conf = g_key_file_new();
- g_key_file_load_from_file(conf,
- idle_free(g_build_filename(params.path_data, "benchmark.conf", NULL)),
- 0, NULL);
+
+ path = g_build_filename(params.path_data, "benchmark.conf", NULL);
+ g_key_file_load_from_file(conf, path, 0, NULL);
+
+ machines = g_key_file_get_keys(conf, benchmark, NULL, NULL);
+ for (i = 0; machines && machines[i]; i++) {
+ gchar *value = g_key_file_get_value(conf, benchmark, machines[i], NULL);
+ results = g_strconcat(results, machines[i], "=", value, "\n", NULL);
+ g_free(value);
+ }
+
+ g_strfreev(machines);
+ g_free(path);
+ g_key_file_free(conf);
+
+ conf = g_key_file_new();
+ path = g_build_filename(g_get_home_dir(), ".hardinfo", "benchmark.conf", NULL);
+ g_key_file_load_from_file(conf, path, 0, NULL);
machines = g_key_file_get_keys(conf, benchmark, NULL, NULL);
for (i = 0; machines && machines[i]; i++) {
- gchar *value =
- g_key_file_get_value(conf, benchmark, machines[i], NULL);
- results =
- g_strconcat(results, machines[i], "=", value, "\n", NULL);
+ gchar *value = g_key_file_get_value(conf, benchmark, machines[i], NULL);
+ results = g_strconcat(results, machines[i], "=", value, "\n", NULL);
g_free(value);
}
g_strfreev(machines);
+ g_free(path);
g_key_file_free(conf);
return g_strdup_printf("[$ShellParam$]\n"
@@ -281,7 +296,7 @@ hi_module_init(void)
{
.fancy_name = "Benchmark results",
.name = "BenchmarkResults",
- .save_to = "benchmarks.conf",
+ .save_to = "benchmark.conf",
.get_data = get_benchmark_results
}
};
diff --git a/hardinfo2/benchmark.conf b/hardinfo2/benchmark.conf
index 501a7a89..3b7c6bcd 100644
--- a/hardinfo2/benchmark.conf
+++ b/hardinfo2/benchmark.conf
@@ -1,53 +1,18 @@
-[ZLib]
-# RAM:1024,Board:GA-7NNXP,OS:Linux 2.6.15
-AMD Athlon XP 3200+=15135.3348 KiB/s
-# RAM:512,Board:Toshiba M45-S165,OS:Linux 2.6.15,Compiler:GCC 3.3.5
-Intel Celeron M 1.5GHz=11640.4973 KiB/s
-AMD Athlon XP 2200+=8880.2168 KiB/s
-PowerMac G3 280MHz=2429.9592 KiB/s
-# RAM:128,Board:XingLing,OS:Linux 2.4.20
-Intel Pentium 200MHz=556.3799 KiB/s
-# RAM:32,Board:Toshiba Libretto 50CT,OS:Linux 2.4.20
-Intel Pentium 75MHz=331.8278 KiB/s
-
-[Fibonacci]
-# RAM:1024,Board:GA-7NNXP,OS:Linux 2.6.15
-AMD Athlon XP 3200+=7.34 s
-#AMD Athlon XP 2200+=3.54 s
-# RAM:768,Board:Toshiba M45-S165,OS:Linux 2.6.17,Compiler:GCC 4.1.2
-Intel Celeron M 1.5GHz=9.621 s
-
-# RAM:128,Board:XingLing,OS:Linux 2.4.20
-#Intel Pentium 200MHz=35.02
-PowerMac G3 280MHz=58.085 s
-
-# RAM:32,Board:Toshiba Libretto 50CT,OS:Linux 2.4.20
-#Intel Pentium 75MHz=110.20
-# RAM:1024,Board:GA-7NNXP,OS:Linux 2.6.15
-#Valgrind/AMD Athlon XP 3200+=164.92
-Intel Pentium 75MHz=169.961 s
-
-[MD5]
-# RAM:512,Board:Toshiba M45-S165,OS:Linux 2.6.15,Compiler:GCC 3.3.5
-Intel Celeron M 1.5GHz=36.533 MiB/s
-# RAM:1024,Board:GA-7NNXP,OS:Linux 2.6.15
-AMD Athlon XP 3200+=61.9047 MiB/s
-PowerMac G3 280MHz=7.1135 MiB/s
-Intel Pentium 75MHz=2.977 MiB/s
-
-[SHA1]
-# RAM:1024,Board:GA-7NNXP,OS:Linux 2.6.15
-AMD Athlon XP 3200+=63.93 MiB/s
-# RAM:512,Board:Toshiba M45-S165,OS:Linux 2.6.15,Compiler:GCC 3.3.5
-Intel Celeron M 1.5GHz=45.02 MiB/s
-PowerMac G3 280MHz=6.74 MiB/s
-Intel Pentium 75MHz=1.54 MiB/s
-
-[Blowfish]
-PowerMac G3 280MHz=172.76
-Intel Celeron M 1.5GHz=26.15
-Intel Pentium 75MHz=586.02
-
-[FBENCH]
-PowerMac G3 280MHz=161.61
-Intel Celeron M 1.5GHz=35.64
+[CPU ZLib]
+PowerPC 740/750 (280.00MHz)=2150.597408
+Intel(R) Celeron(R) M processor 1.50GHz=8761.604561
+[CPU Fibonacci]
+Intel(R) Celeron(R) M processor 1.50GHz=8.1375674
+PowerPC 740/750 (280.00MHz)=58.07682
+[CPU MD5]
+PowerPC 740/750 (280.00MHz)=7.115258
+Intel(R) Celeron(R) M processor 1.50GHz=38.6607998
+[CPU SHA1]
+PowerPC 740/750 (280.00MHz)=6.761451
+Intel(R) Celeron(R) M processor 1.50GHz=49.6752776
+[CPU Blowfish]
+Intel(R) Celeron(R) M processor 1.50GHz=26.1876862
+PowerPC 740/750 (280.00MHz)=172.816713
+[FPU Raytracing]
+Intel(R) Celeron(R) M processor 1.50GHz=40.8816714
+PowerPC 740/750 (280.00MHz)=161.312647
diff --git a/hardinfo2/syncmanager.c b/hardinfo2/syncmanager.c
index 3366fe70..3df935bc 100644
--- a/hardinfo2/syncmanager.c
+++ b/hardinfo2/syncmanager.c
@@ -63,7 +63,7 @@ static SoupSession *session = NULL;
static GMainLoop *loop;
static GQuark err_quark;
-#define XMLRPC_SERVER_URI "http://condor/xmlrpc/"
+#define XMLRPC_SERVER_URI "http://hardinfo.berlios.de/xmlrpc/"
#define XMLRPC_SERVER_API_VERSION 1
#define LABEL_SYNC_DEFAULT "<big><b>Synchronize with Central Database</b></big>\n" \
@@ -327,6 +327,8 @@ static gboolean _cancel_sync(GtkWidget *widget, gpointer data)
sd->flag_cancel = TRUE;
g_main_quit(loop);
+ gtk_widget_set_sensitive(widget, FALSE);
+
return FALSE;
}