Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions checksum.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<trusted-key id='3684155e9365c30e' group='com.jayway.jsonpath' />
<trusted-key id='a50569c7ca7fa1f0' group='com.jcraft' />
<trusted-key id='0a36eef644cff773' group='com.metsci.ext.com.kitfox.svg' />
<trusted-key id='bffa420097f49c8a' group='com.lmax' />
<trusted-key id='db45d3a62a183ce2' group='com.miglayout' />
<trusted-key id='aa49c633b4734832' group='com.pinterest' />
<trusted-key id='aa49c633b4734832' group='com.pinterest.ktlint' />
Expand Down
11 changes: 11 additions & 0 deletions dev/count-trans.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
file=$1
shift

for transaction in $@
do
total=$(grep ",$transaction," $file |wc -l)
ok=$(grep ",$transaction," $file | grep ",true," |wc -l)
ko=$(grep ",$transaction," $file | grep ",false," |wc -l)
echo "$transaction Total: $total, OK: $ok, KO: $ko"
done
28 changes: 28 additions & 0 deletions dev/launch-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
THREADS=${1:-500}
shift

echo "***NO DISRUPTOR***"
./launch.sh $THREADS 60 300 0 IRRELEVANT $1

echo "***WITH DISRUPTOR***"
for SIZE in 1024 65536 131072 262144 524288
do
for STRATEGY in BlockingWaitStrategy SleepingWaitStrategy YieldingWaitStrategy BusySpinWaitStrategy
do
./launch.sh $THREADS 60 300 $SIZE $STRATEGY $1
done
done

echo "***STATS***"
for dir in test-*-*
do
echo "$dir: $(./count-trans.sh $dir/results.csv RJ-0)"
done

echo "***ERRORS***"
for dir in test-*-*
do
echo "$dir: $(grep -c 'ERROR\|xception' $dir/jmeter.log)"
done

38 changes: 38 additions & 0 deletions dev/launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
THREADS=${1:-500}
RAMPUP=${2:-60}
DURATION=${3:-300}
RING_BUFFER_SIZE=${4:-65536}
STRATEGY=${5:-BlockingWaitStrategy}
WITH_SUMMARIZER=$6

REV=$(git rev-parse --short HEAD)
if [ -z "$WITH_SUMMARIZER" ]
then
SUMMARIZER_ARG="-Jsummariser.name="
TEST_OUTDIR="test-$REV-$THREADS-$RING_BUFFER_SIZE-$STRATEGY-$(date +%Y%m%d-%H%M%S)"
else
TEST_OUTDIR="test-$REV-$THREADS-$RING_BUFFER_SIZE-$STRATEGY-$(date +%Y%m%d-%H%M%S)-WITH-SUMMMARIZER"
fi

HEAP="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$TEST_OUTDIR"
# Flight recorder
HEAP="$HEAP -XX:StartFlightRecording=disk=true,delay=2m,duration=2m,dumponexit=true,filename=$TEST_OUTDIR/recording.jfr,maxsize=2g,maxage=1d,settings=profile,path-to-gc-roots=true"
HEAP="$HEAP -Duser.timezone=Europe/Paris -Djava.awt.headless=true"
HEAP="$HEAP -Dcom.sun.management.jmxremote.authenticate=false"
HEAP="$HEAP -Dcom.sun.management.jmxremote.ssl=false -Xlog:gc*,gc+age=trace,gc+heap=debug:file=$TEST_OUTDIR/gc_jmeter.log"
HEAP="$HEAP -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false"
#HEAP="$HEAP -verbose:gc"
HEAP="$HEAP -XX:MaxMetaspaceSize=1g -XX:G1HeapRegionSize=32m -XX:MaxGCPauseMillis=50 -Xms5g -Xmx5g -Xss256k"
HEAP="$HEAP -XX:ParallelGCThreads=10 -XX:ConcGCThreads=8"
export HEAP

mkdir $TEST_OUTDIR

#-o $TEST_OUTDIR/report
../bin/jmeter -Lcom.lmax.disruptor=DEBUG $SUMMARIZER_ARG \
-Jthreads=$THREADS \
-Jrampup=$RAMPUP \
-Jduration=$DURATION \
-Jjmeter.save.disruptor.ringbuffer.size=$RING_BUFFER_SIZE \
-Jjmeter.save.disruptor.wait-strategy=$STRATEGY \
-f -n -t 'test.jmx' -l $TEST_OUTDIR/results.csv -j $TEST_OUTDIR/jmeter.log
Binary file added dev/stats.ods
Binary file not shown.
49 changes: 49 additions & 0 deletions dev/test.jmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2.1-SNAPSHOT f4760f7">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG-Load" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Contrôleur Boucle" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${__P(threads, 500)}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${__P(rampup, 60)}</stringProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">${__P(duration, 600)}</stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="RJ-0" enabled="true">
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="SleepTime" elementType="Argument">
<stringProp name="Argument.name">SleepTime</stringProp>
<stringProp name="Argument.value">0</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="SleepMask" elementType="Argument">
<stringProp name="Argument.name">SleepMask</stringProp>
<stringProp name="Argument.value">0x0</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest</stringProp>
</JavaSampler>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
1 change: 1 addition & 0 deletions src/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ dependencies {
implementation("org.jodd:jodd-props")
implementation("org.mozilla:rhino")
implementation("org.slf4j:jcl-over-slf4j")
implementation("com.lmax:disruptor:3.4.2")
// TODO: JMeter bundles Xerces, however the reason is unknown
runtimeOnly("xerces:xercesImpl")
runtimeOnly("xml-apis:xml-apis")
Expand Down
Loading