Skip to content

Commit e34a8bd

Browse files
committed
Tweaks.
1 parent f73fecb commit e34a8bd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import java.time.LocalDateTime
2+
import java.time.format.DateTimeFormatter
3+
14
description = "A low-level extremely fast String compactor for Java."
25

36
plugins {
@@ -11,7 +14,7 @@ repositories {
1114

1215
dependencies {
1316
// Enables running JMH straight from a main method (fixes "/META-INF/BenchmarkList").
14-
// Debugging is possible, but you must set forks to 0 in OptionsBuilder.
17+
// Useful for debugging (you must set forks to 0 in OptionsBuilder).
1518
// Also, check if the dependency version matches jmhVersion at jmh section below.
1619
jmh("org.openjdk.jmh:jmh-generator-annprocess:1.37")
1720
jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:1.37")
@@ -27,14 +30,14 @@ tasks.test {
2730
jmh {
2831
jmhVersion = "1.37"
2932
includes = listOf(".Benchmark.")
30-
benchmarkMode = listOf("thrpt", "avgt")
33+
benchmarkMode = listOf("thrpt")
3134
fork = 2
32-
warmup = "5s"
35+
warmup = "10s"
3336
warmupIterations = 3
3437
iterations = 3
35-
timeOnIteration = "5s"
38+
timeOnIteration = "10s"
3639
threads = 1
3740
timeUnit = "ms"
3841
resultFormat = "TEXT"
39-
resultsFile = file("${layout.projectDirectory}/benchmarks/results-macpro2019-inteli726g.txt")
42+
resultsFile = file("$projectDir/benchmarks/results-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss")) + ".txt")
4043
}

0 commit comments

Comments
 (0)