This guide will help you get up and running with InfiniMetrics in minutes.
Before you begin, ensure you have:
- Python 3.8+ installed
- Git installed (for cloning the repository)
- GPU (optional, for hardware tests)
git clone https://github.com/InfiniTensor/InfiniMetrics.git
cd InfiniMetricsgit submodule update --init --recursive# Core dependencies
pip install numpy torch pandas
# Optional: For vLLM support
pip install vllmIf you plan to run hardware tests:
cd infinimetrics/hardware/cuda-memory-benchmark
bash build.shRun a comprehensive hardware benchmark with a single command:
python main.py format_input_comprehensive_hardware.jsonThis will test:
- Memory bandwidth (H2D, D2H, D2D, bidirectional)
- STREAM benchmark
- GPU cache performance
Run an inference benchmark:
cd infinimetrics/inference
python infer_main.py --config config.jsonResults are saved in:
./summary_output/
└── dispatcher_summary_YYYYMMDD_HHMMSS.json # Overall summary
./output/
└── <test_case_name>/
├── seperated_test_result.json # Seperated test result
└── metrics.csv # Timeseries metrics
{
"total_tests": 1,
"successful_tests": 1,
"failed_tests": 0,
"results": [{
"run_id": "test_001",
"testcase": "hardware.cudaUnified.Comprehensive",
"result_code": 0,
"result_file": "./output/hardware.cudaUnified.Comprehensive/metrics.json"
}]
}InfiniMetrics supports storing test results in MongoDB for persistent storage and dashboard visualization.
# Install MongoDB dependencies
pip install pymongo watchdog
# Ensure MongoDB is running locally or set connection URL
export MONGO_URI="mongodb://localhost:27017"# Start file watcher (auto-import new results, runs forever)
python -m db.watcher --output-dir ./output --summary-dir ./summary_output
# One-time scan only (import existing files and exit)
python -m db.watcher --scanfrom pathlib import Path
from db.watcher import Watcher
# Create watcher and start monitoring
watcher = Watcher(
output_dir=Path("./output"),
summary_dir=Path("./summary_output")
)
# One-time scan
result = watcher.scan()
print(f"Imported: {len(result['imported'])}")
# Or run forever (auto-import new files)
watcher.run_forever() # Blocks until Ctrl+C| Variable | Default | Description |
|---|---|---|
MONGO_URI |
mongodb://localhost:27017 |
MongoDB connection URL |
MONGO_DB_NAME |
infinimetrics |
Database name |
MONGO_COLLECTION |
test_runs |
Test results collection |
- Configure Tests: See Configuration Guide for customization