You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ce...@apache.org on 2004/09/06 21:53:44 UTC
cvs commit: logging-log4j/tests/resources/history TORINO.txt
ceki 2004/09/06 12:53:44
Modified: tests performance.xml
Added: tests/resources/history TORINO.txt
Log:
- Added performance test results when running on Torino, an AMD Athlon XP 2600.
- Added tasks in performance.xml for measuring output to files in various modes.
Revision Changes Path
1.2 +109 -70 logging-log4j/tests/performance.xml
Index: performance.xml
===================================================================
RCS file: /home/cvs/logging-log4j/tests/performance.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- performance.xml 6 Sep 2004 17:30:01 -0000 1.1
+++ performance.xml 6 Sep 2004 19:53:44 -0000 1.2
@@ -9,8 +9,7 @@
<property name="examples.classes" value="../examples/classes/"/>
<property name="tests.source.home" value="${base}/tests/src/java/"/>
- <property name="longrun" value="100000"/>
- <property name="shortrun" value="20000"/>
+ <property name="runlen" value="100000"/>
<path id="perf.classpath">
<pathelement location="${project.source.home}"/>
@@ -20,75 +19,115 @@
<pathelement location="./classes"/>
</path>
- <target name="usage">
- <echo>
- These are the targets supported by this ANT build scpript:
-
- null - run performance tests using NullAppender
-
- runAll - run all available tests
- </echo>
- </target>
-
- <target name="loop">
- <echo message="Pattern is ${pattern}"/>
- <java classname="org.apache.log4j.performance.Loop"
- fork="yes" failonerror="true">
- <classpath refid="perf.classpath"/>
- <sysproperty key="pattern" value="${pattern}"/>
- <arg line="${runLen} ${configFile}"/>
- </java>
- </target>
-
- <target name="null-loop">
- <antcall target="loop">
- <param name="pattern" value="${pattern}"/>
- <param name="runLen" value="${longrun}"/>
- <param name="configFile" value="input/performance/null-appender.xml"/>
- </antcall>
- </target>
-
- <target name="short-null-loop">
- <echo message="Pattern is ${pattern}"/>
- <antcall target="loop">
- <param name="pattern" value="${pattern}"/>
- <param name="runLen" value="${shortrun}"/>
- <param name="configFile" value="input\\performance\\null-appender.xml"/>
- </antcall>
- </target>
+ <target name="usage">
+ <echo>
+ These are the targets supported by this ANT build scpript:
+
+ all - run all performance tests
+ null - run performance tests using NullAppender
+ file - run performance tests using FileAppender
+ file-noflush - run performance tests using FileAppender without immediate flush
+ file-bufferedio - run performance tests using FileAppender without buffered IO
+
+ runAll - run all available tests
+ </echo>
+ </target>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="./output/" includes="**"/>
+ </delete>
+ </target>
+
+ <target name="all" depends="null, file, file-noflush, file-bufferedio">
+ <antcall target="loop-group">
+ <param name="configFile" value="input/performance/null-appender.xml"/>
+ </antcall>
+ </target>
+
+
+ <target name="null">
+ <antcall target="loop-group">
+ <param name="configFile" value="input/performance/null-appender.xml"/>
+ </antcall>
+ </target>
+
+ <target name="file" depends="clean">
+ <echo message="*** logging with FileAppender ***"/>
+ <antcall target="loop-group">
+ <param name="configFile" value="input/performance/file.xml"/>
+ </antcall>
+ </target>
+
+ <target name="file-noflush" depends="clean">
+ <echo message="*** logging with FileAppender, ImmediateFlush=false ***"/>
+ <antcall target="loop-group">
+ <param name="configFile" value="input/performance/file-noflush.xml"/>
+ </antcall>
+ </target>
+
+ <target name="file-bufferedio" depends="clean">
+ <echo message="*** logging with FileAppender, BufferedIO=true ***"/>
+ <antcall target="loop-group">
+ <param name="configFile" value="input/performance/file-bufferedio.xml"/>
+ </antcall>
+ </target>
+
+ <target name="loop">
+ <echo message="Pattern is ${pattern}"/>
+ <buildnumber file="output/build.number"/>
+ <java classname="org.apache.log4j.performance.Loop"
+ fork="yes" failonerror="true">
+ <classpath refid="perf.classpath"/>
+ <sysproperty key="pattern" value="${pattern}"/>
+ <sysproperty key="build.number" value="${build.number}"/>
+ <arg line="${runlen} ${configFile}"/>
+ </java>
+ </target>
- <target name="null">
- <antcall target="null-loop">
- <param name="pattern" value="%p - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%-5p - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%r [%t] %-5p %c{2} %x - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%r [%t] %-5p %.10c %x - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%r [%t] %-5p %.20c %x - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%r [%t] %-5p %c - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%d{ISO8601} [%t] %-5p %c %x - %m%n"/>
- </antcall>
- <antcall target="null-loop">
- <param name="pattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"/>
- </antcall>
- <antcall target="short-null-loop">
- <param name="pattern" value="%l - %m%n"/>
- </antcall>
- <antcall target="short-null-loop">
- <param name="pattern" value="%C.%M.%L - %m%n"/>
- </antcall>
+ <target name="loop-group">
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%p - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%-5p - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%r [%t] %-5p %c{2} %x - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%r [%t] %-5p %.10c %x - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%r [%t] %-5p %.20c %x - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%r [%t] %-5p %c - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%d{ISO8601} [%t] %-5p %c %x - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%l - %m%n"/>
+ </antcall>
+ <antcall target="loop">
+ <param name="configFile" value="${configFile}"/>
+ <param name="pattern" value="%C.%M.%L - %m%n"/>
+ </antcall>
+ </target>
- </target>
+
</project>
1.1 logging-log4j/tests/resources/history/TORINO.txt
Index: TORINO.txt
===================================================================
Torino is a AMD Athlon XP 2600+ running Linux 2.6.7 and Sun's JDK 1.4.2.
NullAppender:
4.67 PatternLayout "%p - %m%n"
4.67 PatternLayout "%-5p - %m%n"
11.22 PatternLayout "%r [%t] %-5p %c{2} %x - %m%n"
11.34 PatternLayout "%r [%t] %-5p %.10c %x - %m%n"
11.30 PatternLayout "%r [%t] %-5p %.20c %x - %m%n"
10.04 PatternLayout "%r [%t] %-5p %c - %m%n"
18.21 PatternLayout "%d{ISO8601} [%t] %-5p %c %x - %m%n"
18.11 PatternLayout "%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"
183.81 PatternLayout "%l - %m%n"
203.25 PatternLayout "%C.%M.%L - %m%n"
FileAppender:
15.11 PatternLayout "%p - %m%n"
16.96 PatternLayout "%-5p - %m%n"
24.60 PatternLayout "%r [%t] %-5p %c{2} %x - %m%n"
24.37 PatternLayout "%r [%t] %-5p %.10c %x - %m%n"
25.72 PatternLayout "%r [%t] %-5p %.20c %x - %m%n"
23.09 PatternLayout "%r [%t] %-5p %c - %m%n"
35.80 PatternLayout "%d{ISO8601} [%t] %-5p %c %x - %m%n"
36.26 PatternLayout "%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"
243.57 PatternLayout "%l - %m%n"
258.75 PatternLayout "%C.%M.%L - %m%n"
FileAppender: (ImmediateFlush=false)
6.96 PatternLayout "%p - %m%n"
7.07 PatternLayout "%-5p - %m%n"
15.33 PatternLayout "%r [%t] %-5p %c{2} %x - %m%n"
15.18 PatternLayout "%r [%t] %-5p %.10c %x - %m%n"
16.49 PatternLayout "%r [%t] %-5p %.20c %x - %m%n"
14.21 PatternLayout "%r [%t] %-5p %c - %m%n"
23.33 PatternLayout "%d{ISO8601} [%t] %-5p %c %x - %m%n"
23.13 PatternLayout "%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"
241.42 PatternLayout "%l - %m%n"
260.15 PatternLayout "%C.%M.%L - %m%n"
FileAppender: (BufferedIO=true)
6.27 PatternLayout "%p - %m%n"
6.39 PatternLayout "%-5p - %m%n"
15.45 PatternLayout "%r [%t] %-5p %c{2} %x - %m%n"
13.97 PatternLayout "%r [%t] %-5p %.10c %x - %m%n"
14.40 PatternLayout "%r [%t] %-5p %.20c %x - %m%n"
13.10 PatternLayout "%r [%t] %-5p %c - %m%n"
21.78 PatternLayout "%d{ISO8601} [%t] %-5p %c %x - %m%n"
21.64 PatternLayout "%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n"
214.99 PatternLayout "%l - %m%n"
239.34 PatternLayout "%C.%M.%L - %m%n"
Notice the small but noticable performance gain when
ImmediateFlush=false
Note also that BufferedIO yeilds better performance than
ImmediateFlush only when the length of the log entry is relatively
long.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org