mirror of
https://github.com/vgough/encfs.git
synced 2025-01-02 20:19:11 +01:00
5f0806c5cc
git-vendor-name: easylogging git-vendor-dir: vendor/github.com/muflihun/easyloggingpp git-vendor-repository: https://github.com/muflihun/easyloggingpp git-vendor-ref: master
29 lines
990 B
C++
29 lines
990 B
C++
|
|
#include "easylogging++.h"
|
|
#include "mymath.h"
|
|
|
|
INITIALIZE_EASYLOGGINGPP
|
|
|
|
TIMED_SCOPE(benchmark, "benchmark-program");
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
// ELPP_INITIALIZE_SYSLOG("my_proc", LOG_PID | LOG_CONS | LOG_PERROR, LOG_USER);
|
|
el::Loggers::reconfigureAllLoggers(el::ConfigurationType::ToStandardOutput, "false");
|
|
TIMED_BLOCK(loggingPerformance, "benchmark-block") {
|
|
el::base::SubsecondPrecision ssPrec(3);
|
|
std::cout << "Starting program " << el::base::utils::DateTime::getDateTime("%h:%m:%s", &ssPrec) << std::endl;
|
|
int MAX_LOOP = 1000000;
|
|
for (int i = 0; i <= MAX_LOOP; ++i) {
|
|
LOG(INFO) << "Log message " << i;
|
|
}
|
|
int result = MyMath::sum(1, 2);
|
|
result = MyMath::sum(1, 3);
|
|
|
|
std::cout << "Finished program - cleaning! " << el::base::utils::DateTime::getDateTime("%h:%m:%s", &ssPrec) << std::endl;
|
|
}
|
|
// SYSLOG(INFO) << "This is syslog - read it from /var/log/syslog";
|
|
|
|
return 0;
|
|
}
|