#include <Instrumentor.h>
◆ Instrumentor()
| Vesper::Instrumentor::Instrumentor |
( |
| ) |
|
|
inline |
55 {
56 }
InstrumentationSession * m_CurrentSession
Definition Instrumentor.h:49
◆ BeginSession()
| void Vesper::Instrumentor::BeginSession |
( |
const std::string & | name, |
|
|
const std::string & | filepath = "results.json" ) |
|
inline |
59 {
62
64 {
66 }
68 }
73 }
74 else {
76 {
77 VZ_CORE_ERROR(
"Instrumentor could not open results file '{0}'.", filepath);
78 }
79 }
82 }
#define VZ_CORE_ERROR(...)
error: indicates an error that has occurred
Definition Log.h:41
std::ofstream m_OutputStream
Definition Instrumentor.h:50
void WriteHeader()
Definition Instrumentor.h:115
std::mutex m_Mutex
Definition Instrumentor.h:51
void InternalEndSession()
Definition Instrumentor.h:127
static std::shared_ptr< spdlog::logger > & GetCoreLogger()
Returns the core logger instance.
Definition Log.h:23
◆ EndSession()
| void Vesper::Instrumentor::EndSession |
( |
| ) |
|
|
inline |
◆ Get()
139 {
141 return instance;
142 }
Instrumentor()
Definition Instrumentor.h:53
◆ InternalEndSession()
| void Vesper::Instrumentor::InternalEndSession |
( |
| ) |
|
|
inline |
128 {
130 {
135 }
136 }
void WriteFooter()
Definition Instrumentor.h:121
◆ WriteFooter()
| void Vesper::Instrumentor::WriteFooter |
( |
| ) |
|
|
inline |
◆ WriteHeader()
| void Vesper::Instrumentor::WriteHeader |
( |
| ) |
|
|
inline |
◆ WriteProfile()
| void Vesper::Instrumentor::WriteProfile |
( |
const ProfileResult & | result | ) |
|
|
inline |
91 {
93
94 std::string name = result.Name;
95 std::replace(name.begin(), name.end(), '"', '\'');
96
99 m_OutputStream <<
"\"dur\":" << (result.End - result.Start) <<
',';
106
109 {
110
112 }
113 }
◆ m_CurrentSession
◆ m_Mutex
| std::mutex Vesper::Instrumentor::m_Mutex |
|
private |
◆ m_OutputStream
| std::ofstream Vesper::Instrumentor::m_OutputStream |
|
private |
The documentation for this class was generated from the following file: