-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_EntityInstantiators.sh
executable file
·37 lines (30 loc) · 1.27 KB
/
run_EntityInstantiators.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
#!/bin/bash
function usage() {
echo "Usage:"
echo
echo " $0 <orm_version>"
echo
echo " <orm> The ORM version to test (e.g. 6.6 or perf)"
}
ORM_VERSION=$1
if [ -z "$ORM_VERSION" ]; then
echo "ERROR: ORM version not supplied"
usage
exit 1
fi
./gradlew jmhJar -Porm=${ORM_VERSION}
java -jar basic/target/libs/hibernate-orm-benchmark-basic-1.0-SNAPSHOT-jmh.jar EntityInstantiators -ppolluteAtWarmup=false -pmorphism=MONO,QUAD -f 2 -pcount=100 -prof gc -prof "async:rawCommand=features=vtable;event=cpu;output=jfr;dir=/tmp;libPath=${ASYNC_PROFILER_HOME}/lib/libasyncProfiler.so"
# first search for all the jfr files in /tmp which contains EntityInstantiators as name
# then run the jfr2flame tool to generate the flamegraphs
# Find all jfr files in /tmp containing EntityInstantiators in the name
jfr_files=$(find /tmp/org.hibernate.benchmark.enhancement.EntityInstantiators*/jfr-cpu.jfr)
# list the jfr files with some comment in between
echo "JFR files found:"
echo $jfr_files
# Run the jfr2flame tool to generate the flamegraphs
echo "Flamegraphs produced:"
for jfr_file in $jfr_files; do
java -cp ${ASYNC_PROFILER_HOME}/lib/converter.jar jfr2flame --lines $jfr_file ${jfr_file%.jfr}-cpu.html
# print the produced ones
echo ${jfr_file%.jfr}-cpu.html
done