"Fossies" - the Fresh Open Source Software Archive 
Member "apache-log4j-2.12.4-src/log4j-core/src/test/resources/perf/runResponseTm.sh" (20 Dec 2021, 3379 Bytes) of package /linux/misc/apache-log4j-2.12.4-src.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/sh
2 #
3 #
4 # Licensed to the Apache Software Foundation (ASF) under one
5 # or more contributor license agreements. See the NOTICE file
6 # distributed with this work for additional information
7 # regarding copyright ownership. The ASF licenses this file
8 # to you under the Apache License, Version 2.0 (the
9 # "License"); you may not use this file except in compliance
10 # with the License. You may obtain a copy of the License at
11 #
12 # http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing,
15 # software distributed under the License is distributed on an
16 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 # KIND, either express or implied. See the License for the
18 # specific language governing permissions and limitations
19 # under the License.
20 #
21
22 NOW=$(date +%Y%m%d-%H%M%S)
23
24 GC_OPTIONS="-XX:+UnlockDiagnosticVMOptions -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime"
25 #GC_OPTIONS="${GC_OPTIONS} -XX:GuaranteedSafepointInterval=500000"
26 GC_OPTIONS="${GC_OPTIONS} -XX:+PrintGCCause -XX:+PrintSafepointStatistics -XX:+LogVMOutput -XX:LogFile=safepoint$NOW.log"
27 COMPILE_OPTIONS="-XX:CompileCommand=dontinline,org.apache.logging.log4j.core.async.perftest.NoOpIdleStrategy::idle"
28
29 #VM_OPTIONS="-XX:+UnlockDiagnosticVMOptions -XX:+PrintCompilation -XX:+PrintInlining"
30
31 LOG4J_OPTIONS=
32 #LOG4J_OPTIONS="-Dlog4j.configurationFile=perf-CountingNoOpAppender.xml"
33 #LOG4J_OPTIONS="-Dlog4j.configurationFile=perf3PlainNoLoc.xml"
34 #LOG4J_OPTIONS="-Dlog4j.configurationFile=perf7MixedNoLoc.xml"
35 LOG4J_OPTIONS="-Dlog4j.configurationFile=perf5AsyncApndNoLoc.xml"
36
37 #LOG4J_OPTIONS="-Dlog4j.configuration=perf-log4j12.xml"
38 #LOG4J_OPTIONS="-Dlog4j.configuration=perf-log4j12-async.xml"
39 #LOG4J_OPTIONS="-Dlogback.configurationFile=perf-logback-async.xml"
40 #LOG4J_OPTIONS="-Dlogback.configurationFile=perf-logback.xml"
41
42 #LOG4J_OPTIONS="${LOG4J_OPTIONS} -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"
43 LOG4J_OPTIONS="${LOG4J_OPTIONS} -Dlog4j2.enable.threadlocals=true"
44 LOG4J_OPTIONS="${LOG4J_OPTIONS} -Dlog4j2.enable.direct.encoders=true"
45 LOG4J_OPTIONS="${LOG4J_OPTIONS} -DAsyncLogger.WaitStrategy=busySpin"
46 LOG4J_OPTIONS="${LOG4J_OPTIONS} -DAsyncLoggerConfig.WaitStrategy=busySpin"
47 #LOG4J_OPTIONS="${LOG4J_OPTIONS} -Dlog4j.format.msg.async=true"
48 export LOG4J_OPTIONS
49
50 CP=".:HdrHistogram-2.1.8.jar:disruptor-3.3.4.jar:log4j-1.2.17.jar:slf4j-api-1.7.21.jar:slf4j-ext-1.7.21.jar:logback-core-1.1.7.jar:logback-classic-1.1.7.jar:log4j-api-2.6-SNAPSHOT.jar:log4j-core-2.6-SNAPSHOT.jar:log4j-core-2.6-SNAPSHOT-tests.jar"
51
52 RUNNER=RunLog4j2
53 RESULTDIR=ApndLog4j2
54 java -Xms1G -Xmx1G $GC_OPTIONS $COMPILE_OPTIONS $VM_OPTIONS $JFR_OPTIONS $LOG4J_OPTIONS -cp $CP org.apache.logging.log4j.core.async.perftest.ResponseTimeTest 1 10000 $RUNNER
55 java -Xms1G -Xmx1G $GC_OPTIONS $COMPILE_OPTIONS $VM_OPTIONS $JFR_OPTIONS $LOG4J_OPTIONS -cp $CP org.apache.logging.log4j.core.async.perftest.ResponseTimeTest 2 5000 $RUNNER
56 java -Xms1G -Xmx1G $GC_OPTIONS $COMPILE_OPTIONS $VM_OPTIONS $JFR_OPTIONS $LOG4J_OPTIONS -cp $CP org.apache.logging.log4j.core.async.perftest.ResponseTimeTest 4 2500 $RUNNER
57 mkdir async$RESULTDIR-10k
58 mv *k? async$RESULTDIR-10k
59 mv nohup.out async$RESULTDIR-10k
60 mv safepoint$NOW.log async$RESULTDIR-10k
61
62