Botan
1.11.15
|
00001 /* 00002 * Runtime benchmarking 00003 * (C) 2008-2009 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_RUNTIME_BENCHMARK_H__ 00009 #define BOTAN_RUNTIME_BENCHMARK_H__ 00010 00011 #include <botan/rng.h> 00012 #include <map> 00013 #include <string> 00014 #include <chrono> 00015 00016 namespace Botan { 00017 00018 /** 00019 * Algorithm benchmark 00020 * @param name the name of the algorithm to test (cipher, hash, or MAC) 00021 * @param af the algorithm factory used to create objects 00022 * @param rng the rng to use to generate random inputs 00023 * @param milliseconds total time for the benchmark to run 00024 * @param buf_size size of buffer to benchmark against, in KiB 00025 * @return results a map from provider to speed in mebibytes per second 00026 */ 00027 std::map<std::string, double> 00028 BOTAN_DLL algorithm_benchmark(const std::string& name, 00029 RandomNumberGenerator& rng, 00030 std::chrono::milliseconds milliseconds, 00031 size_t buf_size); 00032 00033 } 00034 00035 #endif