|
| 1 | +# PerformanceBenchmarking |
| 2 | + |
| 3 | +image:: https://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking/workflows/Build,%20test,%20package/badge.svg |
| 4 | + |
| 5 | +[](https://github.com/InsightSoftwareConsortium/PerformanceBenchmarking/actions/workflows/build-test-package.yml) |
| 6 | + |
| 7 | +[](https://pypi.python.org/pypi/itk-PerformanceBenchmarking) |
| 8 | + |
| 9 | +[](https://github.com/InsightSoftwareConsortium/PerformanceBenchmarking/blob/main/LICENSE) |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +Real-world tests to benchmark ITK performance. |
| 14 | + |
| 15 | +New classes increase operating system process priority to |
| 16 | +minimize the impact of other processes running on the system. |
| 17 | + |
| 18 | +These classes are used by a suite of example ITK benchmarks to quantify toolkit |
| 19 | +performance. |
| 20 | + |
| 21 | +For more information, see:: |
| 22 | + |
| 23 | +```txt |
| 24 | + McCormick M., Kang H.J., Barre S. |
| 25 | + Performance Benchmarking the Insight Toolkit |
| 26 | + The Insight Journal. January-December. 2016. |
| 27 | + https://hdl.handle.net/10380/3557 |
| 28 | + https://insight-journal.org/browse/publication/972 |
| 29 | +``` |
| 30 | + |
| 31 | +Since ITK 4.11.0, this module is available in the ITK source tree as a Remote |
| 32 | +module. To enable it, set:: |
| 33 | + |
| 34 | + Module_PerformanceBenchmarking:BOOL=ON |
| 35 | + |
| 36 | +in ITK's CMake build configuration. |
| 37 | + |
| 38 | +Requirements |
| 39 | +------------ |
| 40 | +- `CMake <https://cmake.org/>`_ |
| 41 | +- `Ninja <https://ninja-build.org/>`_ |
| 42 | +- `Python <https://www.python.org/>`_ |
| 43 | + |
| 44 | +Notes for running the benchmarks |
| 45 | +-------------------------------- |
| 46 | + |
| 47 | +An example to call the benchmarking script is:: |
| 48 | + |
| 49 | + $ python ./evaluate-itk-performance.py run -g {ITK-version} {ITK-source} {ITK-build} {ITKPerformanceBenchmarking-build} |
| 50 | + |
| 51 | +where ``{ITK-version}`` is the ITK version that the user wishes to evaluate. |
| 52 | + |
| 53 | +Also, note that the ITK source folder ``(ITK-source}``, where the specific |
| 54 | +version is fetched, needs to exist. |
| 55 | + |
| 56 | +The generated/result ``JSON`` files are placed in:: |
| 57 | + |
| 58 | + ./{ITKPerformanceBenchmarking-build}/BenchmarkResults/{machine-name} |
| 59 | + |
| 60 | + |
| 61 | +Notes for benchmarking in Windows |
| 62 | +--------------------------------- |
| 63 | + |
| 64 | +**CMake** and **Ninja** need to be in the ``PATH``. Also, the **C++ compiler** |
| 65 | +has to be in the ``PATH`` so that Ninja can find it. |
| 66 | + |
| 67 | +For the Microsoft Visual Studio compiler, the C++ compiler is a file that is |
| 68 | +usually under:: |
| 69 | + |
| 70 | + C:/Program Files/Microsoft Visual Studio {version}/VC/bin/cl.exe |
| 71 | + |
| 72 | +The user will need to change the path to the *vcvars\*.bat* command file in the |
| 73 | +`RunWithVisualStudio.cmd <https://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking/blob/master/RunWithVisualStudio.cmd#L1>`_ command line script to the specific location of their |
| 74 | +*vcvars* file, e.g.:: |
| 75 | + |
| 76 | + C:/Program Files/Microsoft Visual Studio {version}/VC/vcvarsall.bat |
| 77 | + |
| 78 | +Finally, the user will need to start the Git bash by double-clicking on the |
| 79 | +``RunWithVisualStudio.cmd`` script. |
| 80 | + |
| 81 | +Note that the module is built with static libraries to allow for ITK |
| 82 | +benchmarking in Windows: the ``BUILD_SHARED_LIBS`` flag in the |
| 83 | +`evaluate-itk-performance.py <https://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking/blob/master/evaluate-itk-performance.py>`_ script is set to `OFF`. |
| 84 | + |
| 85 | + |
| 86 | +License |
| 87 | +------- |
| 88 | + |
| 89 | +This software is distributed under the Apache 2.0 license. Please see |
| 90 | +the *LICENSE* file for details. |
0 commit comments