Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more zio-schema-json benchmarks
Browse files Browse the repository at this point in the history
plokhotnyuk committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 79026ad commit 7b64f88
Showing 45 changed files with 188 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
Original file line number Diff line number Diff line change
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -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() }
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.