A minimal implementation of a Truffle-based language for analysing heap dumps.
To tun tests, execute:
./gradlew check
Producing coverage reports is possible using ./gradlew jacocoTestReport
.
To run a selected set of benchmarks using JMH, execute:
./gradlew :jmh-benchmark:jmh
If you wish to generate a runnable JMH jar with all benchmarks, you can do so using:
./gradlew :jmh-benchmark:shadowJar
which will create the jar in ./jmh-benchmark/build/libs/jmh-benchmark-all.jar
.
To generate a test heap, execute:
./gradlew benchmarks:dump-generator:run
This will generate a predictable medium-sized heap dump in ./benchmarks/dumps/tumor_cell.hprof
.
To run a benchmark script file, execute:
./gradlew benchmarks:runner:bench -Dscript=path/to/oql.js -Dheap=path/to/heap/dump.hprof
Note that heap
defaults to the benchmark heap dump specified above and that for now, the paths are relative to the
benchmark/runner
directory, not the root of the project.
You can choose which implementation of OQL should be used by specifying -Dengine=original
or -Dengine=truffle
.
Default is truffle
.
If you are running on GraalVM, you can dump compilation graphs to IGV automatically by adding -Digv=on
.
The project should automatically use Graal compiler for JavaScript and Heap Language on Hotspot JDKs
with version 11 and above. If you don't want this (run JS using Nashorn), specify -Dgraal=off
.
There are some prepared benchmarks in benchmarks/scripts/
. These typically have a custom gradle task benchXY
associated with them where you don't have to specify the heap or the script:
./gradlew benchmarks:runner:bench01
Some of these benchmarks are also re-implmeneted using fully native Java code, in which case -Dengine=native
is
also available.