]> granicus.if.org Git - postgis/commitdiff
Add bbox cache size test
authorSandro Santilli <strk@keybit.net>
Fri, 20 Feb 2015 16:26:56 +0000 (16:26 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 20 Feb 2015 16:26:56 +0000 (16:26 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13249 b70326c6-7e19-0410-871a-916f4a2858ee

regress/Makefile.in
regress/size.sql [new file with mode: 0644]
regress/size_expected [new file with mode: 0644]

index ed8161d3391d10b307a33d2638dd28986bc07e0f..c51065e45eacac8043eca18b9d1b563d9d2cb0a8 100644 (file)
@@ -83,6 +83,7 @@ TESTS = \
        regress_lrs \
        removepoint \
        setpoint \
+       size \
        simplify \
        snaptogrid \
        summary \
diff --git a/regress/size.sql b/regress/size.sql
new file mode 100644 (file)
index 0000000..a065885
--- /dev/null
@@ -0,0 +1,13 @@
+WITH areal(g) AS  ( SELECT ST_Buffer('POINT(0 0)',1,1) ),
+     lineal(g) AS ( SELECT ST_Boundary(g) FROM areal ),
+     puntal(g) AS ( SELECT ST_StartPoint(g) FROM lineal ),
+     alldim(g) AS ( SELECT g FROM areal UNION ALL
+                    SELECT g FROM lineal UNION ALL
+                    SELECT g FROM puntal ),
+     alltyp(g) AS ( SELECT g FROM alldim UNION ALL
+                    SELECT ST_Force3DM(g) FROM alldim UNION ALL
+                    SELECT ST_Force3DZ(g) FROM alldim UNION ALL
+                    SELECT ST_Force4D(g)  FROM alldim )
+SELECT 'bbox',ST_Dimension(g) d, ST_ZMFlag(g) f,
+ ST_MemSize(postgis_addbbox(g))-ST_MemSize(postgis_dropbbox(g))
+FROM alltyp ORDER BY f,d;
diff --git a/regress/size_expected b/regress/size_expected
new file mode 100644 (file)
index 0000000..e355996
--- /dev/null
@@ -0,0 +1,12 @@
+bbox|0|0|16
+bbox|1|0|16
+bbox|2|0|16
+bbox|0|1|24
+bbox|1|1|24
+bbox|2|1|24
+bbox|0|2|24
+bbox|1|2|24
+bbox|2|2|24
+bbox|0|3|32
+bbox|1|3|32
+bbox|2|3|32