Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d316100
Feature/208 add import from parquet (#209)
ArBridgeman Aug 11, 2025
b49265e
Merge branch 'master' into develop
ArBridgeman Aug 14, 2025
833dafe
Add performance testing start
ArBridgeman Aug 14, 2025
a1402fa
Test with ~4,000,000 entries
ArBridgeman Aug 18, 2025
55df58f
Add polars testing & resolve issue seen from parquet due to non-deter…
ArBridgeman Aug 18, 2025
7180a71
Add pandas testing
ArBridgeman Aug 18, 2025
ac4bb11
Refactor and reduce tests to show critical differences & set up for u…
ArBridgeman Aug 18, 2025
fcd2782
Refactor so performance tests are in their own folder with needed fix…
ArBridgeman Aug 18, 2025
8b72692
Clean up files & add iterator test
ArBridgeman Aug 18, 2025
2da6ddd
Add export tests
ArBridgeman Aug 18, 2025
bbf6ee0
Split into export to file and to memory so test complexity less
ArBridgeman Aug 19, 2025
fef0b0b
Add initial benchmark file for the performance tests
ArBridgeman Aug 19, 2025
2a1f70b
Bump rounds to 10 to get a bit more stable statistics
ArBridgeman Aug 19, 2025
25c5c3f
Remove unnecessary quoting and switch to action tense
ArBridgeman Aug 19, 2025
ecae5b9
Add argument options to nox session db:start
ArBridgeman Aug 19, 2025
ebeeb9a
Switch to db:start in ssl_cert & examples
ArBridgeman Aug 19, 2025
e862725
Add performance tests to merge gate
ArBridgeman Aug 19, 2025
2e1e2e4
Add nox session for performance tests
ArBridgeman Aug 19, 2025
f9832cb
Add start up fixture to add schema needed for tests as running indepe…
ArBridgeman Aug 19, 2025
3d27b73
Add changelog entry and information on updating the file
ArBridgeman Aug 19, 2025
d8d4a97
Add on to how to update
ArBridgeman Aug 19, 2025
ff27f91
Fix db:start usage; forgot --, which had locally
ArBridgeman Aug 19, 2025
410ca5c
Switch to Performance-Tests for consistency
ArBridgeman Aug 19, 2025
6a17edc
Separate performance test & check; unfortunately, it seems like this …
ArBridgeman Aug 20, 2025
5c7f0e9
Fix to run with path expected by CI run
ArBridgeman Aug 20, 2025
be7f340
Update based on observations and file uploaded in CI
ArBridgeman Aug 20, 2025
1845df8
Switch from using benchmark assumed path to explicit so we are not ma…
ArBridgeman Aug 25, 2025
c1fa607
Modify based on intial Wilcoxon signed-rank test
ArBridgeman Aug 25, 2025
0903e17
Update pyproject.toml as scipy-stubs not yet available at this version
ArBridgeman Aug 25, 2025
03e8bb3
Fix documentation heading as release separate from testing
ArBridgeman Aug 25, 2025
e151c3f
Add to developer guide & increase test run to see if that helps, thou…
ArBridgeman Aug 25, 2025
0f21f75
add nice line break
ArBridgeman Aug 25, 2025
f36677b
fix doc/changes/unreleased.md
ArBridgeman Aug 25, 2025
a5b5bfa
Fix developer guide documentation
ArBridgeman Aug 25, 2025
ae7f36c
Bump local file to 15 rounds
ArBridgeman Aug 25, 2025
cbad83e
TO DROP - test running multiple times in different runs
ArBridgeman Aug 25, 2025
5371a3e
Output nearly all statistics values
ArBridgeman Aug 25, 2025
db625ec
Add warm up round to handled first run being faster
ArBridgeman Sep 1, 2025
d283a15
Truncate table each iteration to cleanup, so all have same final size
ArBridgeman Sep 1, 2025
c75e80a
Merge branch 'master' into develop
ArBridgeman Sep 1, 2025
87e70dc
Merge branch 'develop' into feature/211-benchmark-test-import-from-pa…
ArBridgeman Sep 1, 2025
0b4b689
Update benchmarks from CI after latest changes
ArBridgeman Sep 1, 2025
1bcfb0a
DROP; just for illustrative purposes
ArBridgeman Sep 2, 2025
6c5b0ee
Switch to v1 for performance tests
ArBridgeman Sep 2, 2025
e3c539a
Merge branch 'master' into develop
ArBridgeman Sep 3, 2025
67f4708
Add more runs
tkilias Sep 7, 2025
d52e431
Merge branch 'develop' into feature/211-benchmark-test-import-from-pa…
tkilias Sep 8, 2025
488ae45
Merge branch 'master' into feature/211-benchmark-test-import-from-par…
ArBridgeman Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
permissions:
contents: read
steps:
- name: "Checkout repo"
- name: Check out repo
uses: actions/checkout@v2

- name: Setup Python & Poetry Environment
Expand All @@ -36,19 +36,15 @@ jobs:
id: fix-vm-crash
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: "Start test db"
- name: Start test db
run: >
poetry run -- itde spawn-test-environment --environment-name test
--database-port-forward 8563 --bucketfs-port-forward 2580
--docker-db-image-version ${{ matrix.exasol-version }} --db-mem-size 4GB
poetry run -- nox -s db:start -- --db-version ${{ matrix.exasol-version }}

- name: "Wait for Exasol container (UDF extraction)"
- name: Wait for Exasol container (UDF extraction)
run: poetry run -- python examples/_wait_container.py

- name: "Run examples"
run: |
poetry run -- nox -s run:examples
- name: Run examples
run: poetry run -- nox -s run:examples

- name: "Stop test db"
run: |
docker kill db_container_test
- name: Stop test db
run: poetry run -- nox -s db:stop
8 changes: 7 additions & 1 deletion .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ jobs:
permissions:
contents: read

performance-checks:
needs: [ run-slow-tests ]
uses: ./.github/workflows/performance-checks.yml
permissions:
contents: read

# This job ensures inputs have been executed successfully.
approve-merge:
name: Allow Merge
runs-on: ubuntu-24.04
permissions:
contents: read
# If you need additional jobs to be part of the merge gate, add them below
needs: [ fast-checks, slow-checks, examples, ssl_cert ]
needs: [ fast-checks, slow-checks, examples, ssl_cert, performance-checks ]

# Each job requires a step, so we added this dummy step.
steps:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/performance-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Performance-Checks

on:
workflow_call:

jobs:
performance-checks:
name: Performance-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}), Run-${{ matrix.run-number }}
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
exasol-version: ["8.32.0"]
run-number: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"]
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v2

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
with:
python-version: ${{ matrix.python-version }}
extras: "all"

- name: Start test db
run: >
poetry run -- nox -s db:start -- --db-version ${{ matrix.exasol-version }}

- name: Run performance tests
run: poetry run -- nox -s performance:test

- name: Upload Artifacts
uses: actions/[email protected]
with:
name: performance-python${{ matrix.python-version }}-exasol${{ matrix.exasol-version}}-run${{ matrix.run-number }}
path: test/performance/.benchmarks/0002_performance.json
include-hidden-files: true

- name: Stop test db
run: poetry run -- nox -s db:stop

- name: Run performance check against saved reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we save the file?

Copy link
Collaborator Author

@ArBridgeman ArBridgeman Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Currently, we save the reference file in the repo itself under test/performance/.benchmarks/Linux-CPython-3.11-64bit/0001_benchmark_performance.json.
  2. When the CI is executed, the file generated from executing the performance tests is uploaded to the GitHub Action.
  3. If the poetry run -- nox -s performance:check failed, a developer would need to compare the results of the tests & the changes in the PR to determine if the changes were reasonable or not.
  4. If the change in performance were reasonable, then the developer would overwrite test/performance/.benchmarks/Linux-CPython-3.11-64bit/0001_benchmark_performance.json with the results uploaded to the GitHub action in 1.

I don't think it makes sense for us to automate step 2-3, as the changes should be considered and purposefully applied.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we should describe the process in the developer guide

run: poetry run -- nox -s performance:check
21 changes: 11 additions & 10 deletions .github/workflows/ssl_cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
permissions:
contents: read
steps:
- name: "Checkout repo"
- name: Check out repo
uses: actions/checkout@v2

- name: Setup Python & Poetry Environment
Expand All @@ -32,18 +32,19 @@ jobs:
python-version: ${{ matrix.python-version }}
extras: "all"

- name: "Start test db"
- name: Start test db
run: >
poetry run -- itde spawn-test-environment --environment-name ssl
--database-port-forward 8563 --bucketfs-port-forward 2580
--docker-db-image-version ${{ matrix.exasol-version }} --db-mem-size 4GB
--create-certificates
poetry run -- nox -s db:start -- --db-version ${{ matrix.exasol-version }}
--with-certificate

- name: "Pull certificate from container"
run: docker cp db_container_ssl:/certificates/rootCA.crt .
- name: Pull certificate from container
run: docker cp db_container_test:/certificates/rootCA.crt .

- name: "Setup custom host"
- name: Set up custom host
run: echo "127.0.0.1 exasol-test-database" | sudo tee -a /etc/hosts

- name: "Run test"
- name: Run test
run: poetry run -- python examples/_ssl_test.py

- name: Stop test db
run: poetry run -- nox -s db:stop
1 change: 1 addition & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

## ✨Features
* #208: Added `ExaConnection.import_from_parquet` which can read parquet file(s)
* #220: Added performance tests & checks for http_transport export & import methods via nox sessions `performance:test` and `performance:check`
37 changes: 36 additions & 1 deletion doc/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,47 @@ Integration Tests

Passing additional arguments to pytest works the same as for the unit tests.

Performance Tests
-----------------

The CI executes and compares the results of the performance tests in `performance-checks.yml`,
using two nox sessions:

* ``performance:test`` - this uses the ``pytest-benchmark`` to capture the results
of the **current CI run** in ``test/performance/.benchmarks/0002_performance.json``
* ``performance:check`` - this utilizes scipy's implementation of the Wilcoxon
signed-rank test to determine if the results in the **current CI run** are statistically
similar to the **saved reference results** in ``test/performance/.benchmarks/0001_performance.json``.
If a test is not present in both the **current CI run** and **saved reference results**,
this is noted as an error.

If the results of executing ``nox -s performance:check`` breaks a build, this requires
manual checks from a developer:

#. When the CI run was executed, the file generated from executing the performance tests
is uploaded to the GitHub Action as an artifact, ``performance-python${{ python-version }}-exasol${{ exasol-version}}``.
The developer should retrieve this file and compare the results to the **saved reference results**.
#. If the changed results can be explained by significant differences in the CI runner
or expected changes in the implementation, then the developer would overwrite the **saved reference results**
with the GitHub Action artifact.

.. note::

As the results of performance tests can vary by machine & the active environment on said machine,
the performance tests are benchmarked against the CI runner, and the reference results are saved
in ``test/performance/.benchmarks/0001_performance.json`` of the repository.
Naturally, this makes the results dependent upon the consistency & stability of GitHub's runners.
While it may not cover all use cases, the results saved by the ``nox -s performance:test`` include
the machine information, which may help developers determine if the observed shift in performance results
could have resulted from differences in the past and current execution of the performance tests
due to apparent macroscopic runner differences.

DB
--
If you manually run some tests or want to try something out, you can start and stop the database manually using ``nox -s db:start`` and ``nox -s db:stop``.

Preparing & Triggering a Release
--------------------------------
++++++++++++++++++++++++++++++++

The `exasol-toolbox` provides nox tasks to semi-automate the release process:

Expand Down
17 changes: 12 additions & 5 deletions noxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@


def start_test_db(
session: Session, port: int = DEFAULT_PORT, db_version: str = DEFAULT_DB_VERSION
session: Session,
port: int = DEFAULT_PORT,
db_version: str = DEFAULT_DB_VERSION,
with_certificate: bool = True,
) -> None:
# For Docker in a VM setup, refer to the ``doc/user_guide/developer_guide.rst``
session.run(
command = [
"itde",
"spawn-test-environment",
"--create-certificates",
"--environment-name",
CONTAINER_SUFFIX,
"--database-port-forward",
Expand All @@ -31,8 +33,13 @@ def start_test_db(
db_version,
"--db-mem-size",
"4GB",
external=True,
)
]
if with_certificate:
command.append(
"--create-certificates",
)

session.run(*command, external=True)


def stop_test_db(session: Session) -> None:
Expand Down
Loading
Loading