Use better names than Benchmark1, Benchmark2, etc

This commit is contained in:
Jeffrey Walton 2020-12-15 23:03:10 -05:00
parent d7b2982e32
commit bb29b5e10e
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
4 changed files with 12 additions and 12 deletions

View File

@ -76,13 +76,13 @@ void BenchmarkWithCommand(int argc, const char* const argv[]);
// Top level, prints preamble and postamble // Top level, prints preamble and postamble
void Benchmark(Test::TestClass suites, double t, double hertz); void Benchmark(Test::TestClass suites, double t, double hertz);
// Unkeyed systems // Unkeyed systems
void Benchmark1(double t, double hertz); void BenchmarkUnkeyedAlgorithms(double t, double hertz);
// Shared key systems // Shared key systems
void Benchmark2(double t, double hertz); void BenchmarkSharedKeyedAlgorithms(double t, double hertz);
// Public key systems over integers // Public key systems over integers
void Benchmark3(double t, double hertz); void BenchmarkPublicKeyAlgorithms(double t, double hertz);
// Public key systems over elliptic curves // Public key systems over elliptic curves
void Benchmark4(double t, double hertz); void BenchmarkEllipticCurveAlgorithms(double t, double hertz);
// These are defined in bench1.cpp // These are defined in bench1.cpp
extern void OutputResultKeying(double iterations, double timeTaken); extern void OutputResultKeying(double iterations, double timeTaken);

View File

@ -387,7 +387,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz)
std::cout << "\n<BR>"; std::cout << "\n<BR>";
count_breaks++; count_breaks++;
Benchmark1(t, hertz); BenchmarkUnkeyedAlgorithms(t, hertz);
} }
// Shared key algorithms // Shared key algorithms
@ -397,7 +397,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz)
std::cout << "\n<BR>"; std::cout << "\n<BR>";
count_breaks++; count_breaks++;
Benchmark2(t, hertz); BenchmarkSharedKeyedAlgorithms(t, hertz);
} }
// Public key algorithms // Public key algorithms
@ -407,7 +407,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz)
std::cout << "\n<BR>"; std::cout << "\n<BR>";
count_breaks++; count_breaks++;
Benchmark3(t, hertz); BenchmarkPublicKeyAlgorithms(t, hertz);
} }
// Public key algorithms over EC // Public key algorithms over EC
@ -417,7 +417,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz)
std::cout << "\n<BR>"; std::cout << "\n<BR>";
count_breaks++; count_breaks++;
Benchmark4(t, hertz); BenchmarkEllipticCurveAlgorithms(t, hertz);
} }
g_testEnd = ::time(NULLPTR); g_testEnd = ::time(NULLPTR);
@ -434,7 +434,7 @@ void Benchmark(Test::TestClass suites, double t, double hertz)
AddHtmlFooter(); AddHtmlFooter();
} }
void Benchmark1(double t, double hertz) void BenchmarkUnkeyedAlgorithms(double t, double hertz)
{ {
g_allocatedTime = t; g_allocatedTime = t;
g_hertz = hertz; g_hertz = hertz;

View File

@ -80,7 +80,7 @@ void BenchMarkByName(const char *factoryName, size_t keyLength=0, const char *di
BenchMarkByName2<T_FactoryOutput,T_FactoryOutput>(factoryName, keyLength, displayName, params); BenchMarkByName2<T_FactoryOutput,T_FactoryOutput>(factoryName, keyLength, displayName, params);
} }
void Benchmark2(double t, double hertz) void BenchmarkSharedKeyedAlgorithms(double t, double hertz)
{ {
g_allocatedTime = t; g_allocatedTime = t;
g_hertz = hertz; g_hertz = hertz;

View File

@ -300,7 +300,7 @@ void BenchMarkKeyAgreement(const char *filename, const char *name, double timeTo
BenchMarkAgreement(name, d, timeTotal); BenchMarkAgreement(name, d, timeTotal);
} }
void Benchmark3(double t, double hertz) void BenchmarkPublicKeyAlgorithms(double t, double hertz)
{ {
g_allocatedTime = t; g_allocatedTime = t;
g_hertz = hertz; g_hertz = hertz;
@ -370,7 +370,7 @@ void Benchmark3(double t, double hertz)
std::cout << "\n</TABLE>" << std::endl; std::cout << "\n</TABLE>" << std::endl;
} }
void Benchmark4(double t, double hertz) void BenchmarkEllipticCurveAlgorithms(double t, double hertz)
{ {
g_allocatedTime = t; g_allocatedTime = t;
g_hertz = hertz; g_hertz = hertz;