LatticeHashForest
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
profiling.hpp File Reference

Enables basic code-based profiling metrics in LHF. More...

#include <cassert>
#include <chrono>
#include <cstdint>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
Include dependency graph for profiling.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lhf::PerformanceStatistics
 Utility class for enabling code-based profiling. More...
 
struct  lhf::PerformanceStatistics::Duration
 
struct  lhf::__CalcTime
 The object used to enable the duration capturing mechanism. More...
 

Namespaces

namespace  lhf
 

Macros

#define __lhf_calc_time(__stat, __key)    auto __LHF_TIMER_OBJECT__ = __CalcTime((__stat), (__key))
 Creates a timer object to capture duration when going out of scope.
 
#define __lhf_calc_functime(__stat)    auto __LHF_TIMER_OBJECT__ = __CalcTime((__stat), __func__)
 Creates a timer object to capture duration of the current function when going out of scope.
 

Detailed Description

Enables basic code-based profiling metrics in LHF.

Definition in file profiling.hpp.

Macro Definition Documentation

◆ __lhf_calc_functime

#define __lhf_calc_functime (   __stat)     auto __LHF_TIMER_OBJECT__ = __CalcTime((__stat), __func__)

Creates a timer object to capture duration of the current function when going out of scope.

Parameters
__statPerformanceStatistics object

Definition at line 145 of file profiling.hpp.

◆ __lhf_calc_time

#define __lhf_calc_time (   __stat,
  __key 
)     auto __LHF_TIMER_OBJECT__ = __CalcTime((__stat), (__key))

Creates a timer object to capture duration when going out of scope.

Parameters
__statPerformanceStatistics object
__keyIdentifier for this duration

Definition at line 143 of file profiling.hpp.