Skip to content

Commit 201857f

Browse files
authored
[scripts] A re-write of the benchmarks script (#53)
* [script] Renew the runBenchmarks_script.py * [doc] Document script usage * Fix formatting in Scripts.md for benchmark usage Updated documentation for runBenchmarks_script.py usage.
1 parent 3142877 commit 201857f

2 files changed

Lines changed: 343 additions & 79 deletions

File tree

doc/Scripts.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Scripts Folder Contents
2+
3+
The Scripts folder has a collection of python scripts to provide basic utilities.
4+
5+
## runBenchmarks_script.py
6+
7+
```
8+
SOFA Scene Benchmarking Tool
9+
10+
Usage:
11+
python benchmark.py -config benchmark.json
12+
python benchmark.py -config benchmark.json -n_tests 10 -timeout 180
13+
14+
Config file format (JSON):
15+
{
16+
"sofa_exe": "runSofa",
17+
"iterations": 110,
18+
"n_tests": 5,
19+
"warmup": 2,
20+
"timeout": 120,
21+
"output": "log.benchmark",
22+
"cases": [
23+
{ "name": "baseline", "scene": "scene_baseline.scn" },
24+
{ "name": "refactored", "scene": "scene_refactored.scn" }
25+
]
26+
}
27+
28+
- `sofa_exe`: command to run (to choose SOFA version).
29+
- Default: `runSofa`
30+
- `iterations`: # of time steps to run in batch mode.
31+
- `n_tests`: # of tests to run. Mean & std of FPS are computed.
32+
- `warmup`: # of times to do a dry run to avoid false reports due to caching.
33+
- Default: 2
34+
- `timeout`: # seconds to run before killing process. For stale runs that crashed.
35+
- `output`: Name of the file to report results.
36+
- Default: "log.benchmark"
37+
- `cases`: Which scene files to use
38+
39+
40+
All top-level config keys can be overridden individually via CLI arguments.
41+
```

0 commit comments

Comments
 (0)