415d8b3601f419de5a796615107adc562f404eab
Disk Checker
Disk benchmarking and latency visualization tool for fio and badblocks output.
Features
- Parse fio JSON+ latency CSV files
- Generate histogram and CDF plots
- REST API for remote benchmarking
- Async job management for long-running benchmarks
Installation
git clone <repository>
cd disk-checker
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
CLI Usage
# Basic usage
python -m disk_checker scan_latency.csv
# With options
python -m disk_checker scan_latency.csv --metric read_clat --unit ms --log-x
# Generate CDF
python -m disk_checker scan_latency.csv --cdf
# View all metrics
python -m disk_checker scan_latency.csv --all-metrics
API Usage
# Start the server
python -m disk_checker.scripts.serve --host 0.0.0.0 --port 8000
# Access API docs at http://localhost:8000/docs
API Endpoints
POST /api/v1/scan- Upload CSV and get analysisPOST /api/v1/plot- Generate and return plot imagePOST /api/v1/benchmark- Start a benchmark jobGET /api/v1/jobs/{id}- Check job statusGET /health- Health check
Architecture
disk-checker/
├── src/disk_checker/
│ ├── core/ # Business logic (extractor, converter, helpers, orchestrator)
│ ├── plotting/ # Visualization (matplotlib)
│ ├── web/ # FastAPI backend
│ └── scripts/ # Entry points (cli, serve)
├── tests/ # Test suite
└── data/ # Sample data
Testing
pytest
pytest --cov=disk_checker
pytest --cov=disk_checker --cov-report=html
License
MIT
Description
Languages
Python
100%