Skip to content

Commit ea1e5ba

Browse files
committed
Fix report timestamp folder for multiple runs
1 parent 97c3cb1 commit ea1e5ba

File tree

1 file changed

+5
-2
lines changed
  • plugin/main/src/org/jetbrains/gradle/benchmarks

1 file changed

+5
-2
lines changed

plugin/main/src/org/jetbrains/gradle/benchmarks/Utils.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ fun Project.benchmarkReportsDir(config: BenchmarkConfiguration, target: Benchmar
3939
val ext = project.extensions.extraProperties
4040
val time = if (ext.has("reportTime")) {
4141
ext.get("reportTime") as LocalDateTime
42-
} else
43-
LocalDateTime.now()
42+
} else {
43+
LocalDateTime.now().also {
44+
ext.set("reportTime", it)
45+
}
46+
}
4447
val timestamp = time.format(DateTimeFormatter.ISO_DATE_TIME)
4548
val compatibleTime = timestamp.replace(":", ".") // Windows doesn't allow ':' in path
4649
return file(buildDir.resolve(target.extension.reportsDir).resolve(config.name).resolve(compatibleTime))

0 commit comments

Comments
 (0)