Botan 1.10.17
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
16namespace 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*/
27std::map<std::string, double>
28BOTAN_DLL algorithm_benchmark(const std::string& name,
31 u32bit milliseconds,
32 size_t buf_size);
33
34}
35
36#endif
std::map< std::string, double > algorithm_benchmark(const std::string &name, Algorithm_Factory &af, RandomNumberGenerator &rng, u32bit milliseconds, size_t buf_size)
unsigned int u32bit
Definition types.h:32