File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,10 +9,30 @@ version = "1.0-SNAPSHOT"
99jmh {
1010 jmhVersion.set(" 0.1.0" )
1111
12+ benchmarkMode.set(listOf (" avgt" ))
13+ timeUnit.set(" ns" )
14+ warmupIterations.set(2 )
15+ warmup.set(" 1s" )
16+ iterations.set(3 )
17+ timeOnIteration.set(" 1s" )
18+ fork.set(3 )
19+ resultFormat.set(" JSON" )
20+
1221 // Force a System.gc() between iterations so heap state is reset before each
1322 // measurement starts. Without this, a GC pause can land inside the measurement
1423 // window and show up as a spurious regression in CI.
1524 forceGC = true
25+
26+ // Run subset of the benchmarks to avoid long CI runtimes
27+ if (System .getenv(" CODSPEED_ENV" ) != null ) {
28+ logger.lifecycle(" CODSPEED_ENV detected — running curated CI benchmark subset" )
29+ // me.champeau.jmh joins `includes` with commas into a single positional
30+ // regex passed to JMH, so multiple entries collapse to one pattern with
31+ // literal commas and match nothing. Use a single alternation instead.
32+ includes.set(listOf (
33+ " .*(SleepBenchmark|BacktrackingBenchmark|FibBenchmark).*" ,
34+ ))
35+ }
1636}
1737
1838sourceSets {
You can’t perform that action at this time.
0 commit comments