rm5248 opened a new pull request #87:
URL: https://github.com/apache/logging-log4cxx/pull/87


   This PR adds in a utility used for benchmarking the log4cxx library.  It 
does not benchmark anything about actually writing data out; that is outside of 
the scope of what this benchmarks at the moment(as that can be highly variable 
depending on the OS).
   
   This is made as a separate utility application, as it is not really a unit 
test and is more of a test of how well the library itself performs.
   
   Sample output:
   ```
   Benchmarking library only(no writing out):
   **************************************************************
   Benchmarking Single threaded: 1000000 messages
   **************************************************************
   Log4cxx NoFormat pattern: %m%n Elapsed: 0.9181 secs 1,089,168/sec
   Log4cxx DateOnly pattern: [%d] %m%n Elapsed: 0.8941 secs 1,118,448/sec
   Log4cxx DateClassLevel pattern: [%d] [%c] [%p] %m%n Elapsed: 0.8908 secs 
1,122,597/sec
   Log4cxx Logging with FMT Elapsed: 0.4779 secs 2,092,464/sec
   Log4cxx Logging static string Elapsed: 0.4279 secs 2,337,184/sec
   Log4cxx Logging static string with FMT Elapsed: 0.4834 secs 2,068,577/sec
   Log4cxx Logging disabled debug Elapsed: 0.04615 secs 21,670,312/sec
   Log4cxx Logging disabled trace Elapsed: 0.04780 secs 20,921,870/sec
   Log4cxx Logging enabled debug Elapsed: 0.4301 secs 2,325,013/sec
   Log4cxx Logging enabled trace Elapsed: 0.4288 secs 2,332,359/sec
   **************************************************************
   Benchmarking multithreaded threaded: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging with FMT MT Elapsed: 2.869 secs 348,524/sec
   Log4cxx Logging with FMT MT Elapsed: 2.937 secs 340,445/sec
   Log4cxx Logging with FMT MT Elapsed: 2.956 secs 338,264/sec
   Log4cxx Logging with FMT MT Elapsed: 2.968 secs 336,947/sec
   **************************************************************
   Benchmarking multithreaded disabled: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging disabled MT Elapsed: 0.3615 secs 2,766,610/sec
   Log4cxx Logging disabled MT Elapsed: 0.3884 secs 2,574,516/sec
   Log4cxx Logging disabled MT Elapsed: 0.4346 secs 2,300,853/sec
   Log4cxx Logging disabled MT Elapsed: 0.4362 secs 2,292,636/sec
   Results for use in spreadsheet:
   1089168
   1118448
   1122597
   2092464
   2337184
   2068577
   21670312
   20921870
   2325013
   2332359
   348524
   340445
   338264
   336947
   2766610
   2574516
   2300853
   2292636
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to