From bb29b5e10ee2b4ba2527e7b468800f023ea3d542 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 15 Dec 2020 23:03:10 -0500 Subject: [PATCH] Use better names than Benchmark1, Benchmark2, etc --- bench.h | 8 ++++---- bench1.cpp | 10 +++++----- bench2.cpp | 2 +- bench3.cpp | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bench.h b/bench.h index 31a0d69a..2c30e971 100644 --- a/bench.h +++ b/bench.h @@ -76,13 +76,13 @@ 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 -void Benchmark1(double t, double hertz); +void BenchmarkUnkeyedAlgorithms(double t, double hertz); // Shared key systems -void Benchmark2(double t, double hertz); +void BenchmarkSharedKeyedAlgorithms(double t, double hertz); // Public key systems over integers -void Benchmark3(double t, double hertz); +void BenchmarkPublicKeyAlgorithms(double t, double hertz); // Public key systems over elliptic curves -void Benchmark4(double t, double hertz); +void BenchmarkEllipticCurveAlgorithms(double t, double hertz); // These are defined in bench1.cpp extern void OutputResultKeying(double iterations, double timeTaken); diff --git a/bench1.cpp b/bench1.cpp index 627d2b6f..5a7d66a1 100644 --- a/bench1.cpp +++ b/bench1.cpp @@ -387,7 +387,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz) std::cout << "\n
"; count_breaks++; - Benchmark1(t, hertz); + BenchmarkUnkeyedAlgorithms(t, hertz); } // Shared key algorithms @@ -397,7 +397,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz) std::cout << "\n
"; count_breaks++; - Benchmark2(t, hertz); + BenchmarkSharedKeyedAlgorithms(t, hertz); } // Public key algorithms @@ -407,7 +407,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz) std::cout << "\n
"; count_breaks++; - Benchmark3(t, hertz); + BenchmarkPublicKeyAlgorithms(t, hertz); } // Public key algorithms over EC @@ -417,7 +417,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz) std::cout << "\n
"; count_breaks++; - Benchmark4(t, hertz); + BenchmarkEllipticCurveAlgorithms(t, hertz); } g_testEnd = ::time(NULLPTR); @@ -434,7 +434,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz) AddHtmlFooter(); } -void Benchmark1(double t, double hertz) +void BenchmarkUnkeyedAlgorithms(double t, double hertz) { g_allocatedTime = t; g_hertz = hertz; diff --git a/bench2.cpp b/bench2.cpp index 9794b5ea..2cfd6200 100644 --- a/bench2.cpp +++ b/bench2.cpp @@ -80,7 +80,7 @@ void BenchMarkByName(const char *factoryName, size_t keyLength=0, const char *di BenchMarkByName2(factoryName, keyLength, displayName, params); } -void Benchmark2(double t, double hertz) +void BenchmarkSharedKeyedAlgorithms(double t, double hertz) { g_allocatedTime = t; g_hertz = hertz; diff --git a/bench3.cpp b/bench3.cpp index ded4fa5a..ac5d9321 100644 --- a/bench3.cpp +++ b/bench3.cpp @@ -300,7 +300,7 @@ void BenchMarkKeyAgreement(const char *filename, const char *name, double timeTo BenchMarkAgreement(name, d, timeTotal); } -void Benchmark3(double t, double hertz) +void BenchmarkPublicKeyAlgorithms(double t, double hertz) { g_allocatedTime = t; g_hertz = hertz; @@ -370,7 +370,7 @@ void Benchmark3(double t, double hertz) std::cout << "\n" << std::endl; } -void Benchmark4(double t, double hertz) +void BenchmarkEllipticCurveAlgorithms(double t, double hertz) { g_allocatedTime = t; g_hertz = hertz;