diff options
Diffstat (limited to 'src/benchmark/benchmark.h')
-rw-r--r-- | src/benchmark/benchmark.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/benchmark/benchmark.h b/src/benchmark/benchmark.h index 17df85e4e..93224dd2e 100644 --- a/src/benchmark/benchmark.h +++ b/src/benchmark/benchmark.h @@ -17,6 +17,24 @@ namespace Botan { /** +* Time aspects of an algorithm/provider +* @param name the name of the algorithm to test +* @param af the algorithm factory used to create objects +* @param provider the provider to use +* @param rng the rng to use to generate random inputs +* @param runtime total time for the benchmark to run +* @param buf_size size of buffer to benchmark against, in KiB +* @return results a map from op type to operations per second +*/ +std::map<std::string, double> +BOTAN_DLL time_algorithm_ops(const std::string& name, + Algorithm_Factory& af, + const std::string& provider, + RandomNumberGenerator& rng, + std::chrono::nanoseconds runtime, + size_t buf_size); + +/** * Algorithm benchmark * @param name the name of the algorithm to test (cipher, hash, or MAC) * @param af the algorithm factory used to create objects |