How yash45615/continuous-performance-benchmarking-regression-detection-platform works
This repository is a continuous performance benchmarking and regression-analysis platform, with an instrumented product API as a workload target. The documented workflow runs repeatable workloads, compares measurements to baselines, investigates regressions, triages ownership, reports findings, and applies CI gates. API routing, benchmark persistence, regression analysis, profiling/database investigation, and reporting are represented; several workflow links remain undocumented in the sampled source, so they are omitted or shown as unverified. The README documents Locust and metrics capabilities, while the benchmark-runner implementation is not present in the supplied tree.
Main entry points: database.py Database Session · main.py FastAPI Service · detector.py Regression Detector · products.py Product Endpoints
Components 24
Product API
- FastAPI Service
backend/app/main.py - Product Endpoints
backend/app/routes/products.py - Product Model
backend/app/models/product.py - Prometheus Metrics
backend/app/main.py
Benchmark Data
- Benchmark Endpoints
backend/app/routes/benchmarks.py - Run Service
backend/app/services/benchmark_service.py - Metric Model
backend/app/models/benchmark_metric.py - Database Session
backend/app/database.py - Runtime Settings
backend/app/config.py
Regression Analysis
- Baseline Management
regression/baseline.py - Variance & Noise
regression/variance.py - Environment Comparison
regression/environment.py - Regression Detector
regression/detector.py
Profiling & Triage
- API Profiler
profiling/profile_api.py - Database Profiler
profiling/profile_database.py - Query Analyzer
profiling/query_analyzer.py - Plan Diff
profiling/plan_diff.py - Regression Analysis
triage/analyzer.py - Owner Routing
triage/router.py
Reports & Gates
- Report Generator
reports/generator.py - CI Performance Gate
scripts/performance_gate.py
Other components
- Engineer
- Locust Workload
load_tests/locustfile.py - PostgreSQL
Connections 26
- Engineer → Locust Workload: starts workload
- Locust Workload → FastAPI Service: sends traffic
- FastAPI Service → Product Endpoints: registers routes
backend/app/main.py - FastAPI Service → Benchmark Endpoints: registers routes
backend/app/main.py - FastAPI Service → Database Session: creates tables
backend/app/main.py - FastAPI Service → Prometheus Metrics: exposes metrics
backend/app/main.py - Product Endpoints → Database Session: queries via
backend/app/routes/products.py - Product Endpoints → Product Model: queries
backend/app/routes/products.py - Benchmark Endpoints → Run Service: delegates to
backend/app/routes/benchmarks.py - Benchmark Endpoints → Database Session: injects session
backend/app/routes/benchmarks.py - Run Service → Database Session: persists runs
backend/app/services/benchmark_service.py - Metric Model → Database Session: uses base
backend/app/models/benchmark_metric.py - Database Session → Runtime Settings: reads URL
backend/app/database.py - Database Session → PostgreSQL: connects
- Engineer → Baseline Management: sets baseline
- Baseline Management → Regression Detector: compared by
- Variance & Noise → Regression Detector: informs confidence
- Environment Comparison → Regression Detector: checks comparability
- Engineer → API Profiler: investigates
- Engineer → Database Profiler: investigates
- Database Profiler → Query Analyzer: analyzes queries
- Query Analyzer → Plan Diff: compares plans
- Regression Detector → Regression Analysis: triages regression
- Regression Analysis → Owner Routing: routes owner
triage/full_triage.py - Engineer → Report Generator: requests report
- Engineer → CI Performance Gate: runs gate