(documentation generated by Claude Code)
A comprehensive benchmarking and performance analysis framework designed for OpenShift/Kubernetes environments. Matrix Benchmarking provides tools for downloading, parsing, analyzing, and visualizing performance data with support for long-term storage and advanced statistical analysis.
- Benchmark Execution: Run performance benchmarks in Kubernetes/OpenShift environments
- Data Collection: Download and scrape benchmark data from multiple sources
- Result Parsing: Parse Prometheus metrics and other benchmark outputs
- Data Analysis: Statistical analysis with multiple methods (standard deviation, Z-score, Hunter anomaly detection)
- Visualization: Generate interactive web-based reports and visualizations
- Long-term Storage: Schema generation and data management for historical analysis
- Middleware CI: Scrape data from middleware continuous integration systems
- OpenShift CI: Integration with OpenShift CI pipelines
- S3 Storage: Download benchmark data from S3-compatible storage
- Prometheus: Direct integration with Prometheus metrics
- Hunter: Advanced anomaly detection algorithm
- Standard Deviation: Statistical variance analysis
- Z-Score: Standardized score analysis
- Custom Methods: Extensible framework for additional analysis approaches
- Python 3.7+
- Access to Kubernetes/OpenShift cluster (for benchmark execution)
- Prometheus instance (for metrics collection)
Install required Python packages:
pip install -r requirements.txtKey dependencies include:
pandas- Data manipulation and analysisdash- Web-based interactive visualizationsplotly- Plotting and chartingfire- CLI frameworkprometheus_api_client- Prometheus integrationpydantic- Data validationopensearch-py- OpenSearch integrationboto3- AWS S3 integration
Matrix Benchmarking provides a command-line interface with multiple subcommands:
# Run benchmarks
python -m matrix_benchmarking benchmark --workload <workload_name> --run
# Download benchmark data
python -m matrix_benchmarking download --source <source_type>
# Parse benchmark results
python -m matrix_benchmarking parse --results-dir <path_to_results>
# Generate visualizations
python -m matrix_benchmarking visualize --results-dir <path_to_results>
# Analyze data with long-term storage
python -m matrix_benchmarking analyze_lts --method <analysis_method># Upload data to long-term storage
python -m matrix_benchmarking upload_lts --data-dir <path_to_data>
# Download from long-term storage
python -m matrix_benchmarking download_lts --output-dir <output_path>
# Generate storage schema
python -m matrix_benchmarking generate_lts_schema --config <config_file># General help
python -m matrix_benchmarking --help
# Command-specific help
python -m matrix_benchmarking benchmark --helpMatrix Benchmarking uses YAML configuration files for:
- Benchmark definitions
- Data source configurations
- Analysis parameters
- Visualization settings
Example configuration structure:
workload:
name: "performance_test"
parameters:
# Workload-specific parameters
data_sources:
prometheus:
url: "http://prometheus:9090"
analysis:
methods:
- hunter
- stdev
- zscorematrix_benchmarking/- Main packagebenchmark.py- Benchmark execution logicdownload.py- Data downloading orchestrationparse.py- Result parsing utilitiesvisualize.py- Visualization generationanalyze_lts.py- Long-term storage analysisupload_lts.py- Long-term storage uploadsdownload_lts.py- Long-term storage downloadsgenerate_lts_schema.py- Schema generation
-
downloading/- Data acquisitionscrape/- Web scraping utilitiesmiddleware_ci.py- Middleware CI integrationocp_ci.py- OpenShift CI integrations3.py- S3 storage integration
-
exec/- Execution utilitieskube.py- Kubernetes operationsprom.py- Prometheus queriescommon.py- Shared execution logic
-
parsing/- Data parsingprom.py- Prometheus metrics parsing
-
plotting/- Visualizationui/- User interface componentsweb.py- Web-based dashboardsreport.py- Report generation
-
store/- Data storagesimple.py- Simple file-based storageprom_db.py- Prometheus database integration
-
analyze/- Analysis methodsmethod/- Statistical analysis implementationshunter.py- Hunter anomaly detectionstdev.py- Standard deviation analysiszscore.py- Z-score analysis
Matrix Benchmarking includes a web-based interface for:
- Interactive data exploration
- Real-time visualization updates
- Report generation and sharing
- Performance trend analysis
Access the web interface by running the visualize command with web output enabled.
matrix_benchmarking/
├── matrix_benchmarking/ # Main package
│ ├── analyze/ # Analysis methods
│ ├── downloading/ # Data acquisition
│ ├── exec/ # Execution utilities
│ ├── parsing/ # Data parsing
│ ├── plotting/ # Visualization
│ └── store/ # Data storage
├── utils/ # Utility modules
├── requirements.txt # Python dependencies
└── README.md # This file
To add a new analysis method:
- Create a new file in
matrix_benchmarking/analyze/method/ - Implement the analysis interface
- Register the method in the analysis framework
- Add tests and documentation
To support a new data source:
- Create a scraper in
matrix_benchmarking/downloading/scrape/ - Implement the downloading interface
- Add configuration support
- Update documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is part of the TOPSAIL project under the OpenShift PSAP organization.
For issues, questions, or contributions, please refer to the OpenShift PSAP team or create an issue in the repository.