Skip to content

Commit ff278ec

Browse files
authored
Add large TOML file for benchmarking (#285)
1 parent 6ada1e3 commit ff278ec

3 files changed

Lines changed: 708018 additions & 0 deletions

File tree

Benchmarks/TOMLDecoderBenchmarks/Benchmarks.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ let benchmarks: @Sendable () -> Void = {
4040
benchmark.startMeasurement()
4141
try blackHole(decoder.decode(TwitterArchive.self, from: Resources.twitterTOMLString))
4242
}
43+
44+
Benchmark("parse GitHub events archive") { _ in
45+
try blackHole(TOMLTable(source: Resources.eventArchiveTOMLString))
46+
}
4347
}
4448

4549
let tomlIOTOML = """

Sources/Resources/Resources.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ public enum Resources {
1515
public static var canadaTOMLString: String {
1616
stringContent(forResource: "canada.toml")
1717
}
18+
19+
public static var eventArchiveTOMLString: String {
20+
stringContent(forResource: "github-events-archive.toml")
21+
}
1822
}

0 commit comments

Comments
 (0)