diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-05-19 23:29:59 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-05-19 23:29:59 -0400 |
commit | 4fef9b88371acde819cd431f4e099e7e511606e4 (patch) | |
tree | 1fa2da4879debc635e6bbd6c536c3f378c22ffd0 /bench.h | |
parent | 82accdc13bfed8fa52e0b7681f5d10e5100740c4 (diff) | |
download | cryptopp-git-4fef9b88371acde819cd431f4e099e7e511606e4.tar.gz |
Rework benchmark code
This change moves test selections from test.cpp into bench.cpp. It also allows us finer control over test classes and algorithms
Diffstat (limited to 'bench.h')
-rw-r--r-- | bench.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -14,7 +14,14 @@ NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
-enum TestClass {Unkeyed=1,SharedKey=2,PublicKey=4, All=Unkeyed|SharedKey|PublicKey};
+// More granular control over benchmarks
+enum TestClass {
+ Unkeyed=1,SharedKeyMAC=2,SharedKeyStream=4,SharedKeyBlock=8,SharedKeyOther=16,
+ PublicKeyAgreement=32,PublicKeyEncryption=64,PublicKeySignature=128,PublicKeyOther=256,
+ SharedKey=SharedKeyMAC|SharedKeyStream|SharedKeyBlock|SharedKeyOther,
+ PublicKey=PublicKeyAgreement|PublicKeyEncryption|PublicKeySignature|PublicKeyOther,
+ All=Unkeyed|SharedKey|PublicKey
+};
extern const double CLOCK_TICKS_PER_SECOND;
extern double g_allocatedTime;
@@ -27,6 +34,8 @@ extern const byte defaultKey[]; extern time_t g_testBegin;
extern time_t g_testEnd;
+// Command handler
+void BenchmarkWithCommand(int argc, const char* const argv[]);
// Top level, prints preamble and postamble
void Benchmark(Test::TestClass suites, double t, double hertz);
// Unkeyed systems
|