Merge pull request #289 from ZohaibHassan16/feature/perf-suite

Introduces a comprehensive, environment-agnostic benchmarking suite for Semantica.

Includes modular benchmarking across core layers, CI-safe mocking,
statistical regression detection, and automated performance auditing.

Fixes #231

Co-authored-by: Zohaib Hassan <zohaibhassan16@users.noreply.github.com> 
Co-authored-by: Mohd Kaif <kaifahmad087@gmail.com>
This commit is contained in:
Mohd Kaif
2026-02-07 18:18:04 +05:30
committed by GitHub
co-authored by Zohaib Hassan Mohd Kaif
58 changed files with 22483 additions and 1 deletions
+51
View File
@@ -0,0 +1,51 @@
name: Semantica Performance Suite
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
performance-test:
name: Benchmark Runner (Ubuntu/Python 3.12)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install Dependencies
env:
BENCHMARK_REAL_LIBS: "1"
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r benchmarks/requirements.txt
python -m spacy download en_core_web_sm
pip install rdflib neo4j faiss-cpu torch pyarrow pdfplumber python-pptx openpyxl lxml python-docx beautifulsoup4 chardet langdetect
- name: Execute Benchmarks (Real Mode)
env:
BENCHMARK_REAL_LIBS: "1"
run: |
python benchmarks/benchmarks_runner.py
# Optional: Compare to baseline (requires previous run artifact)
# pytest-benchmark --storage file://benchmarks/results --benchmark-compare
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
if: always()
with:
name: benchmark-report-${{ github.run_id }}
path: benchmarks/results
retention-days: 30