36 #ifndef NEKTAR_LIB_UTILITIES_BASIC_UTILS_TIMER_H
37 #define NEKTAR_LIB_UTILITIES_BASIC_UTILS_TIMER_H
41 #include <unordered_map>
49 namespace LibUtilities
55 using Clock = std::chrono::steady_clock;
57 using Seconds = std::chrono::duration<NekDouble>;
79 std::ostream &o = std::cout,
89 static std::map<std::string, std::tuple<Seconds, size_t, int> >
#define LIB_UTILITIES_EXPORT
static void PrintElapsedRegions()
Print elapsed time and call count for each region with default serial communicator.
Timer(const Timer &rhs)=delete
static unsigned short m_maxStringWidth
Timer & operator=(const Timer &rhs)=delete
std::chrono::steady_clock Clock
NekDouble TimePerTest(unsigned int n)
Returns amount of seconds per iteration in a test with n iterations.
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
static std::map< std::string, std::tuple< Seconds, size_t, int > > m_elapsedRegion
Clock::time_point CounterType
std::chrono::duration< NekDouble > Seconds
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
The above copyright notice and this permission notice shall be included.