21#ifndef CUSTOMBENCHMARK_H
22#define CUSTOMBENCHMARK_H
37 void begin(
unsigned id);
41 void getData(
unsigned id, uint64_t&
count,
double& time_ms)
const;
86 time_ms =
data->time_spent * (1000.0/CLOCKS_PER_SEC);
98 assert(std::numeric_limits<clock_t>::is_integer);
99 if (
sizeof(clock_t)>=
sizeof(int64_t))
103 static clock_t last=clock();
104 static int64_t offset=0;
107 offset+=int64_t(std::numeric_limits<unsigned>::max())-int64_t(std::numeric_limits<unsigned>::min());
char data[hepevt_bytes_allocation_ATLAS]
CustomBenchmarkGuard(CustomBenchmark *cb, unsigned id, int count=1)
CustomBenchmark & operator=(const CustomBenchmark &)
CustomBenchmark(const CustomBenchmark &)
CustomBenchmark(unsigned nmax)
void getData(unsigned id, uint64_t &count, double &time_ms) const
static int64_t clock_nooverflow()
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string