This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch graphs-for-performance
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit dd954408827783b9449ee0ad6fbb30019631d188
Author: Robert Middleton <[email protected]>
AuthorDate: Sun Nov 2 11:01:51 2025 -0500

    Show the performance results in graphs
---
 .gitattributes                               |   1 +
 src/site/PerformanceGraphs.ods               | Bin 0 -> 69183 bytes
 src/site/images/performance-all.png          | Bin 0 -> 37870 bytes
 src/site/images/performance-multithread.png  | Bin 0 -> 36829 bytes
 src/site/images/performance-singlethread.png | Bin 0 -> 39948 bytes
 src/site/markdown/performance.md             |  21 +++++++++++++++++++++
 6 files changed, 22 insertions(+)

diff --git a/.gitattributes b/.gitattributes
index d9bd095b..65b7d148 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,6 +1,7 @@
 * text eol=lf
 *.png binary
 *.jpg binary
+*.ods binary
 
 # This is a windows-specific file
 src/main/resources/log4cxx.rc eol=crlf
diff --git a/src/site/PerformanceGraphs.ods b/src/site/PerformanceGraphs.ods
new file mode 100644
index 00000000..98fa6bc3
Binary files /dev/null and b/src/site/PerformanceGraphs.ods differ
diff --git a/src/site/images/performance-all.png 
b/src/site/images/performance-all.png
new file mode 100644
index 00000000..13e7c253
Binary files /dev/null and b/src/site/images/performance-all.png differ
diff --git a/src/site/images/performance-multithread.png 
b/src/site/images/performance-multithread.png
new file mode 100644
index 00000000..7552c198
Binary files /dev/null and b/src/site/images/performance-multithread.png differ
diff --git a/src/site/images/performance-singlethread.png 
b/src/site/images/performance-singlethread.png
new file mode 100644
index 00000000..6555e569
Binary files /dev/null and b/src/site/images/performance-singlethread.png differ
diff --git a/src/site/markdown/performance.md b/src/site/markdown/performance.md
index 2cefd64d..8af54af4 100644
--- a/src/site/markdown/performance.md
+++ b/src/site/markdown/performance.md
@@ -119,6 +119,12 @@ The "Iterations" column derivation is explained in [Google 
Benchmark documentati
 | Logging int+float using MessageBuffer, JSON/threads:6 | 2110 ns | 6827 ns | 
104646 |
 | Multiprocess logging int+float using MessageBuffer, pattern: \%d \%m\%n | 
3253 ns | 3253 ns | 214839 |
 
+
+This data is shown in the graph below.  The single-threaded tests are shown in 
blue,
+while the multithreaded tests are shown in orange.
+
+![](images/performance-all.png)
+
 -# The "Appending" benchmarks just format the message (using PatternLayout) 
then discard the result.
 -# The "Async" benchmarks test [AsyncAppender](@ref log4cxx::AsyncAppender) 
throughput, with logging events discarded in the background thread.
 -# The "Logging" benchmarks write to a file using buffered output. Overhead is 
2-3 times more when not using buffered output.
@@ -153,4 +159,19 @@ When logging floating point values from a high priority 
thread,
 and you cannot use a background thread to format and write the log data,
 the LOG4CXX_[level]_FMT series of macros impose the least overhead.
 
+The graphs below show the detailed performance results.  The first graph shows
+multithreaded performance.  As shown previously, multithreaded performance
+is generally much lower than single threaded due to locking contention:
+
+![](images/performance-multithread.png)
+
+Single thread performance is shown below:
+
+![](images/performance-singlethread.png)
+
+Note that in both instances, the content of the log message has a significant
+impact on performance.  All of the tests shown in these graphs assume that
+the message is actually being logged.  If the logger is not enabled, no 
messages
+are logged and performance is much better.
+
 [asynchronous output setting]:configuration-files.html#asynch-output

Reply via email to