Benchmarks

Performance improvements and regressions of vmecpp can be tracked below on a per-commit basis. A larger set of benchmarks against VMEC2000 can be found at proximafusion/vmecpp-benchmarks. A small but representative set of benchmarks runs automatically on every push to main and on pull requests, using pytest-benchmark and github-action-benchmark.

Benchmark suite

Benchmark

Description

test_bench_cli_startup

CLI startup time (vmecpp -h)

test_bench_cli_invalid_input

CLI error path (vmecpp invalid_input)

test_bench_fixed_boundary_w7x

Fixed-boundary W7-X equilibrium (5-period stellarator, mpol=12, ntor=12, ns=99)

test_bench_fixed_boundary_cma

Fixed-boundary CMA equilibrium (stellarator, ntor=6, mpol=5)

test_bench_response_table_from_coils

Magnetic field response table creation from coils file

test_bench_free_boundary

Free-boundary solve with pre-computed response table

Loading benchmark data...

Click on any data point to open the corresponding commit.

Running locally

pip install -e .[benchmark]
pytest benchmarks/test_benchmarks.py -v

To produce a JSON report:

pytest benchmarks/test_benchmarks.py --benchmark-json=benchmark_results.json