Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f5a61cf
feat(spp_cel_load_testing): import module from openspp-modules
gonzalesedwin1123 Aug 18, 2026
e8ab56d
fix(spp_cel_load_testing): drop unused spp_load_testing dep, update p…
gonzalesedwin1123 Aug 18, 2026
5670d38
fix(spp_cel_load_testing): target OpenSPP2 studio pack models in vali…
gonzalesedwin1123 Aug 18, 2026
90724b6
fix(spp_cel_load_testing): make scripts layout-neutral for OpenSPP2
gonzalesedwin1123 Aug 18, 2026
e911cf9
fix(spp_cel_load_testing): satisfy OpenSPP2 lint gates
gonzalesedwin1123 Aug 18, 2026
bad349e
fix(spp_cel_load_testing): never execute captured DML in ExplainAnalyzer
gonzalesedwin1123 Aug 18, 2026
3f6b700
fix(spp_cel_load_testing): un-skip variable resolver suite (falsy rec…
gonzalesedwin1123 Aug 18, 2026
2c24dd1
fix(spp_cel_load_testing): isolate concurrency test from the shared c…
gonzalesedwin1123 Aug 18, 2026
3e7d893
fix(spp_cel_load_testing): validate the OpenSPP2 logic_data contract
gonzalesedwin1123 Aug 18, 2026
b1f4d7d
fix(spp_cel_load_testing): domain-translate only filter-type pack items
gonzalesedwin1123 Aug 18, 2026
06ff707
test(spp_cel_load_testing): log which pack items have unresolved vari…
gonzalesedwin1123 Aug 18, 2026
7556463
fix(spp_cel_load_testing): calibrate perf thresholds to CI runners; a…
gonzalesedwin1123 Aug 18, 2026
0657b81
test(spp_cel_load_testing): unit-test the analysis package; fix codec…
gonzalesedwin1123 Aug 18, 2026
b97b04d
test(spp_cel_load_testing): cover remaining analysis-package branches
gonzalesedwin1123 Aug 18, 2026
e7a1fe7
chore(spp_cel_load_testing): version 19.0.2.0.0 + full changelog
gonzalesedwin1123 Aug 18, 2026
622d6c9
chore(spp_cel_load_testing): apply CI README rendering for 19.0.2.0.0…
gonzalesedwin1123 Aug 18, 2026
a2da60d
fix(spp_cel_load_testing): address review (emjay0921) — all findings …
gonzalesedwin1123 Aug 18, 2026
196a20f
docs(spp_cel_load_testing): apply CI README rendering for review-fix …
gonzalesedwin1123 Aug 18, 2026
419752d
chore(spp_cel_load_testing): calibrate resolver throughput floor to CI
gonzalesedwin1123 Aug 18, 2026
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
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ ignore:
- "**/__manifest__.py"
- "**/migrations/**"
- "scripts/**"
# Module-level CLI tooling (e.g. spp_cel_load_testing/scripts/) is never
# executed in CI; the root pattern above does not match nested dirs.
# Scoped to spp_* modules so vendored/other dirs keep their coverage.
- "spp_*/scripts/**"
205 changes: 205 additions & 0 deletions spp_cel_load_testing/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
========================
OpenSPP CEL Load Testing
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3785b79bfe5a17c32df8bc02460536a436031b5130aa183ea0513122d0f7844a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OpenSPP%2FOpenSPP2-lightgray.png?logo=github
:target: https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_cel_load_testing
:alt: OpenSPP/OpenSPP2

|badge1| |badge2| |badge3|

Performance testing and benchmarking framework for CEL expression
evaluation. Provides test suites for parser, translator, executor,
eligibility, and bulk evaluation performance. Includes database query
analysis tools and CLI scripts for index optimization and benchmark
execution.

Key Capabilities
~~~~~~~~~~~~~~~~

- Test framework with benchmarking utilities, query analysis, and test
data generation using Faker
- Performance test suites for parser, translator, executor, eligibility,
bulk operations, event data, and variable resolver
- Database index analysis via IndexAdvisor with missing index
recommendations for CEL-relevant tables
- Query optimization via ExplainAnalyzer to identify sequential scans
and performance bottlenecks
- CLI scripts for benchmark execution and database index analysis with
table, JSON, and CSV output formats
- Expression templates organized by complexity: simple, medium,
complex_exists, complex_count, complex_aggregate, event-based

Key Models
~~~~~~~~~~

This module defines no Odoo models. It provides Python test utilities
(``PerformanceTestCase``), analysis tools (``QueryCapture``,
``ExplainAnalyzer``, ``IndexAdvisor``, ``SlowQueryTracker``), and CLI
scripts.

Test Suites
~~~~~~~~~~~

================= ======================================================
Suite Tests
================= ======================================================
parser Expression parsing throughput and cache effectiveness
translator CEL-to-SQL translation performance
executor Expression execution on registrant datasets
eligibility Program eligibility evaluation with domain compilation
bulk Bulk evaluation performance at scale
event Event data query performance and temporal expressions
variable_resolver Variable resolution performance and caching
studio_validation Studio logic validation and expression correctness
================= ======================================================

Analysis Tools
~~~~~~~~~~~~~~

+----------------------+-----------------------------------------------+
| Tool | Purpose |
+======================+===============================================+
| ``QueryCapture`` | Intercept and capture SQL queries for |
| | analysis |
+----------------------+-----------------------------------------------+
| ``ExplainAnalyzer`` | Parse EXPLAIN ANALYZE output and identify |
| | issues |
+----------------------+-----------------------------------------------+
| ``IndexAdvisor`` | Recommend missing database indexes for CEL |
| | queries |
+----------------------+-----------------------------------------------+
| ``SlowQueryTracker`` | Track queries exceeding configurable time |
| | thresholds |
+----------------------+-----------------------------------------------+

Configuration
~~~~~~~~~~~~~

After installing:

1. Run benchmarks: ``./scripts/run_benchmarks.py --db mydb --suite all``
2. Check index coverage:
``./scripts/analyze_indexes.py --db mydb --check-existing``
3. Generate missing index DDL:
``./scripts/analyze_indexes.py --db mydb --generate-ddl --output sql``
4. Customize registrant count:
``./scripts/run_benchmarks.py --db mydb --suite all --registrants 5000``

UI Location
~~~~~~~~~~~

No UI components. This module provides test suites executed via Odoo
test runner or CLI scripts in the ``scripts/`` directory.

Security
~~~~~~~~

No security groups or access control. Tests run with the executing
user's permissions.

Extension Points
~~~~~~~~~~~~~~~~

- Inherit ``spp_cel_load_testing.tests.common.PerformanceTestCase`` to
create custom performance tests
- Add expression templates in ``data/expression_templates.py`` following
the complexity categorization pattern
- Extend ``IndexAdvisor.get_recommended_cel_indexes()`` to add
domain-specific index recommendations
- Override ``ExplainAnalyzer`` methods to customize query analysis rules

Dependencies
~~~~~~~~~~~~

``spp_cel_domain``, ``spp_programs``

External Python dependencies: ``faker``

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.

**Table of contents**

.. contents::
:local:

Changelog
=========

19.0.2.0.0
~~~~~~~~~~

- Initial migration to OpenSPP2
- fix(analysis): ``ExplainAnalyzer`` no longer executes the statements
it analyzes — non-SELECT statements get a plan-only ``EXPLAIN``
(previously captured INSERTs were re-executed under
``EXPLAIN ANALYZE``, silently duplicating rows), and every analysis
runs inside a savepoint so a failing EXPLAIN cannot abort the caller's
transaction
- fix(tests): the ADR-008 variable-resolver suite actually runs now (its
availability guard compared a falsy empty recordset and skipped every
test); the concurrency test exercises the shared LRU cache without
racing the test cursor
- fix(tests): studio validation targets the OpenSPP2 studio
(``spp.studio.pack`` models, ``cel_expression``-based ``logic_data``
contract); the legacy ``mode``/``conditions`` schema is asserted
absent
- fix(analysis): ``QueryCapture`` handles the ``SQL`` objects the Odoo
19 ORM passes to ``Cursor.execute`` (previously all ORM traffic was
silently dropped and only hand-written string SQL was captured),
passes through ``log_exceptions`` instead of raising ``TypeError``,
and restores the cursor's real ``execute`` on stop instead of
shadowing it
- fix(analysis): ``analyze_query`` results carry an ``analyzed`` flag so
plan-only (non-SELECT) results are distinguishable from instrumented
clean runs
- test(analysis): unit coverage for the query-capture, slow-query-report
and index-advisor helpers
- chore: performance thresholds calibrated to shared CI runners
(order-of-magnitude regression guards, not tuning targets)

19.0.1.0.0
~~~~~~~~~~

- Initial release (openspp-modules)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OpenSPP/OpenSPP2/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_cel_load_testing%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* OpenSPP.org

Maintainers
-----------

This module is part of the `OpenSPP/OpenSPP2 <https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_cel_load_testing>`_ project on GitHub.

You are welcome to contribute.
3 changes: 3 additions & 0 deletions spp_cel_load_testing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.

from . import analysis
23 changes: 23 additions & 0 deletions spp_cel_load_testing/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.
# pylint: disable=pointless-statement
{
"name": "OpenSPP CEL Load Testing",
"summary": "Performance and validation testing for CEL expressions and studio logic",
"category": "OpenSPP",
"version": "19.0.2.0.0",
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
"license": "LGPL-3",
"development_status": "Alpha",
"depends": [
"spp_cel_domain",
"spp_programs",
],
"external_dependencies": {
"python": ["faker"],
},
"data": [],
"application": False,
"installable": True,
"auto_install": False,
}
6 changes: 6 additions & 0 deletions spp_cel_load_testing/analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.

from . import query_capture
from . import explain_analyzer
from . import index_advisor
from . import slow_query_report
Loading
Loading