MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / main

Function main

integrationTest/main.cc:446–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444
445
446int main()
447{
448 NanoLog::setLogFile("testLog");
449 evilTestCase(NULL);
450 testAllTheTypes();
451
452 int count = 10;
453 uint64_t start = PerfUtils::Cycles::rdtsc();
454 for (int i = 0; i < count; ++i) {
455 NANO_LOG(NOTICE, "Loop test!");
456 }
457
458 uint64_t stop = PerfUtils::Cycles::rdtsc();
459
460 double time = PerfUtils::Cycles::toSeconds(stop - start);
461 printf("Total time 'benchmark recording' %d events took %0.2lf seconds "
462 "(%0.2lf ns/event avg)\r\n",
463 count, time, (time/count)*1e9);
464
465 SimpleTest st(10);
466 st.logSomething();
467 st.wholeBunchOfLogStatements();
468 st.logStatementsInHeader();
469 st.logSomething();
470 st.logSomething();
471
472 logLevelTest();
473
474 NanoLog::sync();
475
476 printf("\r\nNote: This app is used in the integration tests, but "
477 "is not the test runner. \r\nTo run the actual test, invoke "
478 "\"make run-test\"\r\n\r\n");
479}

Callers

nothing calls this directly

Calls 10

setLogFileFunction · 0.85
evilTestCaseFunction · 0.85
testAllTheTypesFunction · 0.85
rdtscFunction · 0.85
NANO_LOGClass · 0.85
logLevelTestFunction · 0.85
syncFunction · 0.85
logSomethingMethod · 0.80
logStatementsInHeaderMethod · 0.80

Tested by

no test coverage detected