This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # this is a modified copy of https://gist.github.com/grahamking/9c8c91b871843a9a6ce2bec428b8f48d | |
| # the differences are AMD cpu detection and the ability to run this script via sudo | |
| # Usage: runperf ./my-benchmark-binary | |
| # | |
| # Script to run a benchmark / performance test in decent conditions. Based on: | |
| # - https://www.llvm.org/docs/Benchmarking.html | |
| # - "Performance Analysis and Tuning on Modern CPU" by Denis Bakhvalov, Appendix A. | |
| # - https://github.com/andikleen/pmu-tools |