12#ifndef PROFILINGTIMEDREGION_HPP
13#define PROFILINGTIMEDREGION_HPP
15#include "profiling_export.h"
22#include "UtLogStream.hpp"
23#include "UtProcessorTime.hpp"
24#include "UtWallClock.hpp"
105 Mode aMode = Mode::REGION,
106 std::function<
void(ut::log::MessageStream&)> aExtraStartingOutputFunc =
nullptr,
107 ut::log::MessageStream aOutputStream = ut::log::info());
119 void StartSubregion(
const std::string& aStartMessage =
"");
129 void StopSubregion(
const std::string& aEndMessage =
"");
132 double GetWallTime();
144 void LogStart(
const std::string& aStartMessage =
"");
145 void LogEnd(
const std::string& aEndMessage =
"");
148 std::unique_ptr<ProfilingRegion> mProfilingRegion;
150 std::string mRegionLabel;
154 std::function<void(ut::log::MessageStream&)> mExtraStartingOutputFunc;
156 ut::log::MessageStream mOutputStream;
158 UtWallClock mWallClock;
159 UtProcessorTime mProcessorTime;
162 double mCpuOffset = 0.0;
164 double mWallOffset = 0.0;
Scope guard that records wall clock time elapsed and marks region beginning and end by writing to a g...
Definition TimedRegion.hpp:86
TimedRegion & operator=(TimedRegion &&)=delete
Mode
In Mode::REGION, TimedRegion must be used as a scope guard.
Definition TimedRegion.hpp:94
TimedRegion(const char *aRegionLabel, Mode aMode=Mode::REGION, std::function< void(ut::log::MessageStream &)> aExtraStartingOutputFunc=nullptr, ut::log::MessageStream aOutputStream=ut::log::info())
Definition TimedRegion.cpp:21
TimedRegion & operator=(const TimedRegion &)=delete
TimedRegion(TimedRegion &&)=delete
TimedRegion(const TimedRegion &)=delete
Definition of utility struct and function used by the profiling targets.
Definition ProfilingCommon.hpp:23