| Home >> All >> org >> apache >> log4j >> [ performance Javadoc ] |
org.apache.log4j.performance: Javadoc index of package org.apache.log4j.performance.
Package Samples:
org.apache.log4j.performance
Classes:
Logging: Measure the performance of logging. Experimental results are listed below in units of micro-seconds . Measurements were done on a AMD Duron clocked at 800Mhz running Windows 2000 and Sun's 1.3 JDK. Layout NullAppender FileAppender FileAppender (no flush) AsyncAppender (no flush) SimpleLayout 4 21 16 33 PatternLayout "%p - %m%n" 4 21 16 32 PatternLayout "%-5p - %m%n" 4 NA NA NA TTCCLayout/RELATIVE 10 37 31 45 PatternLayout "%r [%t] %-5p %c{2} %x - %m%n" 11 NA NA NA PatternLayout "%r [%t] %-5p %.10c %x - %m%n" 11 NA NA NA PatternLayout "%r [%t] %-5p %.20c %x - %m%n" 11 NA NA NA PatternLayout "%r ...
NewVsSetLen: This program compares the cost of creating a new StringBuffer and converting it to a String versus keeping the same StringBuffer, setting its size to zero and then converting it to String. The table below gives some figures. Total Message length 0 1 2 4 8 New Buffer setLength New Buffer setLength New Buffer setLength New Buffer setLength New Buffer setLength 256 33 22 34 22 34 22 34 22 33 23 1024 58 41 59 45 59 48 59 51 60 44 4096 146 132 138 132 144 126 142 132 136 132 16384 617 593 593 609 601 617 601 632 593 632 65536 3218 3281 3093 3125 3125 3156 3125 3281 3062 3562 262144 14750 15125 14000 ...
NotLogging: 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 55 and isInfoEnabled 55 methods eliminates the overhead of message argument construction. Message argument construction can be an important ...
NOPWriter: Extends java.io.Writer with methods that return immediately without doing anything. This class is used to measure the cost of constructing a log message but not actually writing to any device. The org.apache.log4j.performance.NOPWriter class is intended for internal use only. Consequently, it is not included in the log4j.jar file.
ConcatVsArray: Measure difference in performance of string concatenation versus creating an anonymous string array. You should be able to see that anonymous string array construction is significatnly faster than string concatenation. The difference increases proportionally with the length of the strings to be concatanated.
NullAppender: A bogus appender which calls the format method of its layout object but does not write the result anywhere. The org.apache.log4j.performance.NullAppender class is intended for internal use only. Consequently, it is not included in the log4j.jar file.
SystemTime: Measures the time required to make a System.currentTimeMillis() and Thread.currentThread().getName() calls. On an 233Mhz NT machine (JDK 1.1.7B) the System.currentTimeMillis() call takes under half a microsecond to complete whereas the Thread.currentThread().getName() call takes about 4 micro-seconds.
ListVsVector: Compares the performance of looping through a list versus a Vector. Chain looping is *20* times faster than vector access on JDK 1.1.7B on NT
| Home | Contact Us | Privacy Policy | Terms of Service |