Checking for performance regressions¶
We provide a simple benchmark script that checks that new versions of LLG3D do not degrade performance.
$ llg3d.bench.compare_commits --help
usage: llg3d.bench.compare_commits [-h] [--reference-commit REFERENCE_COMMIT]
[--solver {numpy,mpi,opencl}] [--debug]
[--np NP] [--launcher LAUNCHER] [--Jx JX]
[--Jy JY] [--Jz JZ] [--n_mean N_MEAN]
[--precision {single,double}] [--N N]
[--skip-reference]
Compare simple benchmark timings between two commits
options:
-h, --help show this help message and exit
--reference-commit REFERENCE_COMMIT
--solver {numpy,mpi,opencl}
--debug Enable debug logging output (default: False)
--np NP Number of processes for MPI solver (default: 1)
--launcher LAUNCHER Launcher command for MPI solver (default: )
--Jx JX Number of grid points in x (default: 300)
--Jy JY Number of grid points in y (default: 21)
--Jz JZ Number of grid points in z (default: 21)
--n_mean N_MEAN Spatial average frequency (number of iterations)
(default: 0)
--precision {single,double}
Precision of the simulation (default: single)
--N N Number of iterations (default: 100)
--skip-reference
Warning
This command must be run from a local cloned repository of LLG3D because it uses Git to access different commits.
Usage example¶
$ llg3d.bench.compare_commits --reference-commit v2.0.1
========================================
SIMPLE COMPARISON BENCHMARK
========================================
Current ref : dev-dw
Current hash : 8beb9520
Reference : v2.0.1
Solver : numpy
========================================
Reference : 1.399 s
Current : 0.682 s
Speedup : 2.051x
Diff : -51.3%
========================================