diff options
author | lloyd <[email protected]> | 2009-09-24 16:44:26 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-09-24 16:44:26 +0000 |
commit | 6cb4b06db7855fa8bec60b2965fe34fb01e5896c (patch) | |
tree | 4c99b8d613ce1551f2a27cda05e1d67988563072 /checks/bench.h | |
parent | e06cb7dcf09e17cb0e76d42e096ca838c17a60bc (diff) |
Modify the self test program to use the builtin runtime benchmarking goop.
Features dropped: RNG benchmarking, the --bench-type option.
New feature: Anything the library understands can be benchmarked using
--bench-algo.
Use 3DES and Serpent for mode benchmarking along with AES-128.
Diffstat (limited to 'checks/bench.h')
-rw-r--r-- | checks/bench.h | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/checks/bench.h b/checks/bench.h index 0cc3f46d1..835db0101 100644 --- a/checks/bench.h +++ b/checks/bench.h @@ -1,37 +1,18 @@ -#ifndef BOTAN_BENCHMARCH_H__ -#define BOTAN_BENCHMARCH_H__ +#ifndef BOTAN_CHECK_BENCHMARK_H__ +#define BOTAN_CHECK_BENCHMARK_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 << std::endl; - data[name].insert(timer); - } - - private: - std::map<std::string, std::set<Timer> > data; - }; - - -void benchmark(const std::string&, Botan::RandomNumberGenerator&, +void benchmark(Botan::RandomNumberGenerator& rng, double seconds); +bool bench_algo(const std::string& algo_name, + Botan::RandomNumberGenerator& rng, + double seconds); + void bench_pk(Botan::RandomNumberGenerator&, const std::string&, double seconds); -u32bit bench_algo(const std::string&, - Botan::RandomNumberGenerator&, - double); - #endif |