Skip to content

Commit 11fc52c

Browse files
Add benchmark for building four-digit UTC offset format
1 parent 4a1f53c commit 11fc52c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

benchmarks/src/jmh/kotlin/CommonFormats.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,13 @@ open class CommonFormats {
7373
}
7474
blackhole.consume(format)
7575
}
76+
77+
@Benchmark
78+
fun buildFourDigitsUtcOffsetFormat(blackhole: Blackhole) {
79+
val format = UtcOffset.Format {
80+
offsetHours()
81+
offsetMinutesOfHour()
82+
}
83+
blackhole.consume(format)
84+
}
7685
}

0 commit comments

Comments
 (0)