12 #ifndef KTTHROUGHPUTPROFILER_HH_ 13 #define KTTHROUGHPUTPROFILER_HH_ 24 #define NSEC_PER_SEC 1000000000 28 #define SEC_PER_NSEC 1.e-9 32 #include <mach/mach_time.h> 35 #define MACNANO (+1.0E-9) 36 #define MACGIGA UINT64_C(1000000000) 84 bool Configure(
const scarab::param_node& node);
105 timespec
Diff(timespec start, timespec end)
const;
116 static double TimeToSec(
struct timespec time);
117 static void TimeDiff(
struct timespec start,
struct timespec end,
struct timespec* diff);
119 static double sTimebase;
120 static uint64_t sTimestart;
void SetOutputFilename(const std::string &fname)
bool GetOutputFileFlag() const
Measures the speed of data processing.
virtual ~KTThroughputProfiler()
timespec Diff(timespec start, timespec end) const
void StartProfiling(KTDataPtr data)
static void TimeDiff(struct timespec start, struct timespec end, struct timespec *diff)
static double TimeToSec(struct timespec time)
boost::shared_ptr< KTData > KTDataPtr
void Data(KTDataPtr data)
void SetOutputFileFlag(bool flag)
std::string fOutputFilename
bool Configure(const scarab::param_node &node)
Should perform parameter store and command-line configurations.
static int GetTimeCurrent(struct timespec *time)
const std::string & GetOutputFilename() const
KTThroughputProfiler(const std::string &name="throughput-profiler")