[geos-commits] r3455 - trunk/tests/perf
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Jul 27 09:55:12 EDT 2011
Author: strk
Date: 2011-07-27 06:55:12 -0700 (Wed, 27 Jul 2011)
New Revision: 3455
Added:
trunk/tests/perf/ClassSizes.cpp
Modified:
trunk/tests/perf/Makefile.am
Log:
Add test file printing sizes of some classes
Added: trunk/tests/perf/ClassSizes.cpp
===================================================================
--- trunk/tests/perf/ClassSizes.cpp (rev 0)
+++ trunk/tests/perf/ClassSizes.cpp 2011-07-27 13:55:12 UTC (rev 3455)
@@ -0,0 +1,44 @@
+/**********************************************************************
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2011 Sandro Santilli <strk at keybit.net>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation.
+ * See the COPYING file for more information.
+ *
+ **********************************************************************
+ *
+ * - Monitor class sizes
+ *
+ **********************************************************************/
+
+
+#include <geos/geom/GeometryFactory.h>
+#include <geos/io/WKTReader.h>
+#include <geos/geom/Geometry.h>
+#include <geos/geomgraph/DirectedEdge.h>
+#include <geos/geomgraph/EdgeEnd.h>
+#include <geos/geomgraph/PlanarGraph.h>
+#include <geos/noding/NodedSegmentString.h>
+#include <geos/profiler.h>
+#include <iostream>
+
+using namespace std;
+using namespace geos;
+
+#define check(x) \
+ { cout << "Size of " << #x << " is " << sizeof(x) << endl; }
+
+int
+main()
+{
+ check(geomgraph::PlanarGraph);
+ check(geomgraph::EdgeEnd);
+ check(geomgraph::DirectedEdge);
+ check(noding::NodedSegmentString);
+}
+
Modified: trunk/tests/perf/Makefile.am
===================================================================
--- trunk/tests/perf/Makefile.am 2011-07-27 13:29:36 UTC (rev 3454)
+++ trunk/tests/perf/Makefile.am 2011-07-27 13:55:12 UTC (rev 3455)
@@ -6,3 +6,6 @@
operation \
capi
+noinst_PROGRAMS = ClassSizes
+
+ClassSizes_SOURCES = ClassSizes.cpp
More information about the geos-commits
mailing list