How vaishnavi220506/smartswap works
SmartSwap measures background interference on Windows, attributes stalls to CPU, memory, or storage, and applies verified mitigations to its own background workers. The principal workflow runs from the dashboard through the API and isolated trial runner into measurement, controller decisions, and native process controls; trial results return to the dashboard. The README also documents live monitoring, paired comparisons, reports, and a separate randomized study and analysis workflow. Some API and dashboard details are documented but their implementation excerpts are incomplete, so only evidenced connections are shown.
Main entry points: engine.py Trial engine · app.py Web API · run_study.py Study runner · analyze.py Study analysis
Components 13
Dashboard
- Dashboard UI
frontend/app.js - Web API
backend/app.py - Run database
backend/app.py
Trial runtime
- Isolated runner
backend/trial_runner.py - Trial engine
backend/engine.py
Control and measurement
- Canary and workloads
backend/probes.py - WSI and policy ladder
backend/controller.py - Verified Windows controls
backend/native.py - Statistics
backend/stats.py
Research
- Study runner
research/run_study.py - Study analysis
research/analyze.py - Study artifacts
research/results
Other components
- User
Connections 15
- User → Dashboard UI: uses
README.md - Dashboard UI → Web API: requests
frontend/app.js - Web API → Isolated runner: launches
backend/app.py - Isolated runner → Trial engine: runs
backend/trial_runner.py - Trial engine → Canary and workloads: starts probes
backend/engine.py - Trial engine → WSI and policy ladder: executes decisions
backend/engine.py - Trial engine → Verified Windows controls: applies controls
backend/engine.py - Web API → Trial engine: calibrates
backend/app.py - Web API → Run database: persists runs
backend/app.py - Web API → Statistics: uses statistics
backend/app.py - Trial engine → Web API: returns trial data
backend/app.py - Study runner → Trial engine: runs trials
research/run_study.py - Study analysis → Statistics: uses statistics
research/analyze.py - Study analysis → Study artifacts: writes analysis
- Study runner → Study artifacts: records trials