blob: 6406215aef3c7e0da4dca502226a7928520525fa [file] [edit]
plugins {
id 'rhino.java-conventions'
id "me.champeau.jmh" version "0.7.3"
}
dependencies {
implementation project(':rhino')
implementation project(':rhino-tools')
}
jmh {
if (System.getenv('BENCHMARK') != null) {
includes = [System.getenv('BENCHMARK')]
}
if (System.getenv('EVALMODE') != null) {
def vals = System.getenv('EVALMODE').split(",")
def aParams = project.objects.listProperty(String)
for (String v : vals) {
aParams.add(v)
}
benchmarkParameters = [evalMethod: aParams]
}
if (System.getenv('PROFILERS') != null) {
if ('cpu'.equals(System.getenv('PROFILERS'))) {
profilers = ['async:output=jfr']
} else if ('alloc'.equals(System.getenv('PROFILERS'))) {
profilers = ['async:output=jfr;event=alloc']
} else {
profilers = []
for (String v :System.getenv('PROFILERS').split(',')) {
profilers.add(v)
}
}
}
jvmArgs = ['-XX:-BackgroundCompilation']
benchmarkMode = ['avgt']
fork = 1
iterations = 5
timeOnIteration = '2s'
warmupIterations = 4
warmup = '5s'
}