evolution-data-server r9341 - trunk/camel
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9341 - trunk/camel
- Date: Wed, 13 Aug 2008 18:39:28 +0000 (UTC)
Author: sragavan
Date: Wed Aug 13 18:39:28 2008
New Revision: 9341
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9341&view=rev
Log:
2008-08-14 Srinivasa Ragavan <sragavan novell com>
* camel/camel-db.c: Build break and fix it better.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-db.c
Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c (original)
+++ trunk/camel/camel-db.c Wed Aug 13 18:39:28 2008
@@ -37,15 +37,17 @@
#include <glib/gi18n-lib.h>
#if CAMEL_DB_DEBUG
-#define d(x) x
-const int MONITOR_DB_PERFORMANCE = 1;
+/* Enable d(x) if you want */
+#define d(x)
+/* Yeah it leaks, so fix it while debugging */
+#define START(stmt) g_print ("\n===========\nDB SQL operation [%s] started\n", stmt); cdb->timer = g_timer_new ();
+#define END g_timer_stop (cdb->timer); g_print ("DB Operation ended. Time Taken : %f\n###########\n", g_timer_elapsed (cdb->timer, NULL));
#else
#define d(x)
-const int MONITOR_DB_PERFORMANCE = 0;
+#define START(x)
+#define END
#endif
-#define START(stmt) if (MONITOR_DB_PERFORMANCE) { g_print ("\n===========\nDB SQL operation [%s] started\n", stmt); cdb->timer = g_timer_new (); }
-#define END if (MONITOR_DB_PERFORMANCE) {g_timer_stop (cdb->timer); g_print ("DB Operation ended. Time Taken : %f\n###########\n", g_timer_elapsed (cdb->timer, NULL)); }
/* Having this as a global variable, without mutex protection is wrong.
This will cause unnecessary crashes and multiple people using the resource etc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]