r4026 - trunk/birnet
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: r4026 - trunk/birnet
- Date: Tue, 24 Oct 2006 17:52:03 -0400 (EDT)
Author: timj
Date: 2006-10-24 17:51:53 -0400 (Tue, 24 Oct 2006)
New Revision: 4026
Modified:
trunk/birnet/ChangeLog
trunk/birnet/birnettests.h
Log:
Tue Oct 24 23:51:12 2006 Tim Janik <timj gtk org>
* birnettests.h: added cpu name to treport_*() output.
Modified: trunk/birnet/ChangeLog
===================================================================
--- trunk/birnet/ChangeLog 2006-10-24 20:45:18 UTC (rev 4025)
+++ trunk/birnet/ChangeLog 2006-10-24 21:51:53 UTC (rev 4026)
@@ -1,3 +1,7 @@
+Tue Oct 24 23:51:12 2006 Tim Janik <timj gtk org>
+
+ * birnettests.h: added cpu name to treport_*() output.
+
Mon Oct 23 17:56:19 2006 Stefan Westerfeld <stefan space twc de>
* birnetthreads.hh: Fixed typos in AutoLocker documentation.
Modified: trunk/birnet/birnettests.h
===================================================================
--- trunk/birnet/birnettests.h 2006-10-24 20:45:18 UTC (rev 4025)
+++ trunk/birnet/birnettests.h 2006-10-24 21:51:53 UTC (rev 4026)
@@ -135,6 +135,14 @@
{
treport_generic (perf_name, amount, amount_unit, -1);
}
+static const char*
+treport_cpu_name (const char *new_info)
+{
+ if (new_info)
+ g_dataset_set_data_full ((void*) g_dataset_destroy, "birnet-treport-custom-info", g_strdup (new_info), g_free);
+ /* the implementation of this function is a pretty bad hack around not exporting C symbols... */
+ return (const char*) g_dataset_get_data ((void*) g_dataset_destroy, "birnet-treport-custom-info");
+}
static void /* smaller amount is better */
treport_generic (const char *perf_name,
double amount,
@@ -148,8 +156,10 @@
int n = c ? c - numbuf : l;
const char spaces[] = " ";
uint indent = 9 - MIN (9, n);
- g_print ("#TBENCH%s: %25s:%s%s%s %s%c%s\n",
+ const char *custom_info = treport_cpu_name (NULL);
+ g_print ("#TBENCH%s:%s: %28s:%s%s%s %s%c%s\n",
bias > 0 ? "=maxi" : bias < 0 ? "=mini" : "=====",
+ custom_info ? custom_info : "",
perf_name,
&spaces[sizeof (spaces) - 1 - indent], numbuf, &spaces[sizeof (spaces) - 1 - (23 - MIN (23, indent + l))],
treport_unit (amount_unit & 0xffff),
@@ -254,6 +264,8 @@
birnet_init (argc, argv, NULL, ivalues);
unsigned int flags = g_log_set_always_fatal ((GLogLevelFlags) G_LOG_FATAL_MASK);
g_log_set_always_fatal ((GLogLevelFlags) (flags | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL));
+ CPUInfo ci = cpu_info();
+ treport_cpu_name (ci.machine);
if (init_settings().test_perf)
g_printerr ("PERF: %s\n", g_get_prgname());
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]