GearEngine  0.0.1
Gear::InstrumentationTimer 클래스 참조

#include <Instrumentor.h>

Gear::InstrumentationTimer에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 InstrumentationTimer (const char *name)
 
 ~InstrumentationTimer ()
 
void Stop ()
 

Private 속성

const char * m_Name
 
std::chrono::time_point< std::chrono::high_resolution_clock > m_StartTimepoint
 
bool m_Stopped
 

상세한 설명

Instrumentor.h 파일의 92 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ InstrumentationTimer()

Gear::InstrumentationTimer::InstrumentationTimer ( const char *  name)
inline

Instrumentor.h 파일의 95 번째 라인에서 정의되었습니다.

96  : m_Name(name), m_Stopped(false)
97  {
98  m_StartTimepoint = std::chrono::high_resolution_clock::now();
99  }

◆ ~InstrumentationTimer()

Gear::InstrumentationTimer::~InstrumentationTimer ( )
inline

Instrumentor.h 파일의 101 번째 라인에서 정의되었습니다.

102  {
103  if (!m_Stopped)
104  Stop();
105  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 함수 문서화

◆ Stop()

void Gear::InstrumentationTimer::Stop ( )
inline

Instrumentor.h 파일의 107 번째 라인에서 정의되었습니다.

108  {
109  auto endTimepoint = std::chrono::high_resolution_clock::now();
110 
111  long long start = std::chrono::time_point_cast<std::chrono::microseconds>(m_StartTimepoint).time_since_epoch().count();
112  long long end = std::chrono::time_point_cast<std::chrono::microseconds>(endTimepoint).time_since_epoch().count();
113 
114  uint32_t threadID = std::hash<std::thread::id>{}(std::this_thread::get_id());
115  Instrumentor::Get().WriteProfile({ m_Name, start, end, threadID });
116 
117  m_Stopped = true;
118  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ m_Name

const char* Gear::InstrumentationTimer::m_Name
private

Instrumentor.h 파일의 120 번째 라인에서 정의되었습니다.

◆ m_StartTimepoint

std::chrono::time_point<std::chrono::high_resolution_clock> Gear::InstrumentationTimer::m_StartTimepoint
private

Instrumentor.h 파일의 121 번째 라인에서 정의되었습니다.

◆ m_Stopped

bool Gear::InstrumentationTimer::m_Stopped
private

Instrumentor.h 파일의 122 번째 라인에서 정의되었습니다.


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.:
Gear::Instrumentor::WriteProfile
void WriteProfile(const ProfileResult &result)
Definition: Instrumentor.h:52
Gear::InstrumentationTimer::Stop
void Stop()
Definition: Instrumentor.h:107
Gear::Instrumentor::Get
static Instrumentor & Get()
Definition: Instrumentor.h:85
Gear::InstrumentationTimer::m_Name
const char * m_Name
Definition: Instrumentor.h:120
Gear::InstrumentationTimer::m_StartTimepoint
std::chrono::time_point< std::chrono::high_resolution_clock > m_StartTimepoint
Definition: Instrumentor.h:121
Gear::InstrumentationTimer::m_Stopped
bool m_Stopped
Definition: Instrumentor.h:122