What are your performance targets?
: , , - . /. .
- , . ( ) , . . . , . - ! : .
, , (, , ). , 100 000 - . , , . log4j 2.5 log4j 2.6.1 , log4j.
:
- log4j2 .
- , , log4j. (), , , .
- JMH ( Java), . . , .
. , , , 50% . , ( " " ) ( " " ). . , .
( ) log4j 2.5 log4j 2.6.1.
:
GC, :
-XX:+UnlockDiagnosticVMOptions -verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime
, - , . GC ApplicationStoppedTime ( GC, , safepoint). : Log4j 2.5 Log4j 2.6.1? , GC? , ?
, , GC. GC . , , .
? Java Flight Recorder ( JDK) . profResult.jfr, Mission Control.
java -XX:+UnlockCommercialFeatures -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints
-XX:+FlightRecorder -XX:StartFlightRecording=duration=10m,filename=profResult.jfr
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -cp
.;HdrHistogram-2.1.8.jar;disruptor-3.3.4.jar;log4j-api-2.6.1.jar;log4j-core-2.6.1.jar;myApp.jar
com.mycomp.Benchmark
Java Flight Recorder , , , , . , .