Automated software application performance regression detection system using Machine Learning (XGBoost Regressor + Classifier), Statistical Baselines, SHAP Explainability, FastAPI, SQLAlchemy, Streamlit, and Continuous Learning MLOps pipelines.
- Dual Machine Learning Engine:
- XGBoost Regressor: Predicts expected performance metric (e.g. baseline response time) given system metrics context.
- XGBoost Classifier: Classifies whether a version exhibits a regression.
- Statistical Baseline Detector:
- Z-score and percentage change fallback detection mechanism.
- Multi-Metric Severity Classifier:
- Classifies regressions into
LOW,MEDIUM,HIGH, orCRITICALacross 7 key metrics:response_time,cpu_usage,memory_usage,error_rate,throughput,latency, andrequest_count.
- Classifies regressions into
- SHAP Explainability:
- Identifies specific contributing factors (e.g., CPU ↑ 55%, Error Rate ↑ 220%).
- Continuous Learning Loop:
- Automated model retraining on new release observations with challenger vs. production model promotion.
- FastAPI Backend:
- Interactive REST API with
/predict,/detect-regression,/models, and/healthendpoints.
- Interactive REST API with
- Streamlit Web Dashboard:
- Interactive visual graphs (Plotly) and version analyzer UI.
- DevOps Ready:
- Docker, Docker Compose, and GitHub Actions CI.
Application / Load Tests / CI
│
▼
Data Generator / CSV
│
▼
Data Preprocessing
(Cleaning, Outliers, Bounds)
│
▼
Feature Engineering
(Rolling Stats, Z-scores)
│
▼
┌──────────────────────────────────┐
│ ML Detection Engine │
│ XGBoost Regressor + Classifier │
│ + │
│ Statistical Baseline Engine │
└─────────────────┬────────────────┘
│
▼
Regression Engine
+ SHAP Explainability
│
┌──────────────┴──────────────┐
▼ ▼
FastAPI REST API Streamlit Dashboard
Clone the repository and install dependencies:
git clone https://github.com/your-username/regression-detection-system.git
cd regression-detection-system
pip install -r requirements.txt# 1. Generate realistic synthetic metrics across versions v1.0 -> v1.9
python src/data/generator.py
# 2. Train XGBoost Regressor and Classifier models
python src/models/train.pypytest tests/ -vuvicorn app.main:app --reload --port 8000- Open Swagger API Documentation:
http://localhost:8000/docs
streamlit run dashboard/app.py- Access Dashboard UI:
http://localhost:8501
docker-compose up --buildGET /health— Application and model health statusPOST /predict— Model performance baseline predictionPOST /detect-regression— Full multi-metric version regression analysisGET /regressions— List detected historical regression eventsGET /models— Model registry listPOST /models/retrain— Trigger continuous retraining loop