MCPcopy Create free account
hub / github.com/Kitware/CMake / StopEntry

Method StopEntry

Source/cmMakefileProfilingData.cxx:82–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void cmMakefileProfilingData::StopEntry()
83{
84 /* Do not try again if we previously failed to write to output. */
85 if (!this->ProfileStream.good()) {
86 return;
87 }
88
89 try {
90 this->ProfileStream << ",";
91 cmsys::SystemInformation info;
92 Json::Value v;
93 v["ph"] = "E";
94 v["ts"] = static_cast<Json::Value::UInt64>(
95 std::chrono::duration_cast<std::chrono::microseconds>(
96 std::chrono::steady_clock::now().time_since_epoch())
97 .count());
98 v["pid"] = static_cast<int>(info.GetProcessId());
99 v["tid"] = 0;
100 this->JsonWriter->write(v, &this->ProfileStream);
101 } catch (std::ios_base::failure& fail) {
102 cmSystemTools::Error(
103 cmStrCat("Failed to write to profiling output:", fail.what()));
104 } catch (...) {
105 cmSystemTools::Error("Error writing profiling output!");
106 }
107}
108
109cmMakefileProfilingData::RAII::RAII(cmMakefileProfilingData& data,
110 std::string const& category,

Callers 2

~RAIIMethod · 0.80

Calls 7

goodMethod · 0.80
GetProcessIdMethod · 0.80
ErrorClass · 0.70
cmStrCatFunction · 0.70
countMethod · 0.45
writeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected