Thank you for your interest in contributing to VPSBench!
- Fork the repository
- Clone your fork
- Create a feature branch
- Make your changes
- Submit a pull request
git clone https://github.com/yourusername/vpsbench.git
cd vpsbench
pip install -e ".[dev]"pytest
pytest -v
pytest --cov=vpsbench- Follow PEP 8
- Use type hints
- Keep functions focused and small
- Write docstrings for public APIs
- Use meaningful variable names
- Create a new file in
src/vpsbench/benchmarks/ - Inherit from
BaseBenchmark - Implement
run()andis_available()methods - Add the benchmark to
benchmarks/__init__.py - Register it in
cli.py - Add scoring logic
- Write tests
Example:
from vpsbench.benchmarks.base import BaseBenchmark, BenchmarkResult
class MyBenchmark(BaseBenchmark):
name = "mybench"
category = "mybench"
def run(self) -> BenchmarkResult:
# Your benchmark logic
return BenchmarkResult(
name="My Benchmark",
category="mybench",
metrics={"key": "value"},
score=85,
)- Use the GitHub issue tracker
- Include your OS and Python version
- Include command output
- Describe expected vs actual behavior
- Write clear commit messages
- Include tests for new features
- Update documentation if needed
- Ensure all tests pass
- Keep PRs focused on a single change
By contributing, you agree that your contributions will be licensed under the MIT License.