#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, result);
+ profreport("geos",geom1, geom2, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, result);
+ profreport("geos",geom1, geom2, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, NULL, result);
+ profreport("geos",geom1, NULL, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, NULL, result);
+ profreport("geos",geom1, NULL, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, NULL, result);
+ profreport("geos",geom1, NULL, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, result);
+ profreport("geos",geom1, geom2, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, result);
+ profreport("geos",geom1, geom2, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, NULL, result);
+ profreport("geos",geom1, NULL, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom, NULL, result);
+ profreport("geos",geom, NULL, result);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, NULL, NULL);
+ profreport("geos",geom1, NULL, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("intr",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_POINTER(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom1, geom2, NULL);
+ profreport("geos",geom1, geom2, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom, NULL, NULL);
+ profreport("geos",geom, NULL, NULL);
#endif
PG_RETURN_BOOL(result);
#ifdef PROFILE
profstop(PROF_QRUN);
- profreport(geom, NULL, NULL);
+ profreport("geos",geom, NULL, NULL);
#endif
PG_RETURN_BOOL(result);
#ifndef _PROFILE_H
#define _PROFILE_H 1
+#include <math.h>
+
/*
* Define this to have profiling enabled
*/
proftime[x] = ( profstop[x].tv_sec*1000000+profstop[x].tv_usec) - \
( profstart[x].tv_sec*1000000+profstart[x].tv_usec); \
} while (0);
-#define profreport(x, y, r) do { \
+#define profreport(n, x, y, r) do { \
profipts = 0; \
if ((x)) profipts += lwgeom_npoints(SERIALIZED_FORM((x))); \
if ((y)) profipts += lwgeom_npoints(SERIALIZED_FORM((y))); \
int convpercent = round(((double)conv/(double)tot)*100); \
int runpercent = round(((double)run/(double)tot)*100); \
elog(NOTICE, \
- "PROF_DET: npts:%lu+%lu=%lu cnv:%lu+%lu run:%lu gtot:%lu qtot:%lu", \
+ "PROF_DET(%s): npts:%lu+%lu=%lu cnv:%lu+%lu run:%lu gtot:%lu qtot:%lu", \
+ (n), \
profipts, profopts, profipts+profopts, \
proftime[PROF_P2G], proftime[PROF_G2P], \
proftime[PROF_GRUN], \
proftime[PROF_P2G]+proftime[PROF_G2P]+proftime[PROF_GRUN], \
proftime[PROF_QRUN]); \
- elog(NOTICE, "PROF_SUM: pts %lu cnv %d%% grun %d%% tot %d%%", \
+ elog(NOTICE, "PROF_SUM(%s): pts %lu cnv %d%% grun %d%% tot %d%%", \
+ (n), \
profipts+profopts, \
convpercent, \
runpercent, \