/
run.sh
executable file
·71 lines (62 loc) · 1.88 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
# Assumes a built uber-jar exists in current directory, and that JAVA_HOME is set.
set -e
jvmopts () {
if [ -z "$HTTPGCTEST_COLLECTOR" ]
then
HTTPGCTEST_COLLECTOR="g1"
fi
echo -XX:+UnlockExperimentalVMOptions
echo -XX:+UnlockDiagnosticVMOptions
#echo -Xmaxf=50
#echo -Xminf=30
#echo -XX:GCTimeRatio=1
#echo -XX:-UseAdaptiveSizePolicy
#echo -XX:+PrintTenuringDistribution
#echo -XX:+PrintCompilation
#echo -XX:G1ConfidencePercent=100#
#echo -XX:G1GCPercent=100
#echo -XX:G1YoungGenSize=50m
#echo -XX:NewSize=15m
#echo -XX:MaxNewSize=15m
#echo -XX:+PrintTenuringDistribution
#echo -XX:+PrintHeapAtGC
#echo -XX:+PrintHeapAtGCExtended
if [ "$HTTPGCTEST_COLLECTOR" = "g1" ]
then
echo -XX:+UseG1GC
echo -XX:MaxGCPauseMillis=50
echo -XX:GCPauseIntervalMillis=75
#echo -XX:G1RSetSparseRegionEntries=500
#echo -XX:+G1PrintParCleanupStats
#echo -XX:G1PolicyVerbose=1
#echo -XX:+PrintGCDetails
#echo -XX:G1PrintRegionLivenessInfo=5000
#echo -XX:+G1ParallelRSetUpdatingEnabled
#echo -XX:+G1ParallelRSetScanningEnabled
elif [ "$HTTPGCTEST_COLLECTOR" = "cms" ]
then
echo -XX:+UseConcMarkSweepGC
#echo -XX:+CMSIncrementalMode
echo -XX:+PrintGCDetails
elif [ "$HTTPGCTEST_COLLECTOR" = "throughput" ]
then
echo >/dev/null #prevent syntax error
else
echo "unknown collector: $HTTPGCTEST_COLLECTOR" >&2
exit 1
fi
echo -XX:+CITime
echo -Djava.net.preferIPv4Stack=true
echo -XX:+PrintGC
echo -XX:+PrintGCTimeStamps
echo -XX:+PrintCommandLineFlags
if ! [ -z "$HTTPGCTEST_LOGGC" ]
then
echo -Xloggc:$HTTPGCTEST_LOGGC
fi
echo -Xms50M
echo -Xmx2G
echo -Xss256k
}
$JAVA_HOME/bin/java $(jvmopts) -jar target/httpgctest-1.0-SNAPSHOT.jar