Questions about regress test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about regress test

Han Wang
Hi all,

I am currently trying to write some performance tests without any expected output. But I have a few problems 

Firstly, the `explain` operator cannot be applied to a `create index` operation. So I can only use the simple `\timing` method. I would like to know if there is any other performance metrics operation to replace the `\timing` ?

What's more, it seems the expected output must be defined in the `/regress` test. But it is impossible to get the time of an operation as an expected output. Is there any solution to this situation?

I am grateful for your answers.

Best regards,
Han

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Questions about regress test

Darafei "Komяpa" Praliaskouski
Hello,

PostGIS is not a real time system, so there is no framework to measure or limit time of execution of things it does. 

Execution time of the query is heavily dependent on the underlying hardware. What helps:

 - flamegraph of execution - https://github.com/brendangregg/FlameGraph - to see which function gets most CPU time;

 - IO access ("buffers") in explain. Since you're working on changing the index creation algorithm the interesting thing will be to minimize the number of buffers accessed on the queries after the index is created. This is available in the EXPLAIN output and can be checked in the test suite. To get a quick idea of how much it will take in realistic amazon deployment, assume each 1000 buffers will take 1 second on a fully saturated system (your laptop is likely much faster).


On Sat, Jun 12, 2021 at 11:17 AM Han Wang <[hidden email]> wrote:
Hi all,

I am currently trying to write some performance tests without any expected output. But I have a few problems 

Firstly, the `explain` operator cannot be applied to a `create index` operation. So I can only use the simple `\timing` method. I would like to know if there is any other performance metrics operation to replace the `\timing` ?

What's more, it seems the expected output must be defined in the `/regress` test. But it is impossible to get the time of an operation as an expected output. Is there any solution to this situation?

I am grateful for your answers.

Best regards,
Han
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel


--
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel