53 explicit tracer(
const char*
const function__);
59 const char*
const function;
73 std::map<std::pair<int, std::string>,
int>
counters;
85 #define TRACER_ENTRY(interval) \ 86 static struct tracer tracer(__PRETTY_FUNCTION__); \ 87 tracer::printer print((++tracer.run % interval) == 0 ? &tracer : nullptr) 89 #define TRACER_ENTRY(interval) \ 90 static struct tracer tracer(__FUNCTION__); \ 91 tracer::printer print((++tracer.run % interval) == 0 ? &tracer : nullptr) 101 #define TRACER_COUNT(marker) \ 103 ++tracer.counters[std::pair(__LINE__, marker)]; \ Helper structure to print the tracing statistics.
const tracer *const tracer_
The tracer, whose statistics to print.
int run
The total number of runs.
printer & operator=(const printer &)=delete
printer(const printer &)=delete
tracer(const tracer &)=delete
Helper structure for gathering the tracing statistics.
std::map< std::pair< int, std::string >, int > counters
The tracer counters.