Skip to content

Commit a05a1fd

Browse files
authored
Merge pull request #22 from Point72/tkp/fix
More cleanup, fix up readme, add dedicated hetzner machines for more stable results
2 parents 890d2b9 + d0ccdff commit a05a1fd

4 files changed

Lines changed: 143 additions & 17 deletions

File tree

.github/workflows/benchmarks.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Benchmarks
22

33
on:
4-
# Run on schedule - weekly benchmarks
5-
schedule:
6-
- cron: '0 2 * * 0' # Every Sunday at 2 AM UTC
7-
84
# Manual trigger with options
95
workflow_dispatch:
106
inputs:
@@ -22,8 +18,16 @@ on:
2218
default: 'cx23'
2319
type: choice
2420
options:
25-
- 'cx23' # 2 vCPU, 4GB RAM
26-
- 'cx43' # 8 vCPU, 16GB RAM
21+
- 'cx23' # 2 vCPU, 4GB RAM (shared)
22+
- 'cx33' # 4 vCPU, 8GB RAM (shared)
23+
- 'cx43' # 8 vCPU, 16GB RAM (shared)
24+
- 'cx53' # 16 vCPU, 32GB RAM (shared)
25+
- 'ccx13' # 2 vCPU, 8GB RAM (dedicated AMD EPYC)
26+
- 'ccx23' # 4 vCPU, 16GB RAM (dedicated AMD EPYC)
27+
- 'ccx33' # 8 vCPU, 32GB RAM (dedicated AMD EPYC)
28+
- 'ccx43' # 16 vCPU, 64GB RAM (dedicated AMD EPYC)
29+
- 'ccx53' # 32 vCPU, 128GB RAM (dedicated AMD EPYC)
30+
- 'ccx63' # 48 vCPU, 192GB RAM (dedicated AMD EPYC)
2731
commit_range:
2832
description: 'Commit range to benchmark (e.g., HEAD~5..HEAD)'
2933
required: false
@@ -96,7 +100,7 @@ jobs:
96100
97101
# Full benchmarks on Hetzner Cloud
98102
benchmark-hetzner:
99-
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.use_hetzner == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/main')
103+
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.use_hetzner == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/main')
100104
runs-on: ubuntu-latest
101105

102106
steps:

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ python -m csp_benchmarks.hetzner.cli cleanup
146146

147147
Benchmarks run automatically:
148148

149-
- **Weekly**: Full benchmarks on Hetzner Cloud (Sunday 2 AM UTC)
150149
- **On push to main**: Benchmarks for the new commit
151150
- **Manual trigger**: Via workflow_dispatch with custom options
152151

@@ -158,7 +157,75 @@ View the latest results at: <https://csp-community.github.io/csp-benchmarks/>
158157

159158
## Contributing
160159

160+
### Adding New Benchmarks
161+
161162
1. Add new benchmarks to the `benchmarks/` directory
162163
1. Follow ASV naming conventions (`bench_*.py`, class names ending in `Suite`)
163164
1. Use parameterized benchmarks for testing across different configurations
164165
1. Run `make benchmark-local` to test your benchmarks before submitting
166+
167+
### Contributing Machine Results
168+
169+
You can contribute benchmark results from your own machine to help the community understand csp performance across different hardware configurations.
170+
171+
#### Step 1: Register Your Machine
172+
173+
Add your machine to `csp_benchmarks/asv-machine.json`. Use a unique, descriptive name:
174+
175+
```json
176+
{
177+
"timkpaine-framework-13": {
178+
"arch": "x86_64",
179+
"cpu": "AMD Ryzen AI 9 HX 370 (24 cores)",
180+
"machine": "timkpaine-framework-13",
181+
"num_cpu": "24",
182+
"os": "Ubuntu 24.04",
183+
"ram": "64GB"
184+
}
185+
}
186+
```
187+
188+
Machine naming convention: `username-device-model` (e.g., `timkpaine-framework-13`, `johndoe-mbp-m3`)
189+
190+
#### Step 2: Run Benchmarks
191+
192+
```bash
193+
# Install dependencies
194+
pip install -e ".[develop]"
195+
196+
# Copy machine config to ASV location
197+
cp csp_benchmarks/asv-machine.json ~/.asv-machine.json
198+
199+
# Run benchmarks with your machine name
200+
python -m asv run --config csp_benchmarks/asv.conf.json --machine your-machine-name
201+
202+
# Or use make (runs with local Python)
203+
make benchmark-local
204+
```
205+
206+
#### Step 3: Verify Results
207+
208+
```bash
209+
# Check that results were created
210+
ls csp_benchmarks/results/your-machine-name/
211+
212+
# Preview the results locally
213+
make benchmark-view
214+
```
215+
216+
#### Step 4: Submit a Pull Request
217+
218+
1. Fork the repository
219+
1. Create a branch: `git checkout -b add-machine-results`
220+
1. Commit your changes:
221+
- `csp_benchmarks/asv-machine.json` (your machine entry)
222+
- `csp_benchmarks/results/your-machine-name/` (your result files)
223+
1. Open a PR with a description of your hardware
224+
225+
#### Tips for Consistent Results
226+
227+
- Close other applications during benchmarking
228+
- Run on AC power (not battery) for laptops
229+
- Ensure stable CPU frequency (disable turbo boost for more consistent results)
230+
- Run multiple times and verify results are stable
231+
- Include your OS version and Python version in the PR description

csp_benchmarks/asv-machine.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"os": "Ubuntu 24.04",
1616
"ram": "4GB"
1717
},
18+
"hetzner-cx33": {
19+
"arch": "x86_64",
20+
"cpu": "Intel/AMD (4 vCPU)",
21+
"machine": "hetzner-cx33",
22+
"num_cpu": "4",
23+
"os": "Ubuntu 24.04",
24+
"ram": "8GB"
25+
},
1826
"hetzner-cx43": {
1927
"arch": "x86_64",
2028
"cpu": "Intel/AMD (8 vCPU)",
@@ -23,6 +31,62 @@
2331
"os": "Ubuntu 24.04",
2432
"ram": "16GB"
2533
},
34+
"hetzner-cx53": {
35+
"arch": "x86_64",
36+
"cpu": "Intel/AMD (16 vCPU)",
37+
"machine": "hetzner-cx53",
38+
"num_cpu": "16",
39+
"os": "Ubuntu 24.04",
40+
"ram": "32GB"
41+
},
42+
"hetzner-ccx13": {
43+
"arch": "x86_64",
44+
"cpu": "AMD EPYC (2 dedicated vCPU)",
45+
"machine": "hetzner-ccx13",
46+
"num_cpu": "2",
47+
"os": "Ubuntu 24.04",
48+
"ram": "8GB"
49+
},
50+
"hetzner-ccx23": {
51+
"arch": "x86_64",
52+
"cpu": "AMD EPYC (4 dedicated vCPU)",
53+
"machine": "hetzner-ccx23",
54+
"num_cpu": "4",
55+
"os": "Ubuntu 24.04",
56+
"ram": "16GB"
57+
},
58+
"hetzner-ccx33": {
59+
"arch": "x86_64",
60+
"cpu": "AMD EPYC (8 dedicated vCPU)",
61+
"machine": "hetzner-ccx33",
62+
"num_cpu": "8",
63+
"os": "Ubuntu 24.04",
64+
"ram": "32GB"
65+
},
66+
"hetzner-ccx43": {
67+
"arch": "x86_64",
68+
"cpu": "AMD EPYC (16 dedicated vCPU)",
69+
"machine": "hetzner-ccx43",
70+
"num_cpu": "16",
71+
"os": "Ubuntu 24.04",
72+
"ram": "64GB"
73+
},
74+
"hetzner-ccx53": {
75+
"arch": "x86_64",
76+
"cpu": "AMD EPYC (32 dedicated vCPU)",
77+
"machine": "hetzner-ccx53",
78+
"num_cpu": "32",
79+
"os": "Ubuntu 24.04",
80+
"ram": "128GB"
81+
},
82+
"hetzner-ccx63": {
83+
"arch": "x86_64",
84+
"cpu": "AMD EPYC (48 dedicated vCPU)",
85+
"machine": "hetzner-ccx63",
86+
"num_cpu": "48",
87+
"os": "Ubuntu 24.04",
88+
"ram": "192GB"
89+
},
2690
"timkpaine-mbp-m2": {
2791
"arch": "arm64",
2892
"cpu": "Apple M2 (8 cores)",

csp_benchmarks/results/TP11251-M2/machine.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)