blob: f58ce3250bc7cb75b5857d0411c5da949891eb17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef BOTAN_BENCHMARCH_H__
#define BOTAN_BENCHMARCH_H__
#include <botan/rng.h>
#include <string>
#include <map>
#include <set>
#include "timer.h"
#include <iostream>
class Benchmark_Report
{
public:
void report(const std::string& name, Timer timer)
{
std::cout << name << " " << timer << "\n";
data[name].insert(timer);
}
private:
std::map<std::string, std::set<Timer> > data;
};
void benchmark(const std::string&, Botan::RandomNumberGenerator&,
bool html, double seconds);
void bench_pk(Botan::RandomNumberGenerator&,
const std::string&, bool html, double seconds);
u32bit bench_algo(const std::string&,
Botan::RandomNumberGenerator&,
double);
#endif
|