summaryrefslogtreecommitdiff
path: root/src/main/resources/log4j2-async-1k.xml
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-09 23:26:31 +0200
committerPaul Buetow <paul@buetow.org>2026-01-09 23:26:31 +0200
commit15ea7f40cd7302b9bf9f0aea0d85a970a8a7c07f (patch)
tree897055fcb651cae1f5e96e14c966243325e95286 /src/main/resources/log4j2-async-1k.xml
Add Log4j2 benchmark tool
- Configurable thread count, duration, message size - Multiple logging configurations: sync-immediate, sync-buffered - AsyncLogger variants: 1k, 4k, 10k, 1m ring buffer sizes - AsyncAppender variants: 1k, 4k, 10k, 1m buffer sizes - Subprocess isolation for proper async logger initialization - Cache dropping between tests for accurate benchmarks - CSV output support
Diffstat (limited to 'src/main/resources/log4j2-async-1k.xml')
-rw-r--r--src/main/resources/log4j2-async-1k.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/resources/log4j2-async-1k.xml b/src/main/resources/log4j2-async-1k.xml
new file mode 100644
index 0000000..66389fe
--- /dev/null
+++ b/src/main/resources/log4j2-async-1k.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN">
+ <Appenders>
+ <File name="File" fileName="target/bench.log" immediateFlush="false" bufferSize="8192">
+ <PatternLayout pattern="[ASYNC-1K] %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+ </File>
+ </Appenders>
+ <Loggers>
+ <AsyncLogger name="bench" level="info" includeLocation="false">
+ <AppenderRef ref="File"/>
+ </AsyncLogger>
+ <Root level="info" includeLocation="false">
+ <AppenderRef ref="File"/>
+ </Root>
+ </Loggers>
+ <Properties>
+ <Property name="log4j2.asyncLoggerRingBufferSize">1024</Property>
+ </Properties>
+</Configuration>