Rob Barnes | f82aa5d | 2019-11-15 17:46:51 -0700 | [diff] [blame] | 1 | # Keymaster Benchmark |
| 2 | |
| 3 | The Keymaster Benchmark is a standalone tool for measuring the performance of keymaster implementations. |
| 4 | |
| 5 | ## Building |
| 6 | |
| 7 | Build: |
| 8 | `m keymaster_benchmark` |
| 9 | |
| 10 | Transfer to device/emulator: |
| 11 | `adb sync data` |
| 12 | |
| 13 | The benchmark executable should will be located at `data/benchmarktest/keymaster_benchmark/keymaster_benchmark` on the device. |
| 14 | |
| 15 | ## Usage |
| 16 | |
| 17 | Keymaster Benchmark is built on [Google microbenchmark library](https://github.com/google/benchmark). |
| 18 | All of the commandline arguments provided by the microbenchmark library are valid, such as `--benchmark_filter=<regex>` or `benchmark_out_format={json|console|csv}`. |
| 19 | In addition to the command line arguments provided by microbenchmark, `--service_name=<service_name>` is provided allow specification of the keymaster service name, e.g. specify `--service_name=strongbox` to benchmark strongbox. |