You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
# Java Logger Benchmark
2
2
3
-
This project is a benchmark for several Java logging libraries. It is using [JMH](https://github.com/openjdk/jmh) to measure the performance of the
4
-
different logging libraries. The goal of the project is to help people that work on performance critical projects to choose the best logger and setup.
3
+
This project is a benchmark for several Java logging libraries.
4
+
It is using [JMH](https://github.com/openjdk/jmh) to measure the performance of the different logging libraries.
5
+
The goal of the project is to help people that work on performance critical projects to choose the best logger and setup.
5
6
6
7
## What libraries are tested?
7
8
@@ -24,12 +25,12 @@ command:
24
25
./mvnw clean test
25
26
```
26
27
27
-
The JMH benchmark is executed by several parameters that are all defined in the
28
-
`com.openelements.logger.api.BenchmarkConstants` class in the `logger-api` module.
28
+
The JMH benchmark is executed by several parameters that are all defined in the `com.openelements.logger.api.BenchmarkConstants` class in the `logger-api` module.
29
29
30
30
## What is tested
31
31
32
-
Since not all loggers provide the same set of functionalities the `com.openelements.logger.api.Logger` interface contains all features that should be tested. That feature set reflects the features that a modern logging api should provide:
32
+
Since not all loggers provide the same set of functionalities the `com.openelements.logger.api.Logger` interface contains all features that should be tested.
33
+
That feature set reflects the features that a modern logging api should provide:
33
34
34
35
- log messages
35
36
- add stack trace (by Throwable)
@@ -44,14 +45,16 @@ Since some loggers does not provide some of the features a simple implementation
44
45
## How to add a new logging library?
45
46
46
47
To add a new logging library, you need to create a new module that contains the implementation of the logging library.
47
-
The `logger-api` module contains a simple interface that needs to be implemented by the logging library. By doing so a
48
-
benchmark for the new logging library can be created that executes the `LogLikeHell` Runnable. All logging libraries
49
-
execute that code to generate comparable results.
48
+
The `logger-api` module contains a simple interface that needs to be implemented by the logging library.
49
+
By doing so a benchmark for the new logging library can be created that executes the `LogLikeHell` Runnable.
50
+
All logging libraries execute that code to generate comparable results.
50
51
51
52
## What are the results?
52
53
53
-
I still need to run the code in a long running benchmark. The metric "Operations per second" defines how often `LogLikeHell` has been executed per second. For a short running benchmark the values look like that (
54
-
sorted from fastest to slowest). All bechmarks have been executed on release `v0.1.0`by using the [Temurin JDK](https://adoptium.net) version 17.
54
+
I still need to run the code in a long running benchmark.
55
+
The metric "Operations per second" defines how often `LogLikeHell` has been executed per second.
56
+
For a short running benchmark the values look like that (sorted from fastest to slowest).
57
+
All bechmarks have been executed on release `v0.1.0` by using the [Temurin JDK](https://adoptium.net) version 17.
55
58
56
59
### Execution on M1 Max MacBook with 64 GB RAM and local SSD
57
60
@@ -118,7 +121,7 @@ The benchmark has been executed on 240 threads in parallel:
118
121
119
122
### CPU usage
120
123
121
-
The Chronicle Logger consumes 100% CPU (all 40 vCPUs are busy, synchronization is done with [CAS](https://en.wikipedia.org/wiki/Compare-and-swap)) while Log4JLoggerBenchmark only consumes 15% CPU
124
+
The Chronicle Logger consumes 100% CPU (all 40 vCPUs are busy, synchronization is done with [CAS](https://en.wikipedia.org/wiki/Compare-and-swap)) while Log4JLoggerBenchmark only consumes 15% CPU.
0 commit comments