Skip to content

Commit

Permalink
Add more zio-schema-json benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk committed Jan 10, 2025
1 parent 79026ad commit 7b64f88
Show file tree
Hide file tree
Showing 45 changed files with 188 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,8 @@ object Main {
B("jsoniterScala")(benchmark.jsoniterScala()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new MapOfIntsToBooleansWriting { size = 128; setup() }
Expand All @@ -1258,7 +1259,8 @@ object Main {
B("jsoniterScalaPrealloc")(benchmark.jsoniterScalaPrealloc()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new MissingRequiredFieldsReading { setup() }
Expand Down Expand Up @@ -1500,7 +1502,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfAsciiCharsWriting { size = 128; setup() }
Expand All @@ -1515,7 +1518,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfEscapedCharsReading { size = 128; setup() }
Expand All @@ -1529,7 +1533,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfEscapedCharsWriting { size = 128; setup() }
Expand All @@ -1556,7 +1561,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfNonAsciiCharsWriting { size = 128; setup() }
Expand All @@ -1571,7 +1577,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new TwitterAPIReading { setup() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,8 @@ object Main {
B("jsoniterScala")(benchmark.jsoniterScala()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new MapOfIntsToBooleansWriting { size = 128; setup() }
Expand All @@ -1166,7 +1167,8 @@ object Main {
B("jsoniterScalaPrealloc")(benchmark.jsoniterScalaPrealloc()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new MissingRequiredFieldsReading { setup() }
Expand Down Expand Up @@ -1390,7 +1392,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfAsciiCharsWriting { size = 128; setup() }
Expand All @@ -1404,7 +1407,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfEscapedCharsReading { size = 128; setup() }
Expand All @@ -1417,7 +1421,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfEscapedCharsWriting { size = 128; setup() }
Expand All @@ -1442,7 +1447,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new StringOfNonAsciiCharsWriting { size = 128; setup() }
Expand All @@ -1456,7 +1462,8 @@ object Main {
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
B("smithy4sJson")(benchmark.smithy4sJson()),
B("uPickle")(benchmark.uPickle()),
B("zioJson")(benchmark.zioJson())
B("zioJson")(benchmark.zioJson()),
B("zioSchemaJson")(benchmark.zioSchemaJson())
))
}, {
val benchmark = new TwitterAPIReading { setup() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -31,6 +32,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class MapOfIntsToBooleansWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -33,6 +34,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StringOfAsciiCharsWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -33,6 +34,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StringOfNonAsciiCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -33,6 +34,7 @@ class StringOfNonAsciiCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StringOfNonAsciiCharsWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -28,6 +29,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.playJsonJsoniter())
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class MapOfIntsToBooleansWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -31,6 +32,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class StringOfAsciiCharsWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -31,6 +32,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class StringOfNonAsciiCharsReadingSpec extends BenchmarkSpecBase {
benchmark.smithy4sJson() shouldBe benchmark.obj
benchmark.uPickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -31,6 +32,7 @@ class StringOfNonAsciiCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.smithy4sJson())
intercept[Throwable](b.uPickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class StringOfNonAsciiCharsWritingSpec extends BenchmarkSpecBase {
toString(b.smithy4sJson()) shouldBe b.jsonString
toString(b.uPickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
benchmark.uPickle() shouldBe benchmark.obj
benchmark.weePickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -43,6 +44,7 @@ class MapOfIntsToBooleansReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.uPickle())
intercept[Throwable](b.weePickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class MapOfIntsToBooleansWritingSpec extends BenchmarkSpecBase {
toString(b.uPickle()) shouldBe b.jsonString
toString(b.weePickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
benchmark.uPickle() shouldBe benchmark.obj
benchmark.weePickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -47,6 +48,7 @@ class StringOfAsciiCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.uPickle())
intercept[Throwable](b.weePickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class StringOfAsciiCharsWritingSpec extends BenchmarkSpecBase {
toString(b.uPickle()) shouldBe b.jsonString
toString(b.weePickle()) shouldBe b.jsonString
toString(b.zioJson()) shouldBe b.jsonString
toString(b.zioSchemaJson()) shouldBe b.jsonString
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
benchmark.uPickle() shouldBe benchmark.obj
benchmark.weePickle() shouldBe benchmark.obj
benchmark.zioJson() shouldBe benchmark.obj
benchmark.zioSchemaJson() shouldBe benchmark.obj
}
"fail on invalid input" in {
val b = benchmark
Expand All @@ -47,6 +48,7 @@ class StringOfEscapedCharsReadingSpec extends BenchmarkSpecBase {
intercept[Throwable](b.uPickle())
intercept[Throwable](b.weePickle())
intercept[Throwable](b.zioJson())
intercept[Throwable](b.zioSchemaJson())
}
}
}
Loading

0 comments on commit 7b64f88

Please sign in to comment.