131 MNETracer(
const std::string& file,
const std::string& function,
int lineNumber);
144 static void enable(
const std::string& jsonFileName);
149 static void enable();
155 static void disable();
161 static void start(
const std::string& jsonFileName);
178 static void traceQuantity(
const std::string& name,
long val);
184 bool printToTerminalIsSet();
190 void setPrintToTerminal(
bool s);
197 static void writeHeader();
203 static void writeFooter();
209 static void writeToFile(
const std::string& str);
215 static void setZeroTime();
221 static long long getTimeNow();
232 void formatFileName();
237 void formatFunctionName();
242 void registerConstructionTime();
247 void registerFinalTime();
252 void registerThreadId();
257 void calculateDuration();
262 void printDurationMiliSec();
267 void writeBeginEvent();
272 void writeEndEvent();
274 static bool ms_bIsEnabled;
275 static std::ofstream ms_OutputFileStream;
276 static bool ms_bIsFirstEvent;
277 static std::mutex ms_outFileMutex;
278 static long long ms_iZeroTime;
280 bool m_bIsInitialized;
281 bool m_bPrintToTerminal;
282 std::string m_sFileName;
283 std::string m_sFunctionName;
285 std::string m_iThreadId;
286 long long m_iBeginTime;
287 long long m_iEndTime;
288 double m_dDurationMilis;