Skip to content

Commit

Permalink
Remove bold from algorithm name in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Nov 14, 2017
1 parent 91b8d85 commit eb894d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 6 additions & 4 deletions bench1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void OutputResultBytes(const char *name, double length, double timeTaken)
if (timeTaken < 0.000001f) timeTaken = 0.000001f;

double mbs = length / timeTaken / (1024*1024);
std::cout << "\n<TR><TH>" << name;
std::cout << "\n<TR><TD>" << name;
std::cout << std::setiosflags(std::ios::fixed);
std::cout << "<TD>" << std::setprecision(0) << std::setiosflags(std::ios::fixed) << mbs;
if (g_hertz > 1.0f)
Expand Down Expand Up @@ -91,7 +91,7 @@ void OutputResultOperations(const char *name, const char *operation, bool pc, un
if (!iterations) iterations++;
if (timeTaken < 0.000001f) timeTaken = 0.000001f;

std::cout << "\n<TR><TH>" << name << " " << operation << (pc ? " with precomputation" : "");
std::cout << "\n<TR><TD>" << name << " " << operation << (pc ? " with precomputation" : "");
std::cout << "<TD>" << std::setprecision(2) << std::setiosflags(std::ios::fixed) << (1000*timeTaken/iterations);

// Coverity finding
Expand Down Expand Up @@ -430,7 +430,8 @@ void Benchmark1(double t, double hertz)

std::cout << "\n<COLGROUP><COL style=\"text-align: left;\"><COL style=\"text-align: right;\">";
std::cout << "<COL style=\"text-align: right;\">";
std::cout << "\n<THEAD style=\"background: #F0F0F0\"><TR><TH>Algorithm<TH>MiB/Second" << cpb;
std::cout << "\n<THEAD style=\"background: #F0F0F0\">";
std::cout << "\n<TR><TH>Algorithm<TH>MiB/Second" << cpb;

std::cout << "\n<TBODY style=\"background: white;\">";
{
Expand Down Expand Up @@ -508,7 +509,8 @@ void Benchmark2(double t, double hertz)
std::cout << "\n<TABLE>";
std::cout << "\n<COLGROUP><COL style=\"text-align: left;\"><COL style=\"text-align: right;\"><COL style=";
std::cout << "\"text-align: right;\"><COL style=\"text-align: right;\"><COL style=\"text-align: right;\">";
std::cout << "\n<THEAD style=\"background: #F0F0F0\"><TR><TH>Algorithm<TH>MiB/Second" << cpb;
std::cout << "\n<THEAD style=\"background: #F0F0F0\">";
std::cout << "\n<TR><TH>Algorithm<TH>MiB/Second" << cpb;
std::cout << "<TH>Microseconds to<BR>Setup Key and IV" << cpk;

std::cout << "\n<TBODY style=\"background: white;\">";
Expand Down
10 changes: 8 additions & 2 deletions bench2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,17 @@ void Benchmark3(double t, double hertz)
g_allocatedTime = t;
g_hertz = hertz;

const char *mco;
if (g_hertz > 1.0f)
mco = "<TH>Megacycles/Operation";
else
mco = "";

std::cout << "\n<TABLE>";
std::cout << "\n<COLGROUP><COL style=\"text-align: left;\"><COL style=";
std::cout << "\"text-align: right;\"><COL style=\"text-align: right;\">";
std::cout << "\n<THEAD style=\"background: #F0F0F0\"><TR><TH>Operation<TH>Milliseconds/Operation";
std::cout << (g_hertz > 1.0f ? "<TH>Megacycles/Operation" : "") << std::endl;
std::cout << "\n<THEAD style=\"background: #F0F0F0\">";
std::cout << "\n<TR><TH>Operation<TH>Milliseconds/Operation" << mco;

std::cout << "\n<TBODY style=\"background: white;\">";
{
Expand Down

0 comments on commit eb894d2

Please sign in to comment.