logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby Butzon <toby.but...@ilc.com>
Subject Re: Performance of not logging in Log4J vs. JDK 1.4 Logging
Date Wed, 29 Oct 2003 15:24:03 GMT
David McVicar wrote:

> The tests are configured using log4j.xml (Log4J) and 
> logging.properties (JDK 1.4).

You should either (a) time JUST the log() method calls or (b) use the 
same kind of configuration file in both tests. XML is significantly 
harder to process than the .properties format. So, try using 
log4j.properties and let's see what your timing results are then.

Also try timing ONLY the loop and not the initialization. You should be 
able to use ``new java.util.Date().getTime()'' before and after the 
loop, subtracting the two values to get the elapsed time in 
milliseconds. (It'd be nice to have nano precision, but that's not 
supported; you could do it natively, if you were keen on it.)

Note also that benchmarking by iteration is not usually the best way to 
do it; though it seems to sheild you from having to think about other 
factors, looping differs a good bit from normal usage, so it won't 
necessarily reflect actual real-world performance.

Toby Butzon <toby.butzon@ilc.com>
ILC R&D Co-op / Georgia Tech CS / KKPsi Iota Sp03
678.904.2413 work / 678.362.6483 mobile
Fifteen Piedmont Center, Suite 700 / Atlanta, GA 30305

To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

View raw message