Botan  1.10.9
benchmark.h
Go to the documentation of this file.
1 /*
2 * Runtime benchmarking
3 * (C) 2008 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_RUNTIME_BENCHMARK_H__
9 #define BOTAN_RUNTIME_BENCHMARK_H__
10 
11 #include <botan/algo_factory.h>
12 #include <botan/rng.h>
13 #include <map>
14 #include <string>
15 
16 namespace Botan {
17 
18 /**
19 * Algorithm benchmark
20 * @param name the name of the algorithm to test (cipher, hash, or MAC)
21 * @param af the algorithm factory used to create objects
22 * @param rng the rng to use to generate random inputs
23 * @param milliseconds total time for the benchmark to run
24 * @param buf_size size of buffer to benchmark against, in KiB
25 * @return results a map from provider to speed in mebibytes per second
26 */
27 std::map<std::string, double>
28 BOTAN_DLL algorithm_benchmark(const std::string& name,
29  Algorithm_Factory& af,
30  RandomNumberGenerator& rng,
31  u32bit milliseconds,
32  size_t buf_size);
33 
34 }
35 
36 #endif
RandomNumberGenerator * rng
Definition: global_rng.cpp:165
std::map< std::string, double > algorithm_benchmark(const std::string &name, Algorithm_Factory &af, RandomNumberGenerator &rng, u32bit milliseconds, size_t buf_size)
Definition: benchmark.cpp:122
unsigned int u32bit
Definition: types.h:32