You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run queries in python benchmarks using only one thread (#24)
This PR adds single-threaded variants for engines for running unit-test style UDF tests using only one thread. This makes the performance benchmark results of UDF functions comparable across different engines.
For more details and command line options, refer to the official [pytest-benchmark documentation](https://pytest-benchmark.readthedocs.io/en/latest/usage.html)
82
+
83
+
### Adding New Benchmarks
84
+
85
+
There are two types of engines, each type serving a different purpose:
Micro / UDF benchmarks that measure the per-function cost (e.g. ST_Area, ST_Contains). These should run engines in a comparable, single-thread style configuration (where possible) to make function-level performance differences clearer.
89
+
-`SedonaDB`, `DuckDB`, `PostGIS`:
90
+
Macro / complex query benchmarks (e.g. KNN joins) that represent perceived end-user performance. Engines run with their default / natural configuration (multi-threading, internal parallelism, etc.).
91
+
92
+
Please choose the appropriate engines when adding a new benchmark. All existing benchmarks have been annotated accordingly.
93
+
94
+
Example (UDF micro benchmark in single-thread mode):
95
+
```python
96
+
import pytest
97
+
from sedonadb.testing import SedonaDBSingleThread, DuckDBSingleThread, PostGISSingleThread
0 commit comments