org.apache.log4j.performance
Class NotLogging
java.lang.Objectorg.apache.log4j.performance.NotLogging
public class NotLogging
extends java.lang.Object
Measure the performance of evaluating whether to log or not to log,
but not actually logging.
This program takes two arguments, a string which should be
"true" for testing shipped code performance and "false" for testing
debug-enabled performance the second argument is the run length of
the measurement loops.
The results of the measurement (should) show that
- Category evaluation is independent of the length of the category name.
- As expected, using the
isDebugEnabled and isInfoEnabled
methods eliminates the overhead of message argument construction.
- Message argument construction can be an important slowing
factor while evaluating whether to log or not.
- Ceki Gülcü
main
public static void main(argv[] )
Copyright 2000-2002 Apache Software Foundation.