SpiecsEngine
 
Loading...
Searching...
No Matches

◆ WriteProfile()

void SpicesTest::Instrumentor::WriteProfile ( const ProfileResult & result)
inline

Definition at line 75 of file Instrumentor.h.

76 {
77 std::stringstream json;
78
79 json << std::setprecision(3) << std::fixed;
80 json << ",{";
81 json << "\"cat\":\"function\",";
82 json << "\"dur\":" << (result.ElapsedTime.count()) << ',';
83 json << "\"name\":\"" << result.Name << "\",";
84 json << "\"ph\":\"X\",";
85 json << "\"pid\":0,";
86 json << "\"tid\":" << result.ThreadID << ",";
87 json << "\"ts\":" << result.Start.count();
88 json << "}";
89
90 std::lock_guard lock(m_Mutex);
92 {
93 m_OutputStream << json.str();
94 m_OutputStream.flush();
95 }
96 }
InstrumentationSession * m_CurrentSession
std::ofstream m_OutputStream

References m_CurrentSession, m_OutputStream, SpicesTest::ProfileResult::Name, and SpicesTest::ProfileResult::ThreadID.