From 61ba7052286a5f45e502699831e86d54c6fdb80e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 20 Feb 2015 16:26:56 +0000 Subject: [PATCH] Add bbox cache size test git-svn-id: http://svn.osgeo.org/postgis/trunk@13249 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/Makefile.in | 1 + regress/size.sql | 13 +++++++++++++ regress/size_expected | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 regress/size.sql create mode 100644 regress/size_expected diff --git a/regress/Makefile.in b/regress/Makefile.in index ed8161d33..c51065e45 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -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 index 000000000..a065885a1 --- /dev/null +++ b/regress/size.sql @@ -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 index 000000000..e35599692 --- /dev/null +++ b/regress/size_expected @@ -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 -- 2.50.1