Context: Added ::debugTiming to wrap Timer formatting
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iomanip>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -801,6 +802,20 @@ void Context::decomposeSortField (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void Context::debugTiming (const std::string& details, const Timer& timer)
|
||||||
|
{
|
||||||
|
std::stringstream out;
|
||||||
|
out << "Timer "
|
||||||
|
<< details
|
||||||
|
<< ' '
|
||||||
|
<< std::setprecision (6)
|
||||||
|
<< std::fixed
|
||||||
|
<< timer.total_us () / 1.0e6
|
||||||
|
<< " sec";
|
||||||
|
debug (out.str ());
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// This capability is to answer the question of 'what did I just do to generate
|
// This capability is to answer the question of 'what did I just do to generate
|
||||||
// this output?'.
|
// this output?'.
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ public:
|
|||||||
void error (const std::string&); // Error message sink - non-maskable
|
void error (const std::string&); // Error message sink - non-maskable
|
||||||
|
|
||||||
void decomposeSortField (const std::string&, std::string&, bool&, bool&);
|
void decomposeSortField (const std::string&, std::string&, bool&, bool&);
|
||||||
|
void debugTiming (const std::string&, const Timer&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void staticInitialization ();
|
void staticInitialization ();
|
||||||
|
|||||||
Reference in New Issue
Block a user