This commit is contained in:
gabime
2016-10-12 23:08:44 +03:00
parent 0cfdad4d0b
commit f14d1c002b
11 changed files with 236 additions and 236 deletions

View File

@@ -5,10 +5,10 @@
void CrusherLoop()
{
size_t counter = 0;
size_t counter = 0;
while (true)
{
LOGF(INFO, "Some text to crush you machine. thread:");
LOGF(INFO, "Some text to crush you machine. thread:");
if(++counter % 1000000 == 0)
{
std::cout << "Wrote " << counter << " entries" << std::endl;
@@ -24,13 +24,13 @@ int main(int argc, char** argv)
char c;
std::cin >> c;
if (toupper( c ) != 'Y')
return 0;
auto worker = g3::LogWorker::createLogWorker();
return 0;
auto worker = g3::LogWorker::createLogWorker();
auto handle= worker->addDefaultLogger(argv[0], "g3log.txt");
g3::initializeLogging(worker.get());
CrusherLoop();
g3::initializeLogging(worker.get());
CrusherLoop();
return 0;
}

View File

@@ -46,7 +46,7 @@ int main(int argc, char* argv[])
if (argc > 3)
queue_size = atoi(argv[3]);
cout << "\n*******************************************************************************\n";
cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " messages " << endl;
cout << "*******************************************************************************\n";
@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
}
std::cout << endl;
std::cout << "Avg rate: " << format(total_rate/iters) << "/sec" <<std::endl;
}
catch (std::exception &ex)
{