[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src event_log_code.h geas-server.c ge...
From: |
Treshna Enterprises |
Subject: |
gnue/geas/src event_log_code.h geas-server.c ge... |
Date: |
Tue, 12 Jun 2001 21:28:21 -0700 |
CVSROOT: /cvs
Module name: gnue
Changes by: Treshna Enterprises <address@hidden> 01/06/12 21:28:21
Modified files:
geas/src : event_log_code.h geas-server.c geas-server.h
geas-skeleton.c
geas/src/oql : oql.c
Log message:
still trying to make things faster
bugfix in oql: would cause a database error if a field value contained
a '
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/event_log_code.h.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/geas-server.c.diff?cvsroot=OldCVS&tr1=1.103&tr2=1.104&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/geas-server.h.diff?cvsroot=OldCVS&tr1=1.49&tr2=1.50&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/geas-skeleton.c.diff?cvsroot=OldCVS&tr1=1.65&tr2=1.66&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/oql/oql.c.diff?cvsroot=OldCVS&tr1=1.62&tr2=1.63&r1=text&r2=text
Patches:
Index: gnue/geas/src/event_log_code.h
diff -u gnue/geas/src/event_log_code.h:1.6 gnue/geas/src/event_log_code.h:1.7
--- gnue/geas/src/event_log_code.h:1.6 Tue Jun 12 15:20:36 2001
+++ gnue/geas/src/event_log_code.h Tue Jun 12 21:28:21 2001
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: event_log_code.h,v 1.6 2001/06/12 22:20:36 reinhard Exp $
+ $Id: event_log_code.h,v 1.7 2001/06/13 04:28:21 treshna Exp $
*/
#include <time.h>
@@ -102,6 +102,7 @@
e->when = g_strdup (evt_get_now ());
e->usagecount = 0;
}
+g_assert( e != NULL );
return (e);
}
@@ -247,6 +248,8 @@
EventLog *e;
GList *l = event_logs;
+ if( !l ) return;
+
/* on demand initialisation */
if (edits == NULL)
{
@@ -297,6 +300,8 @@
LoggableEvent *evt = NULL;
EventLog *e;
GList *l = event_logs;
+
+ if( !l ) return;
/* on demand initialisation */
if (edits == NULL)
Index: gnue/geas/src/geas-server.c
diff -u gnue/geas/src/geas-server.c:1.103 gnue/geas/src/geas-server.c:1.104
--- gnue/geas/src/geas-server.c:1.103 Tue Jun 12 17:47:46 2001
+++ gnue/geas/src/geas-server.c Tue Jun 12 21:28:21 2001
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: geas-server.c,v 1.103 2001/06/13 00:47:46 treshna Exp $
+ $Id: geas-server.c,v 1.104 2001/06/13 04:28:21 treshna Exp $
*/
@@ -177,9 +177,13 @@
void timer_display_profiles( void )
{
int i;
+ unsigned int unaccounted;
printf( "\n----------------------------------\n"
"Profiles: (time in seconds to 4dp)\n" );
+
+ unaccounted = timer_profiles[ TIMER_FUNC_OPERATION ].total;
+
for( i=0 ; i<TIMER_FUNC_COUNT ; i++ ) {
if( timer_profiles[i].count > 0 ) {
printf( "PROFILE: " );
@@ -189,6 +193,7 @@
case TIMER_FUNC_SETFIELD : printf( "setField() : " ); break;
case TIMER_FUNC_NEWOBJECT : printf( "newObject() : " ); break;
case TIMER_FUNC_LOADALL : printf( "loadAll() : " ); break;
+ case TIMER_FUNC_MAKEID : printf( "make id : " ); break;
case TIMER_FUNC_GET_OBJECTS: printf( "_get_objects() : " ); break;
case TIMER_FUNC_OPERATION : printf( "operation : " ); break;
case TIMER_FUNC_FIND_BY_KEY: printf( "find by key : " ); break;
@@ -205,8 +210,10 @@
us_to_seconds( timer_profiles[i].avg ),
us_to_seconds( timer_profiles[i].max ),
us_to_seconds( timer_profiles[i].total ) );
+ if( i != TIMER_FUNC_OPERATION ) unaccounted -= timer_profiles[i].total;
}
}
+ printf( "Time not accounted for: %.4f\n" , us_to_seconds(unaccounted) );
}
void timer_start_profile( int function )
Index: gnue/geas/src/geas-server.h
diff -u gnue/geas/src/geas-server.h:1.49 gnue/geas/src/geas-server.h:1.50
--- gnue/geas/src/geas-server.h:1.49 Tue Jun 12 17:47:46 2001
+++ gnue/geas/src/geas-server.h Tue Jun 12 21:28:21 2001
@@ -20,7 +20,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: geas-server.h,v 1.49 2001/06/13 00:47:46 treshna Exp $
+ $Id: geas-server.h,v 1.50 2001/06/13 04:28:21 treshna Exp $
*/
/** \file geas-server.h
@@ -55,6 +55,7 @@
#define TIMER_FUNC_FLUSH 10
#define TIMER_FUNC_MAKELIST 11
#define TIMER_FUNC_RELEASELIST 12
+ #define TIMER_FUNC_MAKEID 13
#define TIMER_FUNC_OPERATION 49
Index: gnue/geas/src/geas-skeleton.c
diff -u gnue/geas/src/geas-skeleton.c:1.65 gnue/geas/src/geas-skeleton.c:1.66
--- gnue/geas/src/geas-skeleton.c:1.65 Tue Jun 12 20:33:03 2001
+++ gnue/geas/src/geas-skeleton.c Tue Jun 12 21:28:21 2001
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: geas-skeleton.c,v 1.65 2001/06/13 03:33:03 treshna Exp $
+ $Id: geas-skeleton.c,v 1.66 2001/06/13 04:28:21 treshna Exp $
*/
@@ -3036,7 +3036,7 @@
}
/* Create/manage object keys using libuuid */
-#define OID_BUF_LEN 1024
+#define OID_BUF_LEN 4096
static unsigned char oid_buffer[OID_BUF_LEN + 2][64];
static int oid_count = (-1);
@@ -3048,9 +3048,11 @@
while (count < max && oid_count < (OID_BUF_LEN - 1))
{
+ timer_start_profile( TIMER_FUNC_MAKEID );
oid_count++;
count++;
uuid_generate (&oid_buffer[oid_count][0]);
+ timer_update_profile( TIMER_FUNC_MAKEID );
}
debug_output (DEBUGLEVEL_2, "Created %d oids", count);
}
Index: gnue/geas/src/oql/oql.c
diff -u gnue/geas/src/oql/oql.c:1.62 gnue/geas/src/oql/oql.c:1.63
--- gnue/geas/src/oql/oql.c:1.62 Tue Jun 12 20:33:03 2001
+++ gnue/geas/src/oql/oql.c Tue Jun 12 21:28:21 2001
@@ -19,7 +19,7 @@
along with GEAS; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: oql.c,v 1.62 2001/06/13 03:33:03 treshna Exp $
+ $Id: oql.c,v 1.63 2001/06/13 04:28:21 treshna Exp $
*/
#include "config.h"
@@ -460,6 +460,7 @@
ptr = out;
str = (char *) value;
*ptr = '\'';
+ ptr++;
while (*str != '\0')
{
if (*str == '\'')
@@ -478,7 +479,6 @@
}
*ptr++ = '\'';
*ptr = '\0';
-
return (out);
break;
@@ -496,6 +496,7 @@
ptr = out;
str = (char *) value;
*ptr = '\'';
+ ptr++;
while (*str != '\0')
{
if (*str == '\'')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/geas/src event_log_code.h geas-server.c ge...,
Treshna Enterprises <=