diff --git a/.gitignore b/.gitignore index bd23e50d..40e35aa8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ out gpg.sbt modules/**/target +.DS_Store */jmh-result.json .vscode diff --git a/README.md b/README.md index 5975eaf3..71d9e97d 100644 --- a/README.md +++ b/README.md @@ -3,50 +3,441 @@ | [![Build Status](https://github.com/tethys-json/tethys/workflows/Scala%20CI/badge.svg)](https://github.com/tethys-json/tethys/actions) | [![Maven Central](https://img.shields.io/maven-central/v/com.tethys-json/tethys-core_2.13.svg)](https://search.maven.org/search?q=com.tethys-json.tethys-json) | # tethys -tethys is a JSON parsing/writing library for Scala +tethys is AST free json library for Scala -# benchmarks +It's advantages: +1. Performant + * Built in bridge to jackson [(benchmarks)](./modules/benchmarks) + -[see here](./modules/benchmarks) +2. User friendly + * Build reader/writer by hand for product and sum types + * Configurable recursive semiauto derivation + * Discriminator support for sum types derivation -# Quick start - -Add dependencies to your `build.sbt` + +## Quick start ```scala val tethysVersion = "latest version in badge" libraryDependencies ++= Seq( "com.tethys-json" %% "tethys-core" % tethysVersion, - "com.tethys-json" %% "tethys-jackson213" % tethysVersion, - "com.tethys-json" %% "tethys-derivation" % tethysVersion + "com.tethys-json" %% "tethys-jackson" % tethysVersion ) ``` -or just +## Read/Write JSON API +tethys provides extension methods allowing you to read and write JSON -```scala -libraryDependencies ++= Seq( - "com.tethys-json" %% "tethys" % "latest version in badge" -) +They look something like this: +```scala 3 +package tethys + +extension [A](value: A) + def asJson(using + jw: JsonWriter[A], + twp: TokenWriterProducer + ): String = ??? + +extension (value: String) + def readJson[A](using + jr: JsonReader[A], + tip: TokenIteratorProducer + ): Either[ReaderError, A] = ??? +``` + +Tethys provides **TokenWriterProducer** and **TokenIteratorProducer** automatically, +so in most cases you only need to provide **JsonReader** or **JsonWriter**. +Let's see how can we get one. + + +## Basic instances +tethys provides **JsonReader** and **JsonWriter** instances for a bunch of basic types + +Check links below to see exact ones: + +[JsonReader instances](./modules/core/src/main/scala/tethys/readers/instances/AllJsonReaders.scala) + +[JsonWriters instances](./modules/core/src/main/scala/tethys/writers/instances/AllJsonWriters.scala) + +## Build instances by hand + +### map and contramap + +You can create new instances for your types using: +1. **contramap** on already existing writer +2. **map** on already existing reader + +```scala 3 +import tethys.* + +case class StringWrapper(value: String) extends AnyVal + +given JsonWriter[StringWrapper] = + JsonWriter[String].contramap(_.value) + +given JsonReader[StringWrapper] = + JsonReader[String].map(StringWrapper(_)) ``` -Also, tethys has the following integrations: +### JsonWriter + +To build JsonWriter for case class you can use `obj` method on its companion object. + +```scala 3 +import tethys.* + + case class MobileSession( + id: Long, + deviceId: String, + userId: java.lang.UUID + ) extends Session + +object MobileSession: + given JsonObjectWriter[MobileSession] = JsonWriter.obj[MobileSession] + .addField("id")(_.id) + .addField("deviceId")(_.deviceId) + .addField("userId")(_.userId) + +``` + +You can concat multiple **JsonObjectWriter**. +Combining concatenation with derivation allows to create **JsonWriter** for sealed trait. +To derive JsonWriter for sealed trait you need to have **JsonObjectWriter** instances for all subtypes in scope + +```scala 3 + +given JsonWriter[Session] = + JsonWriter.obj[Session].addField("typ")(_.typ) ++ JsonObjectWriter.derived[Session] + +``` + + +### JsonReader + +To build JsonReader for case class you can use `builder` method on its companion object. + +```scala 3 +import tethys.* + + case class MobileSession( + id: Long, + deviceId: String, + userId: java.lang.UUID + ) extends Session("mobile") + + object Mobile: + given JsonReader[MobileSession] = JsonReader.builder + .addField[Long]("id") + .addField[String]("deviceId") + .addField[java.lang.UUID]("userId") + .buildReader(MobileSession(_, _, _)) + + +``` + +To build JsonReader for sealed trait you can use `selectReader` after adding some field: + +```scala 3 +import tethys.* + + object Session: + given webReader: JsonReader[WebSession] = ??? + given mobileReader: JsonReader[MobileSession] = ??? + + given JsonReader[Session] = JsonReader.builder + .addField[String]("typ") + .selectReader { + case "web" => webReader + case "mobile" => mobileReader + } + + +``` + + +## Derivation + +All examples consider you made this imports: +```scala 3 +import tethys.* +import tethys.jackson.* // or tethys.jackson.pretty.* for pretty printing +``` + + +### Basic enums +1. **StringEnumJsonWriter** and **StringEnumJsonReader** + +```scala 3 +enum SessionType derives StringEnumJsonWriter, StringEnumJsonReader: + case Mobile, Web + +case class Session(typ: SessionType) derives JsonReader, JsonObjectWriter + +val session = Session(typ = SessionType.Mobile) +val json = """{"typ": "Mobile"}""" + +json.jsonAs[Session] == Right(session) +session.asJson == json +``` +2. **OrdinalEnumJsonWriter** and **OrdinalEnumJsonReader** + +```scala 3 +enum SessionType derives OrdinalEnumJsonWriter, OrdinalEnumJsonReader: + case Mobile, Web + +case class Session(typ: SessionType) derives JsonReader, JsonObjectWriter + +val session = Session(typ = SessionType.Web) +val json = """{"typ": "1"}""" + +json.jsonAs[Session] == Right(session) +session.asJson == json +``` + +### Case classes + +```scala 3 +case class Session( + id: Long, + userId: String +) derives JsonReader, JsonObjectWriter + +val session = Session(id = 123, userId = "3-X56812") +val json = """{"id": 123, "userId": "3-X56812"}""" + +json.jsonAs[Session] == Right(session) +session.asJson == json +``` + +## Sealed traits and enums +To derive **JsonReader** you **must** provide a discriminator. +This can be done via **selector** annotation +Discriminator for **JsonWriter** is optional. + +If you don't need readers/writers for subtypes, you can omit them, +they will be derived recursively for your trait/enum. + +```scala 3 +import tethys.selector + +sealed trait UserAccount(@selector val typ: String) derives JsonReader, JsonObjectWriter + +object UserAccount: + case class Customer( + id: Long, + phone: String + ) extends UserAccount("Customer") + + case class Employee( + id: Long, + phone: String, + position: String + ) extends UserAccount("Employee") + +val account: UserAccount = UserAccount.Customer(id = 123, phone = "+12394283293" +val json = """{"typ": "Customer", "id": 123, "userId": "+12394283293"}""" + +json.jsonAs[UserAccount] == Right(account) +account.asJson == json +``` + +## Configuration + +1. You can configure only case class derivation +2. To configure **JsonReader** use **ReaderBuilder** +3. To configure **JsonWriter** use **WriterBuilder** +4. Configuration can be provided: + * **directly to derived method** + ```scala 3 + given JsonWriter[UserAccount.Customer] = + JsonObjectWriter.derived { + WriterBuilder[UserAccount.Customer] + } + ``` + * **as an inline given to derives** + ```scala 3 + object Customer: + inline given WriterBuilder[UserAccount.Customer] = + WriterBuilder[UserAccount.Customer] + ``` + P.S. There are empty **WriterBuilder** in the examples to simplify demonstration of two approaches. You shouldn't use empty one +5. **WriterBuilder** features +```scala 3 +case class Foo(a: Int, b: String, c: Any, d: Boolean, e: Double) + +inline given WriterBuilder[Foo] = + WriterBuilder[Foo] + // choose field style + .fieldStyle(FieldStyle.UpperSnakeCase) + // remove field + .remove(_.b) + // add new field + .add("d")(_.b.trim) + // rename field + .rename(_.e)("z") + // update field (also you can rename it using withRename after choosing field) + .update(_.a)(_ + 1) + // update field from root (same as update, but function is from root element) + .update(_.d).fromRoot(foo => if (foo.d) foo.a else foo.a / 2) + // possibility to semiauto derive any + .update(_.c) { + case s: String => s + case i: Int if i % 2 == 0 => i / 2 + case i: Int => i + 1 + case other => other.toString + } +``` +6. **ReaderBuilder** features +```scala 3 + +inline given ReaderBuilder[Foo] = + ReaderBuilder[Foo] + // extract field from a value of a specific type + .extract(_.e).as[Option[Double]](_.getOrElse(1.0)) + + // extract field as combination of model fields and some other fields from json + .extract(_.a).from(_.b).and[Int]("otherField2")((b, other) => d.toInt + other) + + // provide reader for Any field + .extractReader(_.c).from(_.a) { + case 1 => JsonReader[String] + case 2 => JsonReader[Int] + case _ => JsonReader[Option[Boolean]] + } +``` + + +## integrations +In some cases, you may need to work with raw AST, +so tethys can offer you **circe** and **json4s** AST support + #### Circe [see project page](https://github.com/circe/circe) ```scala libraryDependencies += "com.tethys-json" %% "tethys-circe" % tethysVersion ``` + +```scala 3 +import tethys.* +import tethys.jackson.* +import tethys.circe.* + +import io.circe.Json + +case class Foo(bar: Int, baz: Json) derives JsonReader + +val json = """{"bar": 1, "baz": ["some", {"arbitrary": "json"}]}""" +val foo = json.jsonAs[Foo].fold(throw _, identity) + +foo.bar // 1: Int +foo.baz // [ "some", { "arbitrary" : "json" } ]: io.circe.Json +``` + #### Json4s [see project page](https://github.com/json4s/json4s) ```scala libraryDependencies += "com.tethys-json" %% "tethys-json4s" % tethysVersion ``` + +```scala +import tethys.* +import tethys.jackson.* +import tethys.json4s.* + +import org.json4s.JsonAST.* + +case class Foo(bar: Int, baz: JValue) derives JsonReader + +val json = """{"bar": 1, "baz": ["some", {"arbitrary": "json"}]""" +val foo = json.jsonAs[Foo].fold(throw _, identity) + +foo.bar // 1 +foo.baz // JArray(List(JString("some"), JObject("arbitrary" -> JString("json")))) +``` #### Enumeratum [see project page](https://github.com/lloydmeta/enumeratum) ```scala libraryDependencies += "com.tethys-json" %% "tethys-enumeratum" % tethysVersion ``` +enumeratum module provides a bunch of mixins for your Enum classes. +```scala + +import enumeratum.{Enum, EnumEntry} +import tethys.enumeratum.* + +sealed trait Direction extends EnumEntry +case object Direction extends Enum[Direction] + with TethysEnum[Direction] // provides JsonReader and JsonWriter instances + with TethysKeyEnum[Direction] { // provides KeyReader and KeyWriter instances + + + case object Up extends Direction + case object Down extends Direction + case object Left extends Direction + case object Right extends Direction + + val values = findValues +} + +``` + +## scala 2 + +### migration notes +When migrating to **scala 3** you should use **0.28.1** version. + +Scala 3 derivation API in **1.0.0** has a lot of deprecations and is not fully compatible with **0.28.1**, including: + +1. **WriterDescription** and **ReaderDescription** are deprecated along with **describe** macro. + You can use **WriterBuilder** and **ReaderBuilder** directly instead + + +2. **DependentField** model for **ReaderBuilder** has changed. + Now `extract field from` feature works like this: + * exactly one **from** call + * chain of **and** calls (until compiler lets you) + * both methods **from/and** has two forms + * select some field from your model + * provide type to method and name of field as string parameter + +```scala 3 + ReaderBuilder[SimpleType] + .extract(_.i).from(_.d).and[Double]("e")((d, e) => (d + e).toInt) +``` + +3. **0.28.1 scala 3 enum support** will not compile to prevent runtime effects during migration + + +4. `updatePartial` for **WriterBuilder** is deprecated. You can use ```update``` instead + +5. all derivation api is moved directly into core module in **tethys** package, including + * FieldStyle + * WriterBuilder + * ReaderBuilder + +6. **auto** derivation is removed + + +### Quick start +Add dependencies to your `build.sbt` + +```scala +val tethysVersion = "latest version in badge" +libraryDependencies ++= Seq( + "com.tethys-json" %% "tethys-core" % tethysVersion, + "com.tethys-json" %% "tethys-jackson213" % tethysVersion, + "com.tethys-json" %% "tethys-derivation" % tethysVersion +) +``` + +```scala +libraryDependencies ++= Seq( + "com.tethys-json" %% "tethys" % "latest version in badge" +) +``` + # core core module contains all type classes for parsing/writing JSON. @@ -244,68 +635,3 @@ case class Bar(seq: Seq[Int]) val foo = """{"bar":{"seq":[1,2,3]}}""".jsonAs[Foo].fold(throw _, identity) val json = foo.asJson ``` - - -# AST support -In some cases, you may need to work with raw AST, -so tethys can offer you circe and json4s AST support: - -## circe AST support -```scala -import tethys._ -import tethys.jackson._ -import tethys.derivation.auto._ -import tethys.circe._ - -import io.circe.Json - -case class Foo(bar: Int, baz: Json) - -val json = """{"bar": 1, "baz": ["some", {"arbitrary": "json"}]}""" -val foo = json.jsonAs[Foo].fold(throw _, identity) - -foo.bar // 1: Int -foo.baz // [ "some", { "arbitrary" : "json" } ]: io.circe.Json -``` - -## json4s AST support -```scala -import tethys._ -import tethys.jackson._ -import tethys.derivation.semiauto._ -import tethys.json4s._ - -import org.json4s.JsonAST._ - -case class Foo(bar: Int, baz: JValue) - -val json = """{"bar": 1, "baz": ["some", {"arbitrary": "json"}]""" -val foo = json.jsonAs[Foo].fold(throw _, identity) - -foo.bar // 1 -foo.baz // JArray(List(JString("some"), JObject("arbitrary" -> JString("json")))) -``` - -# enumeratum support - -enumeratum module provides bunch of mixins for your Enum classes. -```scala - -import enumeratum.{Enum, EnumEntry} -import tethys.enumeratum._ - -sealed trait Direction extends EnumEntry -case object Direction extends Enum[Direction] - with TethysEnum[Direction] // provides JsonReader and JsonWriter instances - with TethysKeyEnum[Direction] { // provides KeyReader and KeyWriter instances - - - case object Up extends Direction - case object Down extends Direction - case object Left extends Direction - case object Right extends Direction - - val values = findValues -} - -``` diff --git a/build.sbt b/build.sbt index f6e87b9d..a15dbc9d 100644 --- a/build.sbt +++ b/build.sbt @@ -251,13 +251,14 @@ lazy val benchmarks = project publishTo := None, libraryDependencies ++= Seq( "io.spray" %% "spray-json" % "1.3.6", - "org.json4s" %% "json4s-native" % "4.0.6", - "org.json4s" %% "json4s-jackson" % "4.0.6", - "io.circe" %% "circe-core" % "0.14.3", - "io.circe" %% "circe-generic" % "0.14.3", - "io.circe" %% "circe-jawn" % "0.14.3", + "org.json4s" %% "json4s-native" % "4.0.7", + "org.json4s" %% "json4s-jackson" % "4.0.7", + "io.circe" %% "circe-core" % "0.14.9", + "io.circe" %% "circe-generic" % "0.14.9", + "io.circe" %% "circe-jawn" % "0.14.9", "io.circe" %% "circe-jackson210" % "0.14.0", - "com.typesafe.play" %% "play-json" % "2.10.0-RC7", + "dev.zio" %% "zio-json" % "0.7.1", + "com.typesafe.play" %% "play-json" % "2.10.5", "org.knowm.xchart" % "xchart" % "3.8.2" exclude ("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources () ), scalacOptions ++= { diff --git a/modules/benchmarks/README.md b/modules/benchmarks/README.md index 19a5f83a..5bb18392 100644 --- a/modules/benchmarks/README.md +++ b/modules/benchmarks/README.md @@ -3,14 +3,13 @@ name \ size|128b|1kb|128kb|1mb|32mb ---|---|---|---|---|--- -tethys-jackson|658951.389|94736.726|733.012|75.496|2.074 -pure-jackson|605937.562|105919.836|868.511|95.066|1.929 -circe-jawn|500633.274|66962.275|498.646|51.116|0.237 -circe-jackson|176264.381|25799.317|151.52|16.372|0.089 -json4s-jackson|81864.174|12649.038|89.053|10.534|0.067 -json4s-native|77152.505|11726.397|80.094|9.209|0.034 -play-json|214148.365|28851.521|186.734|17.297|0.081 -spray-json|351719.553|47149.179|347.749|36.3|0.345 +tethys-jackson|1442640.742|160561.914|1342.185|160.448|3.014 +pure-jackson|1189799.594|212591.263|1721.623|184.572|3.733 +circe-jawn|866471.554|112596.096|945.419|124.767|1.523 +circe-jackson|348613.16|48776.933|363.005|39.485|0.872 +play-json|534060.4|64804.735|499.574|43.91|0.927 +spray-json|971689.213|121363.845|1028.76|123.771|2.188 +zio-json|2001448.661|255068.591|2001.826|237.499|3.439 ![ParsingPerformance](./images/ParsingPerformance.png) @@ -21,15 +20,12 @@ spray-json|351719.553|47149.179|347.749|36.3|0.345 name \ size|128b|1kb|128kb|1mb|32mb ---|---|---|---|---|--- -tethys-jackson|933624.586|220229.694|1641.102|205.924|3.484 -pure-jackson|563304.441|179625.306|1876.364|220.472|4.014 -circe|621310.962|86294.08|616.222|56.9|0.801 -java.lang.StringBuilder|1365829.788|197955.272|1527.102|167.981|4.629 -scala.StringBuilder|1288411.486|196492.325|1531.357|155.445|4.544 -json4s-jackson|185964.967|24597.714|178.298|20.374|0.377 -json4s-native|197545.065|25536.414|194.544|21.216|0.728 -play-json|197279.434|27718.526|208.257|22.433|0.489 -spray-json|409063.537|54303.176|384.963|39.317|0.54 +tethys-jackson|1819887.866|403267.403|3265.018|300.502|11.786 +pure-jackson|1109155.693|427421.925|3096.09|392.062|10.441 +circe|1348593.267|177497.011|1255.093|157.518|2.706 +play-json|327191.603|47736.655|360.734|49.417|1.064 +spray-json|1172370.195|148580.554|1053.782|142.164|3.425 +zio-json|2191564.981|266636.44|2092.48|239.598|7.347 ![WritingPerformance](./images/WritingPerformance.png) diff --git a/modules/benchmarks/images/ParsingPerformance.png b/modules/benchmarks/images/ParsingPerformance.png index 99112c0f..e8c8bd1e 100644 Binary files a/modules/benchmarks/images/ParsingPerformance.png and b/modules/benchmarks/images/ParsingPerformance.png differ diff --git a/modules/benchmarks/images/WritingPerformance.png b/modules/benchmarks/images/WritingPerformance.png index c7ad951d..a9da918d 100644 Binary files a/modules/benchmarks/images/WritingPerformance.png and b/modules/benchmarks/images/WritingPerformance.png differ diff --git a/modules/benchmarks/jmh-reader.json b/modules/benchmarks/jmh-reader.json index 04536e69..41473838 100644 --- a/modules/benchmarks/jmh-reader.json +++ b/modules/benchmarks/jmh-reader.json @@ -1,18 +1,18 @@ [ { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -24,49 +24,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 658951.388995609, - "scoreError" : 10409.794691176181, + "score" : 1442640.7423825143, + "scoreError" : 78952.05954556566, "scoreConfidence" : [ - 648541.5943044329, - 669361.1836867852 + 1363688.6828369487, + 1521592.80192808 ], "scorePercentiles" : { - "0.0" : 641363.5297425095, - "50.0" : 657202.037440183, - "90.0" : 674397.8603718046, - "95.0" : 675185.2369060492, - "99.0" : 675185.2369060492, - "99.9" : 675185.2369060492, - "99.99" : 675185.2369060492, - "99.999" : 675185.2369060492, - "99.9999" : 675185.2369060492, - "100.0" : 675185.2369060492 + "0.0" : 1424673.1377489888, + "50.0" : 1447698.8286684984, + "90.0" : 1450492.1744440713, + "95.0" : 1450492.1744440713, + "99.0" : 1450492.1744440713, + "99.9" : 1450492.1744440713, + "99.99" : 1450492.1744440713, + "99.999" : 1450492.1744440713, + "99.9999" : 1450492.1744440713, + "100.0" : 1450492.1744440713 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 662013.3868718494, - 657952.8322583775, - 658769.0430121995, - 658854.9471292299 - ], - [ - 656451.2426219885, - 655217.6184285424, - 641363.5297425095, - 644196.3612030616 - ], - [ - 653930.579550933, - 651370.0431315282, - 654941.1707245982, - 653261.2771189921 - ], - [ - 671778.8543583936, - 673875.6875857917, - 675185.2369060492, - 674060.4132856997 + 1424673.1377489888, + 1445230.597521309, + 1450492.1744440713, + 1450167.059815688 ] ] }, @@ -74,19 +56,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -98,49 +80,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 605937.56231227, - "scoreError" : 5578.4472318049475, + "score" : 1189799.5938527994, + "scoreError" : 55190.13562201335, "scoreConfidence" : [ - 600359.1150804651, - 611516.009544075 + 1134609.458230786, + 1244989.7294748127 ], "scorePercentiles" : { - "0.0" : 598685.6005591375, - "50.0" : 604053.1920628287, - "90.0" : 612655.3259457556, - "95.0" : 613513.9278761722, - "99.0" : 613513.9278761722, - "99.9" : 613513.9278761722, - "99.99" : 613513.9278761722, - "99.999" : 613513.9278761722, - "99.9999" : 613513.9278761722, - "100.0" : 613513.9278761722 + "0.0" : 1181260.403353757, + "50.0" : 1188999.6753648564, + "90.0" : 1199938.621327727, + "95.0" : 1199938.621327727, + "99.0" : 1199938.621327727, + "99.9" : 1199938.621327727, + "99.99" : 1199938.621327727, + "99.999" : 1199938.621327727, + "99.9999" : 1199938.621327727, + "100.0" : 1199938.621327727 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 603097.7265573941, - 603579.4763189695, - 604174.3441837655, - 603932.039941892 - ], - [ - 610857.750304748, - 611594.3941529404, - 609000.926054133, - 598685.6005591375 - ], - [ - 600343.9883109396, - 599285.8042941683, - 600532.4594397908, - 600055.920960186 - ], - [ - 612287.3536898626, - 613513.9278761722, - 611917.0404171594, - 612142.243935064 + 1181260.403353757, + 1199938.621327727, + 1184426.1072955476, + 1193573.2434341651 ] ] }, @@ -148,19 +112,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -172,49 +136,31 @@ "processorName" : "circe-jawn" }, "primaryMetric" : { - "score" : 500633.2739456461, - "scoreError" : 2620.8951749315697, + "score" : 866471.5537783348, + "scoreError" : 5292.831154030518, "scoreConfidence" : [ - 498012.37877071457, - 503254.1691205777 + 861178.7226243042, + 871764.3849323653 ], "scorePercentiles" : { - "0.0" : 493079.141369335, - "50.0" : 501095.401694719, - "90.0" : 503167.90012342436, - "95.0" : 504167.9521275281, - "99.0" : 504167.9521275281, - "99.9" : 504167.9521275281, - "99.99" : 504167.9521275281, - "99.999" : 504167.9521275281, - "99.9999" : 504167.9521275281, - "100.0" : 504167.9521275281 + "0.0" : 865306.6927368287, + "50.0" : 866678.8023450469, + "90.0" : 867221.9176864165, + "95.0" : 867221.9176864165, + "99.0" : 867221.9176864165, + "99.9" : 867221.9176864165, + "99.99" : 867221.9176864165, + "99.999" : 867221.9176864165, + "99.9999" : 867221.9176864165, + "100.0" : 867221.9176864165 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 502739.3064073799, - 504167.9521275281, - 501160.8485840649, - 502142.0980357803 - ], - [ - 501029.954805373, - 497262.5360060103, - 493079.141369335, - 502725.36417776713 - ], - [ - 501863.79584935884, - 500304.80179954204, - 501975.79752170714, - 501511.0057417718 - ], - [ - 499093.9049262305, - 500113.8587626581, - 500305.46680449136, - 500656.5502113397 + 866620.5653716372, + 866737.0393184565, + 867221.9176864165, + 865306.6927368287 ] ] }, @@ -222,19 +168,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -246,123 +192,31 @@ "processorName" : "circe-jackson" }, "primaryMetric" : { - "score" : 176264.38068090298, - "scoreError" : 3700.6494023317723, - "scoreConfidence" : [ - 172563.7312785712, - 179965.03008323474 - ], - "scorePercentiles" : { - "0.0" : 171853.90702283886, - "50.0" : 175904.00648784213, - "90.0" : 181118.0766039961, - "95.0" : 181199.1102906131, - "99.0" : 181199.1102906131, - "99.9" : 181199.1102906131, - "99.99" : 181199.1102906131, - "99.999" : 181199.1102906131, - "99.9999" : 181199.1102906131, - "100.0" : 181199.1102906131 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 173766.01951834856, - 173881.58256755627, - 174098.53352375622, - 173634.64985737752 - ], - [ - 177709.479451928, - 178262.96647951007, - 178288.47687660358, - 178389.58943484264 - ], - [ - 181054.30706494846, - 181083.34788116024, - 180597.99534059232, - 181199.1102906131 - ], - [ - 171933.94406961763, - 172257.61158171296, - 171853.90702283886, - 172218.56993304158 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhReaderBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "128b", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 81864.17395440809, - "scoreError" : 1224.9919429435877, + "score" : 348613.15950133896, + "scoreError" : 4090.8100080596914, "scoreConfidence" : [ - 80639.18201146451, - 83089.16589735168 + 344522.3494932793, + 352703.9695093986 ], "scorePercentiles" : { - "0.0" : 80227.77281321479, - "50.0" : 81806.60298529593, - "90.0" : 83561.74951430986, - "95.0" : 83863.78629959376, - "99.0" : 83863.78629959376, - "99.9" : 83863.78629959376, - "99.99" : 83863.78629959376, - "99.999" : 83863.78629959376, - "99.9999" : 83863.78629959376, - "100.0" : 83863.78629959376 + "0.0" : 347717.6375497792, + "50.0" : 348790.33516368154, + "90.0" : 349154.3301282136, + "95.0" : 349154.3301282136, + "99.0" : 349154.3301282136, + "99.9" : 349154.3301282136, + "99.99" : 349154.3301282136, + "99.999" : 349154.3301282136, + "99.9999" : 349154.3301282136, + "100.0" : 349154.3301282136 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 80998.5355077431, - 81459.01795182875, - 80965.93934381747, - 81339.75357313985 - ], - [ - 80440.2168137845, - 80648.56442179423, - 80227.77281321479, - 80475.48225782569 - ], - [ - 82359.75686613395, - 82292.67531833303, - 82582.34614609252, - 82154.18801876312 - ], - [ - 83432.30517775963, - 83162.71120218273, - 83423.73155852217, - 83863.78629959376 + 347717.6375497792, + 348640.8739915605, + 348939.79633580265, + 349154.3301282136 ] ] }, @@ -370,19 +224,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -391,52 +245,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 77152.50501820528, - "scoreError" : 2504.2614699226547, + "score" : 534060.399904814, + "scoreError" : 6799.148614768325, "scoreConfidence" : [ - 74648.24354828263, - 79656.76648812793 + 527261.2512900457, + 540859.5485195823 ], "scorePercentiles" : { - "0.0" : 75040.14127673954, - "50.0" : 76123.5535544771, - "90.0" : 81329.76223809269, - "95.0" : 81478.11273777255, - "99.0" : 81478.11273777255, - "99.9" : 81478.11273777255, - "99.99" : 81478.11273777255, - "99.999" : 81478.11273777255, - "99.9999" : 81478.11273777255, - "100.0" : 81478.11273777255 + "0.0" : 533261.5614296852, + "50.0" : 533703.7411456113, + "90.0" : 535572.5558983481, + "95.0" : 535572.5558983481, + "99.0" : 535572.5558983481, + "99.9" : 535572.5558983481, + "99.99" : 535572.5558983481, + "99.999" : 535572.5558983481, + "99.9999" : 535572.5558983481, + "100.0" : 535572.5558983481 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 75040.14127673954, - 75081.30707853266, - 75441.17434411592, - 75153.1679635527 - ], - [ - 76414.22849102043, - 76468.71176556287, - 76568.70504960236, - 76267.15664734751 - ], - [ - 75552.90514459906, - 75748.59320371252, - 75979.95046160668, - 75945.56685592906 - ], - [ - 81188.56997731072, - 81266.18345251562, - 81478.11273777255, - 80845.60584136427 + 533437.2341277611, + 533261.5614296852, + 535572.5558983481, + 533970.2481634615 ] ] }, @@ -444,19 +280,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -465,52 +301,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 214148.36529218202, - "scoreError" : 1853.8028321186796, + "score" : 971689.2127926768, + "scoreError" : 18617.12137459307, "scoreConfidence" : [ - 212294.56246006335, - 216002.1681243007 + 953072.0914180836, + 990306.3341672699 ], "scorePercentiles" : { - "0.0" : 210683.0850222566, - "50.0" : 214194.41324320153, - "90.0" : 216615.69188424305, - "95.0" : 216765.5200292965, - "99.0" : 216765.5200292965, - "99.9" : 216765.5200292965, - "99.99" : 216765.5200292965, - "99.999" : 216765.5200292965, - "99.9999" : 216765.5200292965, - "100.0" : 216765.5200292965 + "0.0" : 970126.0228253725, + "50.0" : 970311.7247863426, + "90.0" : 976007.3787726497, + "95.0" : 976007.3787726497, + "99.0" : 976007.3787726497, + "99.9" : 976007.3787726497, + "99.99" : 976007.3787726497, + "99.999" : 976007.3787726497, + "99.9999" : 976007.3787726497, + "100.0" : 976007.3787726497 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 210683.0850222566, - 211584.79035929177, - 211850.2049357906, - 212801.954424156 - ], - [ - 213958.25596449524, - 214492.97724494393, - 213353.77844180996, - 213843.8315036052 - ], - [ - 216482.7616535736, - 216235.150043231, - 216765.5200292965, - 216551.47982207726 - ], - [ - 213984.78467723393, - 214404.04180916914, - 214515.87091003757, - 214865.357833944 + 976007.3787726497, + 970222.9429407229, + 970400.5066319621, + 970126.0228253725 ] ] }, @@ -518,19 +336,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -539,52 +357,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 351719.5532319084, - "scoreError" : 1143.0988668270782, + "score" : 2001448.6610900809, + "scoreError" : 7651.916564135762, "scoreConfidence" : [ - 350576.4543650813, - 352862.6520987355 + 1993796.744525945, + 2009100.5776542167 ], "scorePercentiles" : { - "0.0" : 349833.06785134156, - "50.0" : 351513.9224334314, - "90.0" : 353177.15133168385, - "95.0" : 353843.3807123691, - "99.0" : 353843.3807123691, - "99.9" : 353843.3807123691, - "99.99" : 353843.3807123691, - "99.999" : 353843.3807123691, - "99.9999" : 353843.3807123691, - "100.0" : 353843.3807123691 + "0.0" : 1999755.8992002185, + "50.0" : 2001784.124021053, + "90.0" : 2002470.497117998, + "95.0" : 2002470.497117998, + "99.0" : 2002470.497117998, + "99.9" : 2002470.497117998, + "99.99" : 2002470.497117998, + "99.999" : 2002470.497117998, + "99.9999" : 2002470.497117998, + "100.0" : 2002470.497117998 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 352891.6244542473, - 351213.14728294173, - 352440.9343073766, - 350997.7972807793 - ], - [ - 350945.02574979555, - 352547.03328370483, - 352500.8914999523, - 352746.71053432213 - ], - [ - 349953.7357111899, - 351814.6975839211, - 351074.19400572596, - 349833.06785134156 - ], - [ - 352604.0267151736, - 351076.93214578147, - 353843.3807123691, - 351029.6525919108 + 2002470.497117998, + 2001973.7530752632, + 2001594.494966843, + 1999755.8992002185 ] ] }, @@ -592,19 +392,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -616,49 +416,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 94736.72559656751, - "scoreError" : 1854.1794823085331, + "score" : 160561.91404439212, + "scoreError" : 4174.087416426447, "scoreConfidence" : [ - 92882.54611425898, - 96590.90507887605 + 156387.82662796567, + 164736.00146081857 ], "scorePercentiles" : { - "0.0" : 91609.84417173386, - "50.0" : 95153.54787485447, - "90.0" : 97018.86344192953, - "95.0" : 97046.57054245342, - "99.0" : 97046.57054245342, - "99.9" : 97046.57054245342, - "99.99" : 97046.57054245342, - "99.999" : 97046.57054245342, - "99.9999" : 97046.57054245342, - "100.0" : 97046.57054245342 + "0.0" : 160034.28939428605, + "50.0" : 160370.037503851, + "90.0" : 161473.29177558052, + "95.0" : 161473.29177558052, + "99.0" : 161473.29177558052, + "99.9" : 161473.29177558052, + "99.99" : 161473.29177558052, + "99.999" : 161473.29177558052, + "99.9999" : 161473.29177558052, + "100.0" : 161473.29177558052 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 97046.57054245342, - 96245.3529063118, - 97006.98897027642, - 96494.01019099064 - ], - [ - 91609.84417173386, - 91919.89463135193, - 91757.64201211557, - 92501.04443088682 - ], - [ - 94849.03771015568, - 94487.00142729953, - 95076.50001462715, - 95136.71343795024 - ], - [ - 95170.38231175869, - 95636.28041022122, - 95493.20567781545, - 95357.14069913162 + 160034.28939428605, + 161473.29177558052, + 160184.15701617362, + 160555.91799152835 ] ] }, @@ -666,19 +448,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -690,49 +472,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 105919.83623632198, - "scoreError" : 1401.0715567834757, + "score" : 212591.26322673875, + "scoreError" : 820.8636873381179, "scoreConfidence" : [ - 104518.76467953851, - 107320.90779310545 + 211770.39953940065, + 213412.12691407686 ], "scorePercentiles" : { - "0.0" : 102326.62065811292, - "50.0" : 106181.69922310689, - "90.0" : 107065.40082619531, - "95.0" : 107293.83360017075, - "99.0" : 107293.83360017075, - "99.9" : 107293.83360017075, - "99.99" : 107293.83360017075, - "99.999" : 107293.83360017075, - "99.9999" : 107293.83360017075, - "100.0" : 107293.83360017075 + "0.0" : 212410.35066246407, + "50.0" : 212623.53671140777, + "90.0" : 212707.62882167546, + "95.0" : 212707.62882167546, + "99.0" : 212707.62882167546, + "99.9" : 212707.62882167546, + "99.99" : 212707.62882167546, + "99.999" : 212707.62882167546, + "99.9999" : 212707.62882167546, + "100.0" : 212707.62882167546 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 106357.59015490975, - 105973.62106834713, - 105947.94070231059, - 106119.28416199643 - ], - [ - 105784.52410717125, - 106424.85092481093, - 106226.46833748695, - 106705.63640033687 - ], - [ - 106136.93010872682, - 106017.94067493641, - 102326.62065811292, - 102814.4319118538 - ], - [ - 106820.63007643835, - 106799.57582762234, - 106967.50106592012, - 107293.83360017075 + 212628.8313956589, + 212410.35066246407, + 212618.2420271566, + 212707.62882167546 ] ] }, @@ -740,19 +504,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -764,49 +528,31 @@ "processorName" : "circe-jawn" }, "primaryMetric" : { - "score" : 66962.2747082578, - "scoreError" : 291.9103539914117, + "score" : 112596.09569979832, + "scoreError" : 3097.504155707831, "scoreConfidence" : [ - 66670.36435426639, - 67254.1850622492 + 109498.59154409048, + 115693.59985550615 ], "scorePercentiles" : { - "0.0" : 66591.82420537264, - "50.0" : 66878.10071507341, - "90.0" : 67470.8802908906, - "95.0" : 67537.17773888512, - "99.0" : 67537.17773888512, - "99.9" : 67537.17773888512, - "99.99" : 67537.17773888512, - "99.999" : 67537.17773888512, - "99.9999" : 67537.17773888512, - "100.0" : 67537.17773888512 + "0.0" : 112013.72842408167, + "50.0" : 112603.01135833334, + "90.0" : 113164.63165844487, + "95.0" : 113164.63165844487, + "99.0" : 113164.63165844487, + "99.9" : 113164.63165844487, + "99.99" : 113164.63165844487, + "99.999" : 113164.63165844487, + "99.9999" : 113164.63165844487, + "100.0" : 113164.63165844487 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 66735.47539515064, - 66846.4836496858, - 66875.73148012474, - 67041.33116045434 - ], - [ - 67051.668092213, - 66802.3795887503, - 66880.46995002209, - 67030.41292897306 - ], - [ - 67442.46709889294, - 67116.28107189028, - 67358.272434531, - 67537.17773888512 - ], - [ - 66640.89109833085, - 66801.98363556554, - 66643.54580328253, - 66591.82420537264 + 112718.82671181016, + 112487.19600485654, + 112013.72842408167, + 113164.63165844487 ] ] }, @@ -814,19 +560,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -838,123 +584,31 @@ "processorName" : "circe-jackson" }, "primaryMetric" : { - "score" : 25799.31722356209, - "scoreError" : 162.3428445663354, - "scoreConfidence" : [ - 25636.974378995757, - 25961.660068128425 - ], - "scorePercentiles" : { - "0.0" : 25493.310008037297, - "50.0" : 25806.6854037684, - "90.0" : 25983.576376136996, - "95.0" : 25993.793012298414, - "99.0" : 25993.793012298414, - "99.9" : 25993.793012298414, - "99.99" : 25993.793012298414, - "99.999" : 25993.793012298414, - "99.9999" : 25993.793012298414, - "100.0" : 25993.793012298414 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 25908.896924670575, - 25952.81843606336, - 25979.197817782104, - 25925.647793254928 - ], - [ - 25993.793012298414, - 25969.905212109898, - 25937.984356721736, - 25882.373177235902 - ], - [ - 25718.423257324466, - 25643.079850002723, - 25493.310008037297, - 25643.374160263844 - ], - [ - 25654.227166051634, - 25670.646515183485, - 25684.400259692233, - 25730.997630300895 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhReaderBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "1kb", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 12649.037635360135, - "scoreError" : 323.7202007118837, + "score" : 48776.93307660853, + "scoreError" : 1108.925216517014, "scoreConfidence" : [ - 12325.317434648252, - 12972.757836072018 + 47668.00786009152, + 49885.858293125544 ], "scorePercentiles" : { - "0.0" : 12082.97761776801, - "50.0" : 12783.096537175328, - "90.0" : 12932.5237533557, - "95.0" : 12939.612740681974, - "99.0" : 12939.612740681974, - "99.9" : 12939.612740681974, - "99.99" : 12939.612740681974, - "99.999" : 12939.612740681974, - "99.9999" : 12939.612740681974, - "100.0" : 12939.612740681974 + "0.0" : 48577.656124694724, + "50.0" : 48767.20248107644, + "90.0" : 48995.671219586526, + "95.0" : 48995.671219586526, + "99.0" : 48995.671219586526, + "99.9" : 48995.671219586526, + "99.99" : 48995.671219586526, + "99.999" : 48995.671219586526, + "99.9999" : 48995.671219586526, + "100.0" : 48995.671219586526 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 12929.485615930153, - 12939.612740681974, - 12867.941503643899, - 12903.858430223227 - ], - [ - 12805.27582115637, - 12813.972144032905, - 12801.31960231902, - 12774.884623868315 - ], - [ - 12180.850341564506, - 12082.97761776801, - 12102.519504746446, - 12139.84094575664 - ], - [ - 12761.176602025993, - 12791.308450482342, - 12723.149888037151, - 12766.428333525211 + 48995.671219586526, + 48784.52668914586, + 48749.87827300703, + 48577.656124694724 ] ] }, @@ -962,19 +616,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -983,52 +637,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 11726.397211129377, - "scoreError" : 136.4144676301994, + "score" : 64804.73470720218, + "scoreError" : 409.68292239984754, "scoreConfidence" : [ - 11589.982743499178, - 11862.811678759575 + 64395.05178480233, + 65214.41762960203 ], "scorePercentiles" : { - "0.0" : 11575.28911088506, - "50.0" : 11706.220195899707, - "90.0" : 11892.277963067343, - "95.0" : 11906.76637700073, - "99.0" : 11906.76637700073, - "99.9" : 11906.76637700073, - "99.99" : 11906.76637700073, - "99.999" : 11906.76637700073, - "99.9999" : 11906.76637700073, - "100.0" : 11906.76637700073 + "0.0" : 64745.4846006451, + "50.0" : 64796.907385312996, + "90.0" : 64879.639457537625, + "95.0" : 64879.639457537625, + "99.0" : 64879.639457537625, + "99.9" : 64879.639457537625, + "99.99" : 64879.639457537625, + "99.999" : 64879.639457537625, + "99.9999" : 64879.639457537625, + "100.0" : 64879.639457537625 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 11840.545408308248, - 11791.154294367672, - 11844.868106795648, - 11805.608922676583 - ], - [ - 11597.684837798115, - 11621.286097431743, - 11575.28911088506, - 11587.876538331884 - ], - [ - 11581.70452541504, - 11604.349359017862, - 11612.144852692783, - 11619.380735561042 - ], - [ - 11884.982359342896, - 11906.76637700073, - 11886.068642810178, - 11862.645209634542 + 64834.42021945477, + 64879.639457537625, + 64759.39455117122, + 64745.4846006451 ] ] }, @@ -1036,19 +672,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1057,52 +693,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 28851.521424331397, - "scoreError" : 685.3918428927404, + "score" : 121363.84547637065, + "scoreError" : 868.2404659021983, "scoreConfidence" : [ - 28166.129581438658, - 29536.913267224136 + 120495.60501046845, + 122232.08594227285 ], "scorePercentiles" : { - "0.0" : 28367.304949120786, - "50.0" : 28526.781576904512, - "90.0" : 29985.174062366114, - "95.0" : 29994.10177330364, - "99.0" : 29994.10177330364, - "99.9" : 29994.10177330364, - "99.99" : 29994.10177330364, - "99.999" : 29994.10177330364, - "99.9999" : 29994.10177330364, - "100.0" : 29994.10177330364 + "0.0" : 121173.45254790495, + "50.0" : 121396.4259916749, + "90.0" : 121489.07737422787, + "95.0" : 121489.07737422787, + "99.0" : 121489.07737422787, + "99.9" : 121489.07737422787, + "99.99" : 121489.07737422787, + "99.999" : 121489.07737422787, + "99.9999" : 121489.07737422787, + "100.0" : 121489.07737422787 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 28367.304949120786, - 28397.71625171116, - 28368.173686163234, - 28455.1073746637 - ], - [ - 29962.377635735265, - 29994.10177330364, - 29965.224979523526, - 29981.347900535744 - ], - [ - 28462.816922766306, - 28476.6056595789, - 28569.27084160442, - 28468.965426584728 - ], - [ - 28522.81663967869, - 28530.74651413033, - 28549.231039098533, - 28552.535195103505 + 121403.61275627548, + 121389.23922707431, + 121489.07737422787, + 121173.45254790495 ] ] }, @@ -1110,19 +728,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1131,52 +749,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 47149.17898178647, - "scoreError" : 666.5928937823479, + "score" : 255068.59053340956, + "scoreError" : 883.3864208655376, "scoreConfidence" : [ - 46482.58608800412, - 47815.77187556882 + 254185.20411254402, + 255951.9769542751 ], "scorePercentiles" : { - "0.0" : 46219.10200122704, - "50.0" : 47102.36173020073, - "90.0" : 48195.67834250538, - "95.0" : 48303.334901888426, - "99.0" : 48303.334901888426, - "99.9" : 48303.334901888426, - "99.99" : 48303.334901888426, - "99.999" : 48303.334901888426, - "99.9999" : 48303.334901888426, - "100.0" : 48303.334901888426 + "0.0" : 254882.52912064738, + "50.0" : 255108.6583979822, + "90.0" : 255174.51621702657, + "95.0" : 255174.51621702657, + "99.0" : 255174.51621702657, + "99.9" : 255174.51621702657, + "99.99" : 255174.51621702657, + "99.999" : 255174.51621702657, + "99.9999" : 255174.51621702657, + "100.0" : 255174.51621702657 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 48303.334901888426, - 48005.08497872011, - 48149.539817055505, - 47900.41698084059 - ], - [ - 47239.37001703021, - 47199.5713067362, - 47132.0219445379, - 47193.05664020412 - ], - [ - 47072.70151586356, - 47024.19466313282, - 46940.22607835878, - 46863.13338323092 - ], - [ - 46425.48548194023, - 46219.10200122704, - 46407.772675387794, - 46311.85132242941 + 254882.52912064738, + 255167.8818117706, + 255049.43498419374, + 255174.51621702657 ] ] }, @@ -1184,19 +784,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1208,49 +808,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 733.0119036318363, - "scoreError" : 5.142325819245411, + "score" : 1342.1847033298734, + "scoreError" : 16.20391937035811, "scoreConfidence" : [ - 727.8695778125908, - 738.1542294510817 + 1325.9807839595153, + 1358.3886227002315 ], "scorePercentiles" : { - "0.0" : 725.4882421637359, - "50.0" : 732.0582310583025, - "90.0" : 740.9365110661071, - "95.0" : 741.7766804158833, - "99.0" : 741.7766804158833, - "99.9" : 741.7766804158833, - "99.99" : 741.7766804158833, - "99.999" : 741.7766804158833, - "99.9999" : 741.7766804158833, - "100.0" : 741.7766804158833 + "0.0" : 1338.5377154330088, + "50.0" : 1342.9812388787618, + "90.0" : 1344.2386201289612, + "95.0" : 1344.2386201289612, + "99.0" : 1344.2386201289612, + "99.9" : 1344.2386201289612, + "99.99" : 1344.2386201289612, + "99.999" : 1344.2386201289612, + "99.9999" : 1344.2386201289612, + "100.0" : 1344.2386201289612 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 739.9044515507636, - 736.4279630635488, - 741.7766804158833, - 740.5764384876315 - ], - [ - 732.7567235344594, - 731.4306888630005, - 730.0104179004942, - 732.1171912494618 - ], - [ - 731.9992708671431, - 735.065656607349, - 736.9854062107875, - 731.7390691121498 - ], - [ - 725.4882421637359, - 727.2109404269188, - 727.3877491276698, - 727.3135685283822 + 1344.2386201289612, + 1343.1758619846332, + 1342.7866157728904, + 1338.5377154330088 ] ] }, @@ -1258,19 +840,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1282,49 +864,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 868.5106091816081, - "scoreError" : 12.146338041438073, + "score" : 1721.6229988447876, + "scoreError" : 146.59883259580164, "scoreConfidence" : [ - 856.36427114017, - 880.6569472230461 + 1575.024166248986, + 1868.2218314405893 ], "scorePercentiles" : { - "0.0" : 850.7010934075151, - "50.0" : 868.8555024924996, - "90.0" : 882.29211494466, - "95.0" : 883.4226527257807, - "99.0" : 883.4226527257807, - "99.9" : 883.4226527257807, - "99.99" : 883.4226527257807, - "99.999" : 883.4226527257807, - "99.9999" : 883.4226527257807, - "100.0" : 883.4226527257807 + "0.0" : 1699.2538695809183, + "50.0" : 1721.8093755250118, + "90.0" : 1743.6193747482089, + "95.0" : 1743.6193747482089, + "99.0" : 1743.6193747482089, + "99.9" : 1743.6193747482089, + "99.99" : 1743.6193747482089, + "99.999" : 1743.6193747482089, + "99.9999" : 1743.6193747482089, + "100.0" : 1743.6193747482089 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 856.8944112427212, - 854.9010840120349, - 850.7010934075151, - 859.1608193454911 - ], - [ - 857.2397911412254, - 860.799277447206, - 862.3568845703708, - 856.5937844689207 - ], - [ - 878.8494511555483, - 879.0217816740484, - 875.3541204146284, - 877.936101176748 - ], - [ - 883.4226527257807, - 881.1303249720049, - 881.8075987527512, - 880.0005703987338 + 1699.2538695809183, + 1705.0803445075178, + 1738.5384065425058, + 1743.6193747482089 ] ] }, @@ -1332,19 +896,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1356,49 +920,31 @@ "processorName" : "circe-jawn" }, "primaryMetric" : { - "score" : 498.64583381121946, - "scoreError" : 3.765900223994782, + "score" : 945.4187760649006, + "scoreError" : 2.183751802419896, "scoreConfidence" : [ - 494.8799335872247, - 502.41173403521424 + 943.2350242624807, + 947.6025278673205 ], "scorePercentiles" : { - "0.0" : 492.57246529770435, - "50.0" : 499.0732392384534, - "90.0" : 503.3035431470946, - "95.0" : 503.79957925745913, - "99.0" : 503.79957925745913, - "99.9" : 503.79957925745913, - "99.99" : 503.79957925745913, - "99.999" : 503.79957925745913, - "99.9999" : 503.79957925745913, - "100.0" : 503.79957925745913 + "0.0" : 945.1250529808461, + "50.0" : 945.3246784380651, + "90.0" : 945.9006944026257, + "95.0" : 945.9006944026257, + "99.0" : 945.9006944026257, + "99.9" : 945.9006944026257, + "99.99" : 945.9006944026257, + "99.999" : 945.9006944026257, + "99.9999" : 945.9006944026257, + "100.0" : 945.9006944026257 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 502.9957793878049, - 503.0909562426527, - 503.79957925745913, - 503.06354059378185 - ], - [ - 493.5402041494859, - 492.75661179481824, - 494.28629230531567, - 492.57246529770435 - ], - [ - 499.49785798271984, - 498.99317241976235, - 498.9488343936692, - 498.13019273217276 - ], - [ - 498.24705310210925, - 499.15330605714456, - 499.9775585072864, - 499.27993675562453 + 945.9006944026257, + 945.2682026376795, + 945.3811542384509, + 945.1250529808461 ] ] }, @@ -1406,19 +952,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1430,49 +976,31 @@ "processorName" : "circe-jackson" }, "primaryMetric" : { - "score" : 151.520440986791, - "scoreError" : 1.1601049308119884, + "score" : 363.00530700456716, + "scoreError" : 2.5284431265662755, "scoreConfidence" : [ - 150.360336055979, - 152.68054591760298 + 360.47686387800087, + 365.53375013113344 ], "scorePercentiles" : { - "0.0" : 149.81836518801578, - "50.0" : 151.3285342782671, - "90.0" : 152.97578563830774, - "95.0" : 153.2422448935881, - "99.0" : 153.2422448935881, - "99.9" : 153.2422448935881, - "99.99" : 153.2422448935881, - "99.999" : 153.2422448935881, - "99.9999" : 153.2422448935881, - "100.0" : 153.2422448935881 + "0.0" : 362.7165362775112, + "50.0" : 362.861798791369, + "90.0" : 363.58109415801937, + "95.0" : 363.58109415801937, + "99.0" : 363.58109415801937, + "99.9" : 363.58109415801937, + "99.99" : 363.58109415801937, + "99.999" : 363.58109415801937, + "99.9999" : 363.58109415801937, + "100.0" : 363.58109415801937 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 150.84914644875616, - 152.2825301699221, - 151.98235548685386, - 152.67811907289527 - ], - [ - 152.71821921035098, - 152.7721284056658, - 152.86158881461617, - 153.2422448935881 - ], - [ - 150.2247498198718, - 149.81836518801578, - 150.12616966119896, - 150.1313860231451 - ], - [ - 150.992504077597, - 151.18626243002706, - 150.99047995964426, - 151.47080612650717 + 362.90173654915014, + 362.8218610335879, + 363.58109415801937, + 362.7165362775112 ] ] }, @@ -1480,19 +1008,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1501,126 +1029,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 89.05320263852053, - "scoreError" : 3.778786758779756, - "scoreConfidence" : [ - 85.27441587974077, - 92.83198939730029 - ], - "scorePercentiles" : { - "0.0" : 83.35340393017108, - "50.0" : 89.35617614877447, - "90.0" : 93.98563029859628, - "95.0" : 94.12850036763474, - "99.0" : 94.12850036763474, - "99.9" : 94.12850036763474, - "99.99" : 94.12850036763474, - "99.999" : 94.12850036763474, - "99.9999" : 94.12850036763474, - "100.0" : 94.12850036763474 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 94.12850036763474, - 93.92440026900836, - 93.57014584611886, - 93.80900602696079 - ], - [ - 89.4360210230467, - 88.97564457224534, - 89.370331695239, - 89.0708773338225 - ], - [ - 83.91007724547741, - 83.59040215002513, - 83.35340393017108, - 84.11203314601971 - ], - [ - 89.71787865973141, - 89.15626745997311, - 89.34202060230993, - 89.38423188854416 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhReaderBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "128kb", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 80.09410238184245, - "scoreError" : 4.873189356843003, + "score" : 499.5742919458588, + "scoreError" : 6.093313640347425, "scoreConfidence" : [ - 75.22091302499945, - 84.96729173868545 + 493.48097830551137, + 505.66760558620626 ], "scorePercentiles" : { - "0.0" : 73.81305587301947, - "50.0" : 80.5613481536911, - "90.0" : 85.49633082145377, - "95.0" : 85.52223753716353, - "99.0" : 85.52223753716353, - "99.9" : 85.52223753716353, - "99.99" : 85.52223753716353, - "99.999" : 85.52223753716353, - "99.9999" : 85.52223753716353, - "100.0" : 85.52223753716353 + "0.0" : 498.7420007630053, + "50.0" : 499.37242517065727, + "90.0" : 500.81031667911543, + "95.0" : 500.81031667911543, + "99.0" : 500.81031667911543, + "99.9" : 500.81031667911543, + "99.99" : 500.81031667911543, + "99.999" : 500.81031667911543, + "99.9999" : 500.81031667911543, + "100.0" : 500.81031667911543 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 83.59615598124029, - 83.36086862434514, - 83.41536576013482, - 83.95457484930452 - ], - [ - 77.03650916058284, - 77.76182768303705, - 77.19390848973204, - 77.55477646039283 - ], - [ - 85.4698707713267, - 85.30761495819746, - 85.52223753716353, - 85.48522794329243 - ], - [ - 74.03452197511778, - 74.10301219916144, - 73.89610984343089, - 73.81305587301947 + 500.81031667911543, + 499.7999068452079, + 498.9449434961067, + 498.7420007630053 ] ] }, @@ -1628,19 +1064,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1649,52 +1085,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 186.73370204883312, - "scoreError" : 1.5445037212479116, + "score" : 1028.7599672304448, + "scoreError" : 6.1122124547278345, "scoreConfidence" : [ - 185.18919832758522, - 188.27820577008103 + 1022.647754775717, + 1034.8721796851726 ], "scorePercentiles" : { - "0.0" : 184.4904530742831, - "50.0" : 186.7578483123557, - "90.0" : 189.18771982345137, - "95.0" : 189.20517422119133, - "99.0" : 189.20517422119133, - "99.9" : 189.20517422119133, - "99.99" : 189.20517422119133, - "99.999" : 189.20517422119133, - "99.9999" : 189.20517422119133, - "100.0" : 189.20517422119133 + "0.0" : 1027.8687142210626, + "50.0" : 1028.5465020153126, + "90.0" : 1030.0781506700912, + "95.0" : 1030.0781506700912, + "99.0" : 1030.0781506700912, + "99.9" : 1030.0781506700912, + "99.99" : 1030.0781506700912, + "99.999" : 1030.0781506700912, + "99.9999" : 1030.0781506700912, + "100.0" : 1030.0781506700912 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 185.72326987969072, - 185.8856728757545, - 186.83301548884444, - 187.76674970066276 - ], - [ - 189.20517422119133, - 188.51545424975026, - 188.28460213722536, - 189.18023936727712 - ], - [ - 185.45493933482058, - 186.68268113586697, - 186.95977743609043, - 186.9064970343546 - ], - [ - 184.4904530742831, - 184.5320598350574, - 185.4168420912959, - 185.90180491916473 + 1028.7210660331664, + 1028.3719379974589, + 1027.8687142210626, + 1030.0781506700912 ] ] }, @@ -1702,19 +1120,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1723,52 +1141,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 347.7494436688501, - "scoreError" : 2.047003089486672, + "score" : 2001.826408239838, + "scoreError" : 42.480581859391826, "scoreConfidence" : [ - 345.70244057936344, - 349.7964467583368 + 1959.3458263804462, + 2044.3069900992298 ], "scorePercentiles" : { - "0.0" : 344.25559682607735, - "50.0" : 347.3412902136566, - "90.0" : 350.8472374604643, - "95.0" : 350.89073529179973, - "99.0" : 350.89073529179973, - "99.9" : 350.89073529179973, - "99.99" : 350.89073529179973, - "99.999" : 350.89073529179973, - "99.9999" : 350.89073529179973, - "100.0" : 350.89073529179973 + "0.0" : 1994.0433170035403, + "50.0" : 2001.5805047947372, + "90.0" : 2010.1013063663365, + "95.0" : 2010.1013063663365, + "99.0" : 2010.1013063663365, + "99.9" : 2010.1013063663365, + "99.99" : 2010.1013063663365, + "99.999" : 2010.1013063663365, + "99.9999" : 2010.1013063663365, + "100.0" : 2010.1013063663365 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 350.5262293714504, - 350.82859553274915, - 350.89073529179973, - 350.1806809520487 - ], - [ - 346.35026098537014, - 348.19264689154875, - 346.4749084218834, - 347.1897056863505 - ], - [ - 344.25559682607735, - 347.35370191977853, - 346.7149900610749, - 346.5470196144037 - ], - [ - 347.9543515902514, - 348.30886345331845, - 344.89393359596187, - 347.3288785075346 + 2002.0692642253507, + 2001.0917453641237, + 1994.0433170035403, + 2010.1013063663365 ] ] }, @@ -1776,19 +1176,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1800,49 +1200,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 75.49629501640932, - "scoreError" : 1.0819699564181064, + "score" : 160.4477490800406, + "scoreError" : 2.201194254702574, "scoreConfidence" : [ - 74.41432505999121, - 76.57826497282743 + 158.24655482533802, + 162.6489433347432 ], "scorePercentiles" : { - "0.0" : 73.93216643882498, - "50.0" : 75.52639029420594, - "90.0" : 76.77430737177386, - "95.0" : 76.99108375497964, - "99.0" : 76.99108375497964, - "99.9" : 76.99108375497964, - "99.99" : 76.99108375497964, - "99.999" : 76.99108375497964, - "99.9999" : 76.99108375497964, - "100.0" : 76.99108375497964 + "0.0" : 160.06205164274286, + "50.0" : 160.4395764682343, + "90.0" : 160.849791740951, + "95.0" : 160.849791740951, + "99.0" : 160.849791740951, + "99.9" : 160.849791740951, + "99.99" : 160.849791740951, + "99.999" : 160.849791740951, + "99.9999" : 160.849791740951, + "100.0" : 160.849791740951 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 76.10665441207571, - 76.21684299972, - 76.38738644114905, - 76.5503498258547 - ], - [ - 76.34204078672974, - 76.6814032075428, - 76.99108375497964, - 76.63680690109656 - ], - [ - 74.61513274127678, - 74.49228949793238, - 73.93216643882498, - 74.34199193987202 - ], - [ - 74.64463602803255, - 74.94612617633616, - 74.42956393506196, - 74.62624517606423 + 160.06205164274286, + 160.3025239132917, + 160.849791740951, + 160.5766290231769 ] ] }, @@ -1850,19 +1232,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1874,49 +1256,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 95.06633738091422, - "scoreError" : 0.5005572897866576, + "score" : 184.57242130589123, + "scoreError" : 32.95243699325334, "scoreConfidence" : [ - 94.56578009112756, - 95.56689467070088 + 151.61998431263788, + 217.52485829914457 ], "scorePercentiles" : { - "0.0" : 94.30632008135788, - "50.0" : 95.03924675996342, - "90.0" : 95.7585378850004, - "95.0" : 96.06245123086846, - "99.0" : 96.06245123086846, - "99.9" : 96.06245123086846, - "99.99" : 96.06245123086846, - "99.999" : 96.06245123086846, - "99.9999" : 96.06245123086846, - "100.0" : 96.06245123086846 + "0.0" : 176.9272357038962, + "50.0" : 187.02461410877956, + "90.0" : 187.31322130210955, + "95.0" : 187.31322130210955, + "99.0" : 187.31322130210955, + "99.9" : 187.31322130210955, + "99.99" : 187.31322130210955, + "99.999" : 187.31322130210955, + "99.9999" : 187.31322130210955, + "100.0" : 187.31322130210955 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 95.54248004480922, - 95.0503230396653, - 96.06245123086846, - 95.62828930819978 - ], - [ - 94.30632008135788, - 94.87391654961006, - 94.43652542601363, - 94.47727964458755 - ], - [ - 95.51504343780293, - 95.02817048026154, - 94.48400929485103, - 94.93598032040205 - ], - [ - 94.95434887365549, - 95.33249780388101, - 95.36581059397558, - 95.06795196468597 + 187.31322130210955, + 187.13662544786501, + 186.9126027696941, + 176.9272357038962 ] ] }, @@ -1924,19 +1288,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1948,49 +1312,31 @@ "processorName" : "circe-jawn" }, "primaryMetric" : { - "score" : 51.11553952074946, - "scoreError" : 0.4951323648554685, + "score" : 124.76672484216905, + "scoreError" : 0.33188848774535284, "scoreConfidence" : [ - 50.620407155893986, - 51.61067188560493 + 124.4348363544237, + 125.09861332991441 ], "scorePercentiles" : { - "0.0" : 50.562259783742576, - "50.0" : 50.95351329592809, - "90.0" : 51.96806889689443, - "95.0" : 51.97594251242977, - "99.0" : 51.97594251242977, - "99.9" : 51.97594251242977, - "99.99" : 51.97594251242977, - "99.999" : 51.97594251242977, - "99.9999" : 51.97594251242977, - "100.0" : 51.97594251242977 + "0.0" : 124.72972836530786, + "50.0" : 124.7491752546027, + "90.0" : 124.83882049416289, + "95.0" : 124.83882049416289, + "99.0" : 124.83882049416289, + "99.9" : 124.83882049416289, + "99.99" : 124.83882049416289, + "99.999" : 124.83882049416289, + "99.9999" : 124.83882049416289, + "100.0" : 124.83882049416289 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 50.770141389374984, - 50.562259783742576, - 50.69798119263658, - 50.606996403505214 - ], - [ - 51.06599850993965, - 50.92996216518765, - 50.9344568583929, - 51.03683942977857 - ], - [ - 50.86793487692123, - 50.755832497886004, - 51.111548653919215, - 50.97256973346329 - ], - [ - 51.97594251242977, - 51.964694490236425, - 51.866834702709866, - 51.72863913186743 + 124.83882049416289, + 124.73005609434921, + 124.7682944148562, + 124.72972836530786 ] ] }, @@ -1998,19 +1344,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2022,49 +1368,31 @@ "processorName" : "circe-jackson" }, "primaryMetric" : { - "score" : 16.372305105430936, - "scoreError" : 0.5355862410887331, + "score" : 39.48507722977758, + "scoreError" : 0.40852989142117696, "scoreConfidence" : [ - 15.836718864342203, - 16.90789134651967 + 39.076547338356406, + 39.893607121198755 ], "scorePercentiles" : { - "0.0" : 15.596699083412588, - "50.0" : 16.407886672348248, - "90.0" : 17.09442531515611, - "95.0" : 17.124610181173303, - "99.0" : 17.124610181173303, - "99.9" : 17.124610181173303, - "99.99" : 17.124610181173303, - "99.999" : 17.124610181173303, - "99.9999" : 17.124610181173303, - "100.0" : 17.124610181173303 + "0.0" : 39.41285789748825, + "50.0" : 39.48438984253872, + "90.0" : 39.55867133654463, + "95.0" : 39.55867133654463, + "99.0" : 39.55867133654463, + "99.9" : 39.55867133654463, + "99.99" : 39.55867133654463, + "99.999" : 39.55867133654463, + "99.9999" : 39.55867133654463, + "100.0" : 39.55867133654463 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 15.710266929993411, - 15.596699083412588, - 15.64452271511377, - 15.670848203067278 - ], - [ - 16.46357142474868, - 16.46474233925989, - 16.44825612949858, - 16.495313472866076 - ], - [ - 17.08051610205427, - 17.03630568912389, - 17.081488944005883, - 17.124610181173303 - ], - [ - 16.367517215197918, - 16.251672580274086, - 16.256382823382996, - 16.26416785372233 + 39.55867133654463, + 39.41285789748825, + 39.510445623948755, + 39.45833406112869 ] ] }, @@ -2072,19 +1400,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2093,126 +1421,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1mb", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 10.533760389225858, - "scoreError" : 0.318536716535328, - "scoreConfidence" : [ - 10.215223672690529, - 10.852297105761187 - ], - "scorePercentiles" : { - "0.0" : 10.105713847452405, - "50.0" : 10.555730934650768, - "90.0" : 10.95866571237216, - "95.0" : 10.989886394395239, - "99.0" : 10.989886394395239, - "99.9" : 10.989886394395239, - "99.99" : 10.989886394395239, - "99.999" : 10.989886394395239, - "99.9999" : 10.989886394395239, - "100.0" : 10.989886394395239 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 10.989886394395239, - 10.945285420076555, - 10.896056998882816, - 10.92235001663887 - ], - [ - 10.645902935433497, - 10.660273351712398, - 10.667400994747588, - 10.6843480058204 - ], - [ - 10.329253638279614, - 10.440691362346772, - 10.465558933868039, - 10.381361757803685 - ], - [ - 10.127064593191202, - 10.166418743096646, - 10.112599233868014, - 10.105713847452405 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhReaderBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "1mb", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 9.208606228309907, - "scoreError" : 0.0855529916106995, + "score" : 43.91015336909207, + "scoreError" : 0.8530360585248596, "scoreConfidence" : [ - 9.123053236699208, - 9.294159219920607 + 43.057117310567214, + 44.76318942761693 ], "scorePercentiles" : { - "0.0" : 9.057607866556376, - "50.0" : 9.215343194277409, - "90.0" : 9.335040663891267, - "95.0" : 9.349032831314869, - "99.0" : 9.349032831314869, - "99.9" : 9.349032831314869, - "99.99" : 9.349032831314869, - "99.999" : 9.349032831314869, - "99.9999" : 9.349032831314869, - "100.0" : 9.349032831314869 + "0.0" : 43.76700960688348, + "50.0" : 43.921196372174855, + "90.0" : 44.03121112513508, + "95.0" : 44.03121112513508, + "99.0" : 44.03121112513508, + "99.9" : 44.03121112513508, + "99.99" : 44.03121112513508, + "99.999" : 44.03121112513508, + "99.9999" : 44.03121112513508, + "100.0" : 44.03121112513508 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 9.202298975658463, - 9.23310715625918, - 9.174971249115623, - 9.210733132332875 - ], - [ - 9.219953256221945, - 9.194858373120626, - 9.231988157211877, - 9.261496600374167 - ], - [ - 9.068261620066892, - 9.057607866556376, - 9.131066300617622, - 9.128293586132566 - ], - [ - 9.311966292812281, - 9.349032831314869, - 9.329044020709723, - 9.233020234453408 + 43.76700960688348, + 44.01309180369185, + 43.82930094065786, + 44.03121112513508 ] ] }, @@ -2220,19 +1456,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2241,52 +1477,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1mb", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 17.297420988517732, - "scoreError" : 0.1851313776749866, + "score" : 123.77137034655759, + "scoreError" : 1.3165189495625613, "scoreConfidence" : [ - 17.112289610842744, - 17.48255236619272 + 122.45485139699502, + 125.08788929612015 ], "scorePercentiles" : { - "0.0" : 16.96225443460636, - "50.0" : 17.333476242498207, - "90.0" : 17.553100569590697, - "95.0" : 17.566017548329366, - "99.0" : 17.566017548329366, - "99.9" : 17.566017548329366, - "99.99" : 17.566017548329366, - "99.999" : 17.566017548329366, - "99.9999" : 17.566017548329366, - "100.0" : 17.566017548329366 + "0.0" : 123.51933731134018, + "50.0" : 123.79114484148198, + "90.0" : 123.98385439192622, + "95.0" : 123.98385439192622, + "99.0" : 123.98385439192622, + "99.9" : 123.98385439192622, + "99.99" : 123.98385439192622, + "99.999" : 123.98385439192622, + "99.9999" : 123.98385439192622, + "100.0" : 123.98385439192622 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 17.329125094866576, - 17.35768884213381, - 17.34045740898928, - 17.33782739012984 - ], - [ - 17.529251579522466, - 17.54756472155984, - 17.453056808613855, - 17.566017548329366 - ], - [ - 17.081254141176274, - 16.96225443460636, - 17.064910872009374, - 17.079265531065957 - ], - [ - 17.252010942433376, - 17.198109670763934, - 17.317107570847906, - 17.342833259235547 + 123.98385439192622, + 123.87794615660056, + 123.7043435263634, + 123.51933731134018 ] ] }, @@ -2294,19 +1512,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2315,52 +1533,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1mb", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 36.29998006859177, - "scoreError" : 0.4690926351033477, + "score" : 237.49920878178992, + "scoreError" : 0.8468180645129579, "scoreConfidence" : [ - 35.83088743348842, - 36.76907270369512 + 236.65239071727697, + 238.34602684630286 ], "scorePercentiles" : { - "0.0" : 35.76557125995637, - "50.0" : 36.16694800610832, - "90.0" : 37.02664729759662, - "95.0" : 37.05348471146446, - "99.0" : 37.05348471146446, - "99.9" : 37.05348471146446, - "99.99" : 37.05348471146446, - "99.999" : 37.05348471146446, - "99.9999" : 37.05348471146446, - "100.0" : 37.05348471146446 + "0.0" : 237.38379714534622, + "50.0" : 237.47990141743617, + "90.0" : 237.65323514694114, + "95.0" : 237.65323514694114, + "99.0" : 237.65323514694114, + "99.9" : 237.65323514694114, + "99.99" : 237.65323514694114, + "99.999" : 237.65323514694114, + "99.9999" : 237.65323514694114, + "100.0" : 237.65323514694114 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 35.97259082830873, - 35.94339566477128, - 35.949742719834376, - 35.977981230836455 - ], - [ - 36.48969038881545, - 36.355914781380186, - 36.39015265487088, - 36.47735995688558 - ], - [ - 35.95154087491286, - 35.79632696752692, - 35.76557125995637, - 35.86574607681102 - ], - [ - 37.01514554879611, - 36.8669746722782, - 37.05348471146446, - 36.92806276001955 + 237.38379714534622, + 237.65323514694114, + 237.39704710989793, + 237.56275572497444 ] ] }, @@ -2368,19 +1568,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2392,49 +1592,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 2.074392048761021, - "scoreError" : 0.04047898540943728, + "score" : 3.0137784534990244, + "scoreError" : 0.40756789287665157, "scoreConfidence" : [ - 2.0339130633515836, - 2.1148710341704584 + 2.606210560622373, + 3.421346346375676 ], "scorePercentiles" : { - "0.0" : 1.9828007522221152, - "50.0" : 2.07882466333391, - "90.0" : 2.121450481117101, - "95.0" : 2.1254404325346403, - "99.0" : 2.1254404325346403, - "99.9" : 2.1254404325346403, - "99.99" : 2.1254404325346403, - "99.999" : 2.1254404325346403, - "99.9999" : 2.1254404325346403, - "100.0" : 2.1254404325346403 + "0.0" : 2.929741526264833, + "50.0" : 3.0227237465019052, + "90.0" : 3.079924794727454, + "95.0" : 3.079924794727454, + "99.0" : 3.079924794727454, + "99.9" : 3.079924794727454, + "99.99" : 3.079924794727454, + "99.999" : 3.079924794727454, + "99.9999" : 3.079924794727454, + "100.0" : 3.079924794727454 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 2.0694476282164582, - 1.9828007522221152, - 2.102711894693801, - 2.1108627872298897 - ], - [ - 2.0899574098029245, - 2.0830945645367556, - 2.056903737007953, - 2.0744428695611536 - ], - [ - 2.0580391181471063, - 2.0745547621310645, - 2.1069210321578358, - 2.1197405019381557 - ], - [ - 2.01706760679249, - 2.1254404325346403, - 2.0965558740514267, - 2.021731809152565 + 3.0097527508957675, + 3.035694742108043, + 2.929741526264833, + 3.079924794727454 ] ] }, @@ -2442,19 +1624,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2466,49 +1648,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 1.9292486606388224, - "scoreError" : 0.05846500542796323, + "score" : 3.7330143364309074, + "scoreError" : 1.0340570672985834, "scoreConfidence" : [ - 1.8707836552108592, - 1.9877136660667856 + 2.698957269132324, + 4.76707140372949 ], "scorePercentiles" : { - "0.0" : 1.8127501335621157, - "50.0" : 1.9422201142879503, - "90.0" : 1.9890971643859974, - "95.0" : 1.9928248524527326, - "99.0" : 1.9928248524527326, - "99.9" : 1.9928248524527326, - "99.99" : 1.9928248524527326, - "99.999" : 1.9928248524527326, - "99.9999" : 1.9928248524527326, - "100.0" : 1.9928248524527326 + "0.0" : 3.5812111456422144, + "50.0" : 3.7373796051402604, + "90.0" : 3.876086989800895, + "95.0" : 3.876086989800895, + "99.0" : 3.876086989800895, + "99.9" : 3.876086989800895, + "99.99" : 3.876086989800895, + "99.999" : 3.876086989800895, + "99.9999" : 3.876086989800895, + "100.0" : 3.876086989800895 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 1.8876356464956445, - 1.9053737634658257, - 1.9262894905225405, - 1.8317902223813773 - ], - [ - 1.95815073805336, - 1.987499583785968, - 1.9711399296311205, - 1.8649893563117845 - ], - [ - 1.9739963475299553, - 1.9675693578302105, - 1.9928248524527326, - 1.8127501335621157 - ], - [ - 1.979230803022329, - 1.9243030048474596, - 1.984595122552573, - 1.899840217776161 + 3.6084057431955556, + 3.876086989800895, + 3.866353467084965, + 3.5812111456422144 ] ] }, @@ -2516,19 +1680,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2540,49 +1704,31 @@ "processorName" : "circe-jawn" }, "primaryMetric" : { - "score" : 0.23678645151236338, - "scoreError" : 0.011764154495779213, + "score" : 1.5225411461155023, + "scoreError" : 0.39755599886945797, "scoreConfidence" : [ - 0.22502229701658416, - 0.2485506060081426 + 1.1249851472460444, + 1.9200971449849602 ], "scorePercentiles" : { - "0.0" : 0.21587876461349417, - "50.0" : 0.2379372971053993, - "90.0" : 0.24826766348293783, - "95.0" : 0.24913769150459303, - "99.0" : 0.24913769150459303, - "99.9" : 0.24913769150459303, - "99.99" : 0.24913769150459303, - "99.999" : 0.24913769150459303, - "99.9999" : 0.24913769150459303, - "100.0" : 0.24913769150459303 + "0.0" : 1.4362130009126042, + "50.0" : 1.5373792525243788, + "90.0" : 1.5791930785006478, + "95.0" : 1.5791930785006478, + "99.0" : 1.5791930785006478, + "99.9" : 1.5791930785006478, + "99.99" : 1.5791930785006478, + "99.999" : 1.5791930785006478, + "99.9999" : 1.5791930785006478, + "100.0" : 1.5791930785006478 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 0.23805959416905428, - 0.23452819703390398, - 0.24770509883225122, - 0.22698041616669096 - ], - [ - 0.22425024096229396, - 0.22655741877021182, - 0.24913769150459303, - 0.2478947943307999 - ], - [ - 0.24779387014261556, - 0.23781500004174427, - 0.24680336846596065, - 0.2374394065408321 - ], - [ - 0.21629230492622029, - 0.21587876461349417, - 0.2468876003256912, - 0.24455945737145643 + 1.5486181533002588, + 1.5791930785006478, + 1.4362130009126042, + 1.5261403517484986 ] ] }, @@ -2590,19 +1736,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2614,49 +1760,31 @@ "processorName" : "circe-jackson" }, "primaryMetric" : { - "score" : 0.08867203644148659, - "scoreError" : 0.015819482223202792, + "score" : 0.8719602908897323, + "scoreError" : 0.13303923204223653, "scoreConfidence" : [ - 0.0728525542182838, - 0.10449151866468939 + 0.7389210588474957, + 1.0049995229319688 ], "scorePercentiles" : { - "0.0" : 0.07608366947731271, - "50.0" : 0.08111695944896717, - "90.0" : 0.11916753635904943, - "95.0" : 0.11918538722449265, - "99.0" : 0.11918538722449265, - "99.9" : 0.11918538722449265, - "99.99" : 0.11918538722449265, - "99.999" : 0.11918538722449265, - "99.9999" : 0.11918538722449265, - "100.0" : 0.11918538722449265 + "0.0" : 0.852918679952709, + "50.0" : 0.870454311975011, + "90.0" : 0.8940138596561977, + "95.0" : 0.8940138596561977, + "99.0" : 0.8940138596561977, + "99.9" : 0.8940138596561977, + "99.99" : 0.8940138596561977, + "99.999" : 0.8940138596561977, + "99.9999" : 0.8940138596561977, + "100.0" : 0.8940138596561977 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 0.09667144290620157, - 0.07890849539671906, - 0.08303958100237649, - 0.11918538722449265 - ], - [ - 0.08944547590895109, - 0.0778357285680184, - 0.07869669187837144, - 0.08017761837597763 - ], - [ - 0.08139177640450201, - 0.08084214249343233, - 0.1191598859881452, - 0.07717246567036153 - ], - [ - 0.0790847278148511, - 0.11636393218360162, - 0.07608366947731271, - 0.0846935617704704 + 0.8559954990209021, + 0.852918679952709, + 0.8940138596561977, + 0.8849131249291199 ] ] }, @@ -2664,19 +1792,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2685,126 +1813,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "32mb", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 0.06661764031963767, - "scoreError" : 0.0030740506816908644, - "scoreConfidence" : [ - 0.0635435896379468, - 0.06969169100132853 - ], - "scorePercentiles" : { - "0.0" : 0.06267786430137218, - "50.0" : 0.06574333105546347, - "90.0" : 0.07176773411628071, - "95.0" : 0.07277250704326399, - "99.0" : 0.07277250704326399, - "99.9" : 0.07277250704326399, - "99.99" : 0.07277250704326399, - "99.999" : 0.07277250704326399, - "99.9999" : 0.07277250704326399, - "100.0" : 0.07277250704326399 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.06852408550316404, - 0.07133711714757358, - 0.06985157322329155, - 0.0675791928827894 - ], - [ - 0.06423123344755695, - 0.06750875060509409, - 0.07277250704326399, - 0.0688785198943098 - ], - [ - 0.06440168372934052, - 0.06447628129273976, - 0.06450510882132547, - 0.06436423953421919 - ], - [ - 0.06267786430137218, - 0.0643709815513975, - 0.06342155284716322, - 0.06698155328960147 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhReaderBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 0.03430938517624363, - "scoreError" : 5.359756236220009E-4, + "score" : 0.9268646470493817, + "scoreError" : 0.07142129572211389, "scoreConfidence" : [ - 0.033773409552621626, - 0.03484536079986563 + 0.8554433513272678, + 0.9982859427714955 ], "scorePercentiles" : { - "0.0" : 0.03352375055408918, - "50.0" : 0.034424897114048385, - "90.0" : 0.03508760887746045, - "95.0" : 0.03512482143267867, - "99.0" : 0.03512482143267867, - "99.9" : 0.03512482143267867, - "99.99" : 0.03512482143267867, - "99.999" : 0.03512482143267867, - "99.9999" : 0.03512482143267867, - "100.0" : 0.03512482143267867 + "0.0" : 0.9158881941393551, + "50.0" : 0.9248947313372281, + "90.0" : 0.9417809313837151, + "95.0" : 0.9417809313837151, + "99.0" : 0.9417809313837151, + "99.9" : 0.9417809313837151, + "99.99" : 0.9417809313837151, + "99.999" : 0.9417809313837151, + "99.9999" : 0.9417809313837151, + "100.0" : 0.9417809313837151 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 0.03374724962016362, - 0.03352375055408918, - 0.03354263128667746, - 0.03360879464398526 - ], - [ - 0.0344748794107761, - 0.03487599484176796, - 0.034568283971535295, - 0.03396019459002953 - ], - [ - 0.03507166063950978, - 0.03445729616167809, - 0.03452062267875965, - 0.03512482143267867 - ], - [ - 0.0340263053856783, - 0.03439249806641868, - 0.03476457956219791, - 0.03429059997395256 + 0.9220897620361919, + 0.9158881941393551, + 0.9276997006382643, + 0.9417809313837151 ] ] }, @@ -2812,19 +1848,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2833,52 +1869,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "32mb", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 0.08079399386566626, - "scoreError" : 0.0035744975935980976, + "score" : 2.188200726362677, + "scoreError" : 0.3354607091980212, "scoreConfidence" : [ - 0.07721949627206816, - 0.08436849145926435 + 1.8527400171646558, + 2.523661435560698 ], "scorePercentiles" : { - "0.0" : 0.07441529234412456, - "50.0" : 0.07951242766255515, - "90.0" : 0.08552019299540119, - "95.0" : 0.08667142228311601, - "99.0" : 0.08667142228311601, - "99.9" : 0.08667142228311601, - "99.99" : 0.08667142228311601, - "99.999" : 0.08667142228311601, - "99.9999" : 0.08667142228311601, - "100.0" : 0.08667142228311601 + "0.0" : 2.1401609225442733, + "50.0" : 2.1869952732658535, + "90.0" : 2.238651436374728, + "95.0" : 2.238651436374728, + "99.0" : 2.238651436374728, + "99.9" : 2.238651436374728, + "99.99" : 2.238651436374728, + "99.999" : 2.238651436374728, + "99.9999" : 2.238651436374728, + "100.0" : 2.238651436374728 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 0.08240218379472411, - 0.08667142228311601, - 0.08486529507723013, - 0.07929215899183052 - ], - [ - 0.0768874909909908, - 0.07864612475523784, - 0.08502680901495198, - 0.07910841256627771 - ], - [ - 0.07441529234412456, - 0.08114459931017087, - 0.07973269633327977, - 0.07870284521744045 - ], - [ - 0.07876334317588425, - 0.08445941757928711, - 0.07783543780828256, - 0.08475037260783112 + 2.2271751777085904, + 2.1401609225442733, + 2.1468153688231166, + 2.238651436374728 ] ] }, @@ -2886,19 +1904,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhReaderBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2907,52 +1925,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "32mb", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 0.3449252331225247, - "scoreError" : 0.036339492552928974, + "score" : 3.438909701909425, + "scoreError" : 0.28976027522897935, "scoreConfidence" : [ - 0.30858574056959576, - 0.38126472567545366 + 3.1491494266804456, + 3.7286699771384044 ], "scorePercentiles" : { - "0.0" : 0.2821617035523913, - "50.0" : 0.3502752058174538, - "90.0" : 0.38330996429536324, - "95.0" : 0.3877602714193939, - "99.0" : 0.3877602714193939, - "99.9" : 0.3877602714193939, - "99.99" : 0.3877602714193939, - "99.999" : 0.3877602714193939, - "99.9999" : 0.3877602714193939, - "100.0" : 0.3877602714193939 + "0.0" : 3.398288711481961, + "50.0" : 3.437554759758812, + "90.0" : 3.482240576638115, + "95.0" : 3.482240576638115, + "99.0" : 3.482240576638115, + "99.9" : 3.482240576638115, + "99.99" : 3.482240576638115, + "99.999" : 3.482240576638115, + "99.9999" : 3.482240576638115, + "100.0" : 3.482240576638115 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 0.3281132933662851, - 0.3508981308892431, - 0.3496522807456645, - 0.35352875315353216 - ], - [ - 0.2821617035523913, - 0.38058898972794825, - 0.3322764895250849, - 0.38140268981363584 - ], - [ - 0.29106413308869417, - 0.3790110143443351, - 0.32843068224407396, - 0.3773877336294644 - ], - [ - 0.28631192549714646, - 0.3788141892269484, - 0.3314014497365533, - 0.3877602714193939 + 3.398288711481961, + 3.482240576638115, + 3.402193975664248, + 3.472915543853375 ] ] }, diff --git a/modules/benchmarks/jmh-reader.log b/modules/benchmarks/jmh-reader.log deleted file mode 100644 index fd39a411..00000000 --- a/modules/benchmarks/jmh-reader.log +++ /dev/null @@ -1,2571 +0,0 @@ -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = tethys-jackson) - -# Run progress: 0.00% complete, ETA 01:46:40 -# Fork: 1 of 4 -# Warmup Iteration 1: 623555.257 ops/s -# Warmup Iteration 2: 662820.962 ops/s -# Warmup Iteration 3: 660968.214 ops/s -# Warmup Iteration 4: 662297.429 ops/s -Iteration 1: 662013.387 ops/s -Iteration 2: 657952.832 ops/s -Iteration 3: 658769.043 ops/s -Iteration 4: 658854.947 ops/s - -# Run progress: 0.63% complete, ETA 01:47:06 -# Fork: 2 of 4 -# Warmup Iteration 1: 615650.721 ops/s -# Warmup Iteration 2: 654410.031 ops/s -# Warmup Iteration 3: 655531.687 ops/s -# Warmup Iteration 4: 653390.821 ops/s -Iteration 1: 656451.243 ops/s -Iteration 2: 655217.618 ops/s -Iteration 3: 641363.530 ops/s -Iteration 4: 644196.361 ops/s - -# Run progress: 1.25% complete, ETA 01:46:20 -# Fork: 3 of 4 -# Warmup Iteration 1: 609853.330 ops/s -# Warmup Iteration 2: 653309.068 ops/s -# Warmup Iteration 3: 650597.880 ops/s -# Warmup Iteration 4: 652010.340 ops/s -Iteration 1: 653930.580 ops/s -Iteration 2: 651370.043 ops/s -Iteration 3: 654941.171 ops/s -Iteration 4: 653261.277 ops/s - -# Run progress: 1.88% complete, ETA 01:45:39 -# Fork: 4 of 4 -# Warmup Iteration 1: 637930.733 ops/s -# Warmup Iteration 2: 674113.729 ops/s -# Warmup Iteration 3: 676282.848 ops/s -# Warmup Iteration 4: 673533.150 ops/s -Iteration 1: 671778.854 ops/s -Iteration 2: 673875.688 ops/s -Iteration 3: 675185.237 ops/s -Iteration 4: 674060.413 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 658951.389 ±(99.9%) 10409.795 ops/s [Average] - (min, avg, max) = (641363.530, 658951.389, 675185.237), stdev = 10223.810 - CI (99.9%): [648541.594, 669361.184] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = pure-jackson) - -# Run progress: 2.50% complete, ETA 01:44:57 -# Fork: 1 of 4 -# Warmup Iteration 1: 578896.432 ops/s -# Warmup Iteration 2: 604123.986 ops/s -# Warmup Iteration 3: 602037.173 ops/s -# Warmup Iteration 4: 603638.078 ops/s -Iteration 1: 603097.727 ops/s -Iteration 2: 603579.476 ops/s -Iteration 3: 604174.344 ops/s -Iteration 4: 603932.040 ops/s - -# Run progress: 3.13% complete, ETA 01:44:17 -# Fork: 2 of 4 -# Warmup Iteration 1: 586606.966 ops/s -# Warmup Iteration 2: 610622.137 ops/s -# Warmup Iteration 3: 610203.452 ops/s -# Warmup Iteration 4: 608878.275 ops/s -Iteration 1: 610857.750 ops/s -Iteration 2: 611594.394 ops/s -Iteration 3: 609000.926 ops/s -Iteration 4: 598685.601 ops/s - -# Run progress: 3.75% complete, ETA 01:43:36 -# Fork: 3 of 4 -# Warmup Iteration 1: 577019.929 ops/s -# Warmup Iteration 2: 598314.232 ops/s -# Warmup Iteration 3: 599813.434 ops/s -# Warmup Iteration 4: 599289.704 ops/s -Iteration 1: 600343.988 ops/s -Iteration 2: 599285.804 ops/s -Iteration 3: 600532.459 ops/s -Iteration 4: 600055.921 ops/s - -# Run progress: 4.38% complete, ETA 01:42:56 -# Fork: 4 of 4 -# Warmup Iteration 1: 587209.221 ops/s -# Warmup Iteration 2: 607845.414 ops/s -# Warmup Iteration 3: 612332.830 ops/s -# Warmup Iteration 4: 610150.304 ops/s -Iteration 1: 612287.354 ops/s -Iteration 2: 613513.928 ops/s -Iteration 3: 611917.040 ops/s -Iteration 4: 612142.244 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 605937.562 ±(99.9%) 5578.447 ops/s [Average] - (min, avg, max) = (598685.601, 605937.562, 613513.928), stdev = 5478.781 - CI (99.9%): [600359.115, 611516.010] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = circe-jawn) - -# Run progress: 5.00% complete, ETA 01:42:15 -# Fork: 1 of 4 -# Warmup Iteration 1: 464041.319 ops/s -# Warmup Iteration 2: 500705.428 ops/s -# Warmup Iteration 3: 503612.615 ops/s -# Warmup Iteration 4: 501199.677 ops/s -Iteration 1: 502739.306 ops/s -Iteration 2: 504167.952 ops/s -Iteration 3: 501160.849 ops/s -Iteration 4: 502142.098 ops/s - -# Run progress: 5.63% complete, ETA 01:41:35 -# Fork: 2 of 4 -# Warmup Iteration 1: 463047.699 ops/s -# Warmup Iteration 2: 502158.365 ops/s -# Warmup Iteration 3: 501863.879 ops/s -# Warmup Iteration 4: 501171.980 ops/s -Iteration 1: 501029.955 ops/s -Iteration 2: 497262.536 ops/s -Iteration 3: 493079.141 ops/s -Iteration 4: 502725.364 ops/s - -# Run progress: 6.25% complete, ETA 01:40:54 -# Fork: 3 of 4 -# Warmup Iteration 1: 464179.766 ops/s -# Warmup Iteration 2: 498337.307 ops/s -# Warmup Iteration 3: 503142.896 ops/s -# Warmup Iteration 4: 501903.575 ops/s -Iteration 1: 501863.796 ops/s -Iteration 2: 500304.802 ops/s -Iteration 3: 501975.798 ops/s -Iteration 4: 501511.006 ops/s - -# Run progress: 6.88% complete, ETA 01:40:14 -# Fork: 4 of 4 -# Warmup Iteration 1: 460128.729 ops/s -# Warmup Iteration 2: 502074.057 ops/s -# Warmup Iteration 3: 500131.203 ops/s -# Warmup Iteration 4: 501714.627 ops/s -Iteration 1: 499093.905 ops/s -Iteration 2: 500113.859 ops/s -Iteration 3: 500305.467 ops/s -Iteration 4: 500656.550 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 500633.274 ±(99.9%) 2620.895 ops/s [Average] - (min, avg, max) = (493079.141, 500633.274, 504167.952), stdev = 2574.070 - CI (99.9%): [498012.379, 503254.169] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = circe-jackson) - -# Run progress: 7.50% complete, ETA 01:39:33 -# Fork: 1 of 4 -# Warmup Iteration 1: 152639.467 ops/s -# Warmup Iteration 2: 173976.120 ops/s -# Warmup Iteration 3: 173597.968 ops/s -# Warmup Iteration 4: 173415.980 ops/s -Iteration 1: 173766.020 ops/s -Iteration 2: 173881.583 ops/s -Iteration 3: 174098.534 ops/s -Iteration 4: 173634.650 ops/s - -# Run progress: 8.13% complete, ETA 01:38:53 -# Fork: 2 of 4 -# Warmup Iteration 1: 157190.315 ops/s -# Warmup Iteration 2: 177868.059 ops/s -# Warmup Iteration 3: 178428.720 ops/s -# Warmup Iteration 4: 177888.874 ops/s -Iteration 1: 177709.479 ops/s -Iteration 2: 178262.966 ops/s -Iteration 3: 178288.477 ops/s -Iteration 4: 178389.589 ops/s - -# Run progress: 8.75% complete, ETA 01:38:12 -# Fork: 3 of 4 -# Warmup Iteration 1: 161896.238 ops/s -# Warmup Iteration 2: 180576.536 ops/s -# Warmup Iteration 3: 181068.984 ops/s -# Warmup Iteration 4: 180967.733 ops/s -Iteration 1: 181054.307 ops/s -Iteration 2: 181083.348 ops/s -Iteration 3: 180597.995 ops/s -Iteration 4: 181199.110 ops/s - -# Run progress: 9.38% complete, ETA 01:37:32 -# Fork: 4 of 4 -# Warmup Iteration 1: 149835.489 ops/s -# Warmup Iteration 2: 171970.645 ops/s -# Warmup Iteration 3: 171795.720 ops/s -# Warmup Iteration 4: 172081.912 ops/s -Iteration 1: 171933.944 ops/s -Iteration 2: 172257.612 ops/s -Iteration 3: 171853.907 ops/s -Iteration 4: 172218.570 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 176264.381 ±(99.9%) 3700.649 ops/s [Average] - (min, avg, max) = (171853.907, 176264.381, 181199.110), stdev = 3634.533 - CI (99.9%): [172563.731, 179965.030] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = json4s-jackson) - -# Run progress: 10.00% complete, ETA 01:36:51 -# Fork: 1 of 4 -# Warmup Iteration 1: 65655.395 ops/s -# Warmup Iteration 2: 81379.205 ops/s -# Warmup Iteration 3: 81726.996 ops/s -# Warmup Iteration 4: 81256.473 ops/s -Iteration 1: 80998.536 ops/s -Iteration 2: 81459.018 ops/s -Iteration 3: 80965.939 ops/s -Iteration 4: 81339.754 ops/s - -# Run progress: 10.63% complete, ETA 01:36:11 -# Fork: 2 of 4 -# Warmup Iteration 1: 65010.614 ops/s -# Warmup Iteration 2: 80266.891 ops/s -# Warmup Iteration 3: 80400.980 ops/s -# Warmup Iteration 4: 80539.550 ops/s -Iteration 1: 80440.217 ops/s -Iteration 2: 80648.564 ops/s -Iteration 3: 80227.773 ops/s -Iteration 4: 80475.482 ops/s - -# Run progress: 11.25% complete, ETA 01:35:30 -# Fork: 3 of 4 -# Warmup Iteration 1: 66390.656 ops/s -# Warmup Iteration 2: 81977.595 ops/s -# Warmup Iteration 3: 82431.009 ops/s -# Warmup Iteration 4: 82153.703 ops/s -Iteration 1: 82359.757 ops/s -Iteration 2: 82292.675 ops/s -Iteration 3: 82582.346 ops/s -Iteration 4: 82154.188 ops/s - -# Run progress: 11.88% complete, ETA 01:34:50 -# Fork: 4 of 4 -# Warmup Iteration 1: 66926.110 ops/s -# Warmup Iteration 2: 83341.367 ops/s -# Warmup Iteration 3: 83440.960 ops/s -# Warmup Iteration 4: 83668.621 ops/s -Iteration 1: 83432.305 ops/s -Iteration 2: 83162.711 ops/s -Iteration 3: 83423.732 ops/s -Iteration 4: 83863.786 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 81864.174 ±(99.9%) 1224.992 ops/s [Average] - (min, avg, max) = (80227.773, 81864.174, 83863.786), stdev = 1203.106 - CI (99.9%): [80639.182, 83089.166] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = json4s-native) - -# Run progress: 12.50% complete, ETA 01:34:09 -# Fork: 1 of 4 -# Warmup Iteration 1: 61036.109 ops/s -# Warmup Iteration 2: 75039.785 ops/s -# Warmup Iteration 3: 75007.256 ops/s -# Warmup Iteration 4: 75033.243 ops/s -Iteration 1: 75040.141 ops/s -Iteration 2: 75081.307 ops/s -Iteration 3: 75441.174 ops/s -Iteration 4: 75153.168 ops/s - -# Run progress: 13.13% complete, ETA 01:33:29 -# Fork: 2 of 4 -# Warmup Iteration 1: 62768.961 ops/s -# Warmup Iteration 2: 76357.030 ops/s -# Warmup Iteration 3: 76401.958 ops/s -# Warmup Iteration 4: 76114.769 ops/s -Iteration 1: 76414.228 ops/s -Iteration 2: 76468.712 ops/s -Iteration 3: 76568.705 ops/s -Iteration 4: 76267.157 ops/s - -# Run progress: 13.75% complete, ETA 01:32:49 -# Fork: 3 of 4 -# Warmup Iteration 1: 62664.146 ops/s -# Warmup Iteration 2: 76147.131 ops/s -# Warmup Iteration 3: 75658.065 ops/s -# Warmup Iteration 4: 75392.085 ops/s -Iteration 1: 75552.905 ops/s -Iteration 2: 75748.593 ops/s -Iteration 3: 75979.950 ops/s -Iteration 4: 75945.567 ops/s - -# Run progress: 14.37% complete, ETA 01:32:08 -# Fork: 4 of 4 -# Warmup Iteration 1: 63912.851 ops/s -# Warmup Iteration 2: 80877.072 ops/s -# Warmup Iteration 3: 81387.475 ops/s -# Warmup Iteration 4: 81528.964 ops/s -Iteration 1: 81188.570 ops/s -Iteration 2: 81266.183 ops/s -Iteration 3: 81478.113 ops/s -Iteration 4: 80845.606 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 77152.505 ±(99.9%) 2504.261 ops/s [Average] - (min, avg, max) = (75040.141, 77152.505, 81478.113), stdev = 2459.520 - CI (99.9%): [74648.244, 79656.766] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = play-json) - -# Run progress: 15.00% complete, ETA 01:31:28 -# Fork: 1 of 4 -# Warmup Iteration 1: 188553.008 ops/s -# Warmup Iteration 2: 211310.378 ops/s -# Warmup Iteration 3: 211949.687 ops/s -# Warmup Iteration 4: 212258.532 ops/s -Iteration 1: 210683.085 ops/s -Iteration 2: 211584.790 ops/s -Iteration 3: 211850.205 ops/s -Iteration 4: 212801.954 ops/s - -# Run progress: 15.63% complete, ETA 01:30:47 -# Fork: 2 of 4 -# Warmup Iteration 1: 192182.401 ops/s -# Warmup Iteration 2: 214953.430 ops/s -# Warmup Iteration 3: 214007.537 ops/s -# Warmup Iteration 4: 213662.701 ops/s -Iteration 1: 213958.256 ops/s -Iteration 2: 214492.977 ops/s -Iteration 3: 213353.778 ops/s -Iteration 4: 213843.832 ops/s - -# Run progress: 16.25% complete, ETA 01:30:07 -# Fork: 3 of 4 -# Warmup Iteration 1: 193876.321 ops/s -# Warmup Iteration 2: 217074.337 ops/s -# Warmup Iteration 3: 217083.825 ops/s -# Warmup Iteration 4: 216953.402 ops/s -Iteration 1: 216482.762 ops/s -Iteration 2: 216235.150 ops/s -Iteration 3: 216765.520 ops/s -Iteration 4: 216551.480 ops/s - -# Run progress: 16.88% complete, ETA 01:29:27 -# Fork: 4 of 4 -# Warmup Iteration 1: 191744.405 ops/s -# Warmup Iteration 2: 214243.222 ops/s -# Warmup Iteration 3: 214878.493 ops/s -# Warmup Iteration 4: 214125.812 ops/s -Iteration 1: 213984.785 ops/s -Iteration 2: 214404.042 ops/s -Iteration 3: 214515.871 ops/s -Iteration 4: 214865.358 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 214148.365 ±(99.9%) 1853.803 ops/s [Average] - (min, avg, max) = (210683.085, 214148.365, 216765.520), stdev = 1820.682 - CI (99.9%): [212294.562, 216002.168] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128b, processorName = spray-json) - -# Run progress: 17.50% complete, ETA 01:28:46 -# Fork: 1 of 4 -# Warmup Iteration 1: 334574.333 ops/s -# Warmup Iteration 2: 350537.530 ops/s -# Warmup Iteration 3: 353394.196 ops/s -# Warmup Iteration 4: 352959.422 ops/s -Iteration 1: 352891.624 ops/s -Iteration 2: 351213.147 ops/s -Iteration 3: 352440.934 ops/s -Iteration 4: 350997.797 ops/s - -# Run progress: 18.13% complete, ETA 01:28:06 -# Fork: 2 of 4 -# Warmup Iteration 1: 332892.684 ops/s -# Warmup Iteration 2: 351881.337 ops/s -# Warmup Iteration 3: 353100.998 ops/s -# Warmup Iteration 4: 351659.433 ops/s -Iteration 1: 350945.026 ops/s -Iteration 2: 352547.033 ops/s -Iteration 3: 352500.891 ops/s -Iteration 4: 352746.711 ops/s - -# Run progress: 18.75% complete, ETA 01:27:25 -# Fork: 3 of 4 -# Warmup Iteration 1: 330384.888 ops/s -# Warmup Iteration 2: 351226.247 ops/s -# Warmup Iteration 3: 350270.934 ops/s -# Warmup Iteration 4: 351564.664 ops/s -Iteration 1: 349953.736 ops/s -Iteration 2: 351814.698 ops/s -Iteration 3: 351074.194 ops/s -Iteration 4: 349833.068 ops/s - -# Run progress: 19.38% complete, ETA 01:26:45 -# Fork: 4 of 4 -# Warmup Iteration 1: 330606.963 ops/s -# Warmup Iteration 2: 351854.752 ops/s -# Warmup Iteration 3: 352016.965 ops/s -# Warmup Iteration 4: 352662.406 ops/s -Iteration 1: 352604.027 ops/s -Iteration 2: 351076.932 ops/s -Iteration 3: 353843.381 ops/s -Iteration 4: 351029.653 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 351719.553 ±(99.9%) 1143.099 ops/s [Average] - (min, avg, max) = (349833.068, 351719.553, 353843.381), stdev = 1122.676 - CI (99.9%): [350576.454, 352862.652] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = tethys-jackson) - -# Run progress: 20.00% complete, ETA 01:26:05 -# Fork: 1 of 4 -# Warmup Iteration 1: 91374.670 ops/s -# Warmup Iteration 2: 95800.441 ops/s -# Warmup Iteration 3: 96628.707 ops/s -# Warmup Iteration 4: 96846.278 ops/s -Iteration 1: 97046.571 ops/s -Iteration 2: 96245.353 ops/s -Iteration 3: 97006.989 ops/s -Iteration 4: 96494.010 ops/s - -# Run progress: 20.63% complete, ETA 01:25:24 -# Fork: 2 of 4 -# Warmup Iteration 1: 86871.276 ops/s -# Warmup Iteration 2: 91914.557 ops/s -# Warmup Iteration 3: 92073.455 ops/s -# Warmup Iteration 4: 91787.791 ops/s -Iteration 1: 91609.844 ops/s -Iteration 2: 91919.895 ops/s -Iteration 3: 91757.642 ops/s -Iteration 4: 92501.044 ops/s - -# Run progress: 21.25% complete, ETA 01:24:44 -# Fork: 3 of 4 -# Warmup Iteration 1: 89807.439 ops/s -# Warmup Iteration 2: 94967.695 ops/s -# Warmup Iteration 3: 95388.674 ops/s -# Warmup Iteration 4: 95252.363 ops/s -Iteration 1: 94849.038 ops/s -Iteration 2: 94487.001 ops/s -Iteration 3: 95076.500 ops/s -Iteration 4: 95136.713 ops/s - -# Run progress: 21.88% complete, ETA 01:24:04 -# Fork: 4 of 4 -# Warmup Iteration 1: 90514.338 ops/s -# Warmup Iteration 2: 95579.860 ops/s -# Warmup Iteration 3: 95341.234 ops/s -# Warmup Iteration 4: 95601.744 ops/s -Iteration 1: 95170.382 ops/s -Iteration 2: 95636.280 ops/s -Iteration 3: 95493.206 ops/s -Iteration 4: 95357.141 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 94736.726 ±(99.9%) 1854.179 ops/s [Average] - (min, avg, max) = (91609.844, 94736.726, 97046.571), stdev = 1821.052 - CI (99.9%): [92882.546, 96590.905] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = pure-jackson) - -# Run progress: 22.50% complete, ETA 01:23:23 -# Fork: 1 of 4 -# Warmup Iteration 1: 101565.807 ops/s -# Warmup Iteration 2: 106302.295 ops/s -# Warmup Iteration 3: 105814.796 ops/s -# Warmup Iteration 4: 106153.583 ops/s -Iteration 1: 106357.590 ops/s -Iteration 2: 105973.621 ops/s -Iteration 3: 105947.941 ops/s -Iteration 4: 106119.284 ops/s - -# Run progress: 23.13% complete, ETA 01:22:43 -# Fork: 2 of 4 -# Warmup Iteration 1: 101183.132 ops/s -# Warmup Iteration 2: 105841.017 ops/s -# Warmup Iteration 3: 106044.490 ops/s -# Warmup Iteration 4: 106053.400 ops/s -Iteration 1: 105784.524 ops/s -Iteration 2: 106424.851 ops/s -Iteration 3: 106226.468 ops/s -Iteration 4: 106705.636 ops/s - -# Run progress: 23.75% complete, ETA 01:22:03 -# Fork: 3 of 4 -# Warmup Iteration 1: 101204.966 ops/s -# Warmup Iteration 2: 105731.172 ops/s -# Warmup Iteration 3: 105591.693 ops/s -# Warmup Iteration 4: 106458.956 ops/s -Iteration 1: 106136.930 ops/s -Iteration 2: 106017.941 ops/s -Iteration 3: 102326.621 ops/s -Iteration 4: 102814.432 ops/s - -# Run progress: 24.38% complete, ETA 01:21:22 -# Fork: 4 of 4 -# Warmup Iteration 1: 101960.655 ops/s -# Warmup Iteration 2: 107032.341 ops/s -# Warmup Iteration 3: 106879.252 ops/s -# Warmup Iteration 4: 106790.713 ops/s -Iteration 1: 106820.630 ops/s -Iteration 2: 106799.576 ops/s -Iteration 3: 106967.501 ops/s -Iteration 4: 107293.834 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 105919.836 ±(99.9%) 1401.072 ops/s [Average] - (min, avg, max) = (102326.621, 105919.836, 107293.834), stdev = 1376.040 - CI (99.9%): [104518.765, 107320.908] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = circe-jawn) - -# Run progress: 25.00% complete, ETA 01:20:42 -# Fork: 1 of 4 -# Warmup Iteration 1: 61799.739 ops/s -# Warmup Iteration 2: 66952.571 ops/s -# Warmup Iteration 3: 66792.687 ops/s -# Warmup Iteration 4: 66738.303 ops/s -Iteration 1: 66735.475 ops/s -Iteration 2: 66846.484 ops/s -Iteration 3: 66875.731 ops/s -Iteration 4: 67041.331 ops/s - -# Run progress: 25.62% complete, ETA 01:20:02 -# Fork: 2 of 4 -# Warmup Iteration 1: 61932.227 ops/s -# Warmup Iteration 2: 67011.712 ops/s -# Warmup Iteration 3: 67117.923 ops/s -# Warmup Iteration 4: 66876.782 ops/s -Iteration 1: 67051.668 ops/s -Iteration 2: 66802.380 ops/s -Iteration 3: 66880.470 ops/s -Iteration 4: 67030.413 ops/s - -# Run progress: 26.25% complete, ETA 01:19:21 -# Fork: 3 of 4 -# Warmup Iteration 1: 62026.871 ops/s -# Warmup Iteration 2: 67465.426 ops/s -# Warmup Iteration 3: 67335.787 ops/s -# Warmup Iteration 4: 67423.889 ops/s -Iteration 1: 67442.467 ops/s -Iteration 2: 67116.281 ops/s -Iteration 3: 67358.272 ops/s -Iteration 4: 67537.178 ops/s - -# Run progress: 26.88% complete, ETA 01:18:41 -# Fork: 4 of 4 -# Warmup Iteration 1: 61624.086 ops/s -# Warmup Iteration 2: 66618.690 ops/s -# Warmup Iteration 3: 66517.205 ops/s -# Warmup Iteration 4: 66676.704 ops/s -Iteration 1: 66640.891 ops/s -Iteration 2: 66801.984 ops/s -Iteration 3: 66643.546 ops/s -Iteration 4: 66591.824 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 66962.275 ±(99.9%) 291.910 ops/s [Average] - (min, avg, max) = (66591.824, 66962.275, 67537.178), stdev = 286.695 - CI (99.9%): [66670.364, 67254.185] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = circe-jackson) - -# Run progress: 27.50% complete, ETA 01:18:01 -# Fork: 1 of 4 -# Warmup Iteration 1: 22764.356 ops/s -# Warmup Iteration 2: 25979.676 ops/s -# Warmup Iteration 3: 25971.569 ops/s -# Warmup Iteration 4: 25888.470 ops/s -Iteration 1: 25908.897 ops/s -Iteration 2: 25952.818 ops/s -Iteration 3: 25979.198 ops/s -Iteration 4: 25925.648 ops/s - -# Run progress: 28.13% complete, ETA 01:17:20 -# Fork: 2 of 4 -# Warmup Iteration 1: 22578.722 ops/s -# Warmup Iteration 2: 25892.228 ops/s -# Warmup Iteration 3: 25930.211 ops/s -# Warmup Iteration 4: 26031.586 ops/s -Iteration 1: 25993.793 ops/s -Iteration 2: 25969.905 ops/s -Iteration 3: 25937.984 ops/s -Iteration 4: 25882.373 ops/s - -# Run progress: 28.75% complete, ETA 01:16:40 -# Fork: 3 of 4 -# Warmup Iteration 1: 22436.635 ops/s -# Warmup Iteration 2: 25698.406 ops/s -# Warmup Iteration 3: 25681.441 ops/s -# Warmup Iteration 4: 25675.209 ops/s -Iteration 1: 25718.423 ops/s -Iteration 2: 25643.080 ops/s -Iteration 3: 25493.310 ops/s -Iteration 4: 25643.374 ops/s - -# Run progress: 29.38% complete, ETA 01:15:59 -# Fork: 4 of 4 -# Warmup Iteration 1: 22490.669 ops/s -# Warmup Iteration 2: 25636.482 ops/s -# Warmup Iteration 3: 25770.211 ops/s -# Warmup Iteration 4: 25721.530 ops/s -Iteration 1: 25654.227 ops/s -Iteration 2: 25670.647 ops/s -Iteration 3: 25684.400 ops/s -Iteration 4: 25730.998 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 25799.317 ±(99.9%) 162.343 ops/s [Average] - (min, avg, max) = (25493.310, 25799.317, 25993.793), stdev = 159.442 - CI (99.9%): [25636.974, 25961.660] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = json4s-jackson) - -# Run progress: 30.00% complete, ETA 01:15:19 -# Fork: 1 of 4 -# Warmup Iteration 1: 10610.544 ops/s -# Warmup Iteration 2: 12923.655 ops/s -# Warmup Iteration 3: 12851.238 ops/s -# Warmup Iteration 4: 12903.410 ops/s -Iteration 1: 12929.486 ops/s -Iteration 2: 12939.613 ops/s -Iteration 3: 12867.942 ops/s -Iteration 4: 12903.858 ops/s - -# Run progress: 30.63% complete, ETA 01:14:39 -# Fork: 2 of 4 -# Warmup Iteration 1: 10332.010 ops/s -# Warmup Iteration 2: 12791.573 ops/s -# Warmup Iteration 3: 12785.727 ops/s -# Warmup Iteration 4: 12762.711 ops/s -Iteration 1: 12805.276 ops/s -Iteration 2: 12813.972 ops/s -Iteration 3: 12801.320 ops/s -Iteration 4: 12774.885 ops/s - -# Run progress: 31.25% complete, ETA 01:13:58 -# Fork: 3 of 4 -# Warmup Iteration 1: 9903.821 ops/s -# Warmup Iteration 2: 12103.352 ops/s -# Warmup Iteration 3: 12135.491 ops/s -# Warmup Iteration 4: 12172.210 ops/s -Iteration 1: 12180.850 ops/s -Iteration 2: 12082.978 ops/s -Iteration 3: 12102.520 ops/s -Iteration 4: 12139.841 ops/s - -# Run progress: 31.87% complete, ETA 01:13:18 -# Fork: 4 of 4 -# Warmup Iteration 1: 10362.900 ops/s -# Warmup Iteration 2: 12634.618 ops/s -# Warmup Iteration 3: 12691.326 ops/s -# Warmup Iteration 4: 12795.737 ops/s -Iteration 1: 12761.177 ops/s -Iteration 2: 12791.308 ops/s -Iteration 3: 12723.150 ops/s -Iteration 4: 12766.428 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 12649.038 ±(99.9%) 323.720 ops/s [Average] - (min, avg, max) = (12082.978, 12649.038, 12939.613), stdev = 317.937 - CI (99.9%): [12325.317, 12972.758] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = json4s-native) - -# Run progress: 32.50% complete, ETA 01:12:38 -# Fork: 1 of 4 -# Warmup Iteration 1: 9752.118 ops/s -# Warmup Iteration 2: 11834.668 ops/s -# Warmup Iteration 3: 11865.839 ops/s -# Warmup Iteration 4: 11825.030 ops/s -Iteration 1: 11840.545 ops/s -Iteration 2: 11791.154 ops/s -Iteration 3: 11844.868 ops/s -Iteration 4: 11805.609 ops/s - -# Run progress: 33.13% complete, ETA 01:11:57 -# Fork: 2 of 4 -# Warmup Iteration 1: 9482.746 ops/s -# Warmup Iteration 2: 11542.440 ops/s -# Warmup Iteration 3: 11573.361 ops/s -# Warmup Iteration 4: 11564.612 ops/s -Iteration 1: 11597.685 ops/s -Iteration 2: 11621.286 ops/s -Iteration 3: 11575.289 ops/s -Iteration 4: 11587.877 ops/s - -# Run progress: 33.75% complete, ETA 01:11:17 -# Fork: 3 of 4 -# Warmup Iteration 1: 9576.658 ops/s -# Warmup Iteration 2: 11580.377 ops/s -# Warmup Iteration 3: 11448.735 ops/s -# Warmup Iteration 4: 11593.787 ops/s -Iteration 1: 11581.705 ops/s -Iteration 2: 11604.349 ops/s -Iteration 3: 11612.145 ops/s -Iteration 4: 11619.381 ops/s - -# Run progress: 34.38% complete, ETA 01:10:37 -# Fork: 4 of 4 -# Warmup Iteration 1: 9647.462 ops/s -# Warmup Iteration 2: 11893.441 ops/s -# Warmup Iteration 3: 11896.009 ops/s -# Warmup Iteration 4: 11878.234 ops/s -Iteration 1: 11884.982 ops/s -Iteration 2: 11906.766 ops/s -Iteration 3: 11886.069 ops/s -Iteration 4: 11862.645 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 11726.397 ±(99.9%) 136.414 ops/s [Average] - (min, avg, max) = (11575.289, 11726.397, 11906.766), stdev = 133.977 - CI (99.9%): [11589.983, 11862.812] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = play-json) - -# Run progress: 35.00% complete, ETA 01:09:56 -# Fork: 1 of 4 -# Warmup Iteration 1: 25279.386 ops/s -# Warmup Iteration 2: 28247.691 ops/s -# Warmup Iteration 3: 28356.378 ops/s -# Warmup Iteration 4: 28365.947 ops/s -Iteration 1: 28367.305 ops/s -Iteration 2: 28397.716 ops/s -Iteration 3: 28368.174 ops/s -Iteration 4: 28455.107 ops/s - -# Run progress: 35.63% complete, ETA 01:09:16 -# Fork: 2 of 4 -# Warmup Iteration 1: 26925.226 ops/s -# Warmup Iteration 2: 29974.480 ops/s -# Warmup Iteration 3: 30023.497 ops/s -# Warmup Iteration 4: 29911.579 ops/s -Iteration 1: 29962.378 ops/s -Iteration 2: 29994.102 ops/s -Iteration 3: 29965.225 ops/s -Iteration 4: 29981.348 ops/s - -# Run progress: 36.25% complete, ETA 01:08:36 -# Fork: 3 of 4 -# Warmup Iteration 1: 25442.916 ops/s -# Warmup Iteration 2: 28489.483 ops/s -# Warmup Iteration 3: 28496.611 ops/s -# Warmup Iteration 4: 28529.774 ops/s -Iteration 1: 28462.817 ops/s -Iteration 2: 28476.606 ops/s -Iteration 3: 28569.271 ops/s -Iteration 4: 28468.965 ops/s - -# Run progress: 36.88% complete, ETA 01:07:55 -# Fork: 4 of 4 -# Warmup Iteration 1: 25432.161 ops/s -# Warmup Iteration 2: 28473.076 ops/s -# Warmup Iteration 3: 28536.261 ops/s -# Warmup Iteration 4: 28445.252 ops/s -Iteration 1: 28522.817 ops/s -Iteration 2: 28530.747 ops/s -Iteration 3: 28549.231 ops/s -Iteration 4: 28552.535 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 28851.521 ±(99.9%) 685.392 ops/s [Average] - (min, avg, max) = (28367.305, 28851.521, 29994.102), stdev = 673.146 - CI (99.9%): [28166.130, 29536.913] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1kb, processorName = spray-json) - -# Run progress: 37.50% complete, ETA 01:07:15 -# Fork: 1 of 4 -# Warmup Iteration 1: 45410.799 ops/s -# Warmup Iteration 2: 48056.056 ops/s -# Warmup Iteration 3: 48071.858 ops/s -# Warmup Iteration 4: 47992.293 ops/s -Iteration 1: 48303.335 ops/s -Iteration 2: 48005.085 ops/s -Iteration 3: 48149.540 ops/s -Iteration 4: 47900.417 ops/s - -# Run progress: 38.13% complete, ETA 01:06:34 -# Fork: 2 of 4 -# Warmup Iteration 1: 44524.605 ops/s -# Warmup Iteration 2: 46972.987 ops/s -# Warmup Iteration 3: 46993.913 ops/s -# Warmup Iteration 4: 47307.741 ops/s -Iteration 1: 47239.370 ops/s -Iteration 2: 47199.571 ops/s -Iteration 3: 47132.022 ops/s -Iteration 4: 47193.057 ops/s - -# Run progress: 38.75% complete, ETA 01:05:54 -# Fork: 3 of 4 -# Warmup Iteration 1: 44426.477 ops/s -# Warmup Iteration 2: 46994.488 ops/s -# Warmup Iteration 3: 47059.654 ops/s -# Warmup Iteration 4: 47003.155 ops/s -Iteration 1: 47072.702 ops/s -Iteration 2: 47024.195 ops/s -Iteration 3: 46940.226 ops/s -Iteration 4: 46863.133 ops/s - -# Run progress: 39.38% complete, ETA 01:05:14 -# Fork: 4 of 4 -# Warmup Iteration 1: 43932.199 ops/s -# Warmup Iteration 2: 46756.812 ops/s -# Warmup Iteration 3: 46319.211 ops/s -# Warmup Iteration 4: 46417.026 ops/s -Iteration 1: 46425.485 ops/s -Iteration 2: 46219.102 ops/s -Iteration 3: 46407.773 ops/s -Iteration 4: 46311.851 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 47149.179 ±(99.9%) 666.593 ops/s [Average] - (min, avg, max) = (46219.102, 47149.179, 48303.335), stdev = 654.683 - CI (99.9%): [46482.586, 47815.772] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = tethys-jackson) - -# Run progress: 40.00% complete, ETA 01:04:33 -# Fork: 1 of 4 -# Warmup Iteration 1: 694.795 ops/s -# Warmup Iteration 2: 741.014 ops/s -# Warmup Iteration 3: 737.547 ops/s -# Warmup Iteration 4: 740.841 ops/s -Iteration 1: 739.904 ops/s -Iteration 2: 736.428 ops/s -Iteration 3: 741.777 ops/s -Iteration 4: 740.576 ops/s - -# Run progress: 40.63% complete, ETA 01:03:53 -# Fork: 2 of 4 -# Warmup Iteration 1: 690.186 ops/s -# Warmup Iteration 2: 731.527 ops/s -# Warmup Iteration 3: 731.526 ops/s -# Warmup Iteration 4: 730.125 ops/s -Iteration 1: 732.757 ops/s -Iteration 2: 731.431 ops/s -Iteration 3: 730.010 ops/s -Iteration 4: 732.117 ops/s - -# Run progress: 41.25% complete, ETA 01:03:13 -# Fork: 3 of 4 -# Warmup Iteration 1: 687.219 ops/s -# Warmup Iteration 2: 732.108 ops/s -# Warmup Iteration 3: 733.734 ops/s -# Warmup Iteration 4: 737.399 ops/s -Iteration 1: 731.999 ops/s -Iteration 2: 735.066 ops/s -Iteration 3: 736.985 ops/s -Iteration 4: 731.739 ops/s - -# Run progress: 41.88% complete, ETA 01:02:33 -# Fork: 4 of 4 -# Warmup Iteration 1: 683.145 ops/s -# Warmup Iteration 2: 725.867 ops/s -# Warmup Iteration 3: 722.766 ops/s -# Warmup Iteration 4: 727.379 ops/s -Iteration 1: 725.488 ops/s -Iteration 2: 727.211 ops/s -Iteration 3: 727.388 ops/s -Iteration 4: 727.314 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 733.012 ±(99.9%) 5.142 ops/s [Average] - (min, avg, max) = (725.488, 733.012, 741.777), stdev = 5.050 - CI (99.9%): [727.870, 738.154] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = pure-jackson) - -# Run progress: 42.50% complete, ETA 01:01:52 -# Fork: 1 of 4 -# Warmup Iteration 1: 811.901 ops/s -# Warmup Iteration 2: 857.079 ops/s -# Warmup Iteration 3: 853.427 ops/s -# Warmup Iteration 4: 858.299 ops/s -Iteration 1: 856.894 ops/s -Iteration 2: 854.901 ops/s -Iteration 3: 850.701 ops/s -Iteration 4: 859.161 ops/s - -# Run progress: 43.13% complete, ETA 01:01:12 -# Fork: 2 of 4 -# Warmup Iteration 1: 818.322 ops/s -# Warmup Iteration 2: 853.724 ops/s -# Warmup Iteration 3: 858.640 ops/s -# Warmup Iteration 4: 862.526 ops/s -Iteration 1: 857.240 ops/s -Iteration 2: 860.799 ops/s -Iteration 3: 862.357 ops/s -Iteration 4: 856.594 ops/s - -# Run progress: 43.75% complete, ETA 01:00:32 -# Fork: 3 of 4 -# Warmup Iteration 1: 832.878 ops/s -# Warmup Iteration 2: 872.702 ops/s -# Warmup Iteration 3: 877.243 ops/s -# Warmup Iteration 4: 871.874 ops/s -Iteration 1: 878.849 ops/s -Iteration 2: 879.022 ops/s -Iteration 3: 875.354 ops/s -Iteration 4: 877.936 ops/s - -# Run progress: 44.38% complete, ETA 00:59:51 -# Fork: 4 of 4 -# Warmup Iteration 1: 833.925 ops/s -# Warmup Iteration 2: 882.385 ops/s -# Warmup Iteration 3: 881.422 ops/s -# Warmup Iteration 4: 880.916 ops/s -Iteration 1: 883.423 ops/s -Iteration 2: 881.130 ops/s -Iteration 3: 881.808 ops/s -Iteration 4: 880.001 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 868.511 ±(99.9%) 12.146 ops/s [Average] - (min, avg, max) = (850.701, 868.511, 883.423), stdev = 11.929 - CI (99.9%): [856.364, 880.657] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = circe-jawn) - -# Run progress: 45.00% complete, ETA 00:59:11 -# Fork: 1 of 4 -# Warmup Iteration 1: 468.476 ops/s -# Warmup Iteration 2: 502.869 ops/s -# Warmup Iteration 3: 502.119 ops/s -# Warmup Iteration 4: 504.637 ops/s -Iteration 1: 502.996 ops/s -Iteration 2: 503.091 ops/s -Iteration 3: 503.800 ops/s -Iteration 4: 503.064 ops/s - -# Run progress: 45.63% complete, ETA 00:58:31 -# Fork: 2 of 4 -# Warmup Iteration 1: 462.201 ops/s -# Warmup Iteration 2: 495.742 ops/s -# Warmup Iteration 3: 494.394 ops/s -# Warmup Iteration 4: 495.801 ops/s -Iteration 1: 493.540 ops/s -Iteration 2: 492.757 ops/s -Iteration 3: 494.286 ops/s -Iteration 4: 492.572 ops/s - -# Run progress: 46.25% complete, ETA 00:57:50 -# Fork: 3 of 4 -# Warmup Iteration 1: 465.298 ops/s -# Warmup Iteration 2: 500.394 ops/s -# Warmup Iteration 3: 498.740 ops/s -# Warmup Iteration 4: 499.253 ops/s -Iteration 1: 499.498 ops/s -Iteration 2: 498.993 ops/s -Iteration 3: 498.949 ops/s -Iteration 4: 498.130 ops/s - -# Run progress: 46.88% complete, ETA 00:57:10 -# Fork: 4 of 4 -# Warmup Iteration 1: 464.702 ops/s -# Warmup Iteration 2: 499.767 ops/s -# Warmup Iteration 3: 499.142 ops/s -# Warmup Iteration 4: 499.652 ops/s -Iteration 1: 498.247 ops/s -Iteration 2: 499.153 ops/s -Iteration 3: 499.978 ops/s -Iteration 4: 499.280 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 498.646 ±(99.9%) 3.766 ops/s [Average] - (min, avg, max) = (492.572, 498.646, 503.800), stdev = 3.699 - CI (99.9%): [494.880, 502.412] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = circe-jackson) - -# Run progress: 47.50% complete, ETA 00:56:30 -# Fork: 1 of 4 -# Warmup Iteration 1: 131.094 ops/s -# Warmup Iteration 2: 152.870 ops/s -# Warmup Iteration 3: 151.662 ops/s -# Warmup Iteration 4: 152.683 ops/s -Iteration 1: 150.849 ops/s -Iteration 2: 152.283 ops/s -Iteration 3: 151.982 ops/s -Iteration 4: 152.678 ops/s - -# Run progress: 48.13% complete, ETA 00:55:50 -# Fork: 2 of 4 -# Warmup Iteration 1: 130.742 ops/s -# Warmup Iteration 2: 152.295 ops/s -# Warmup Iteration 3: 152.463 ops/s -# Warmup Iteration 4: 152.802 ops/s -Iteration 1: 152.718 ops/s -Iteration 2: 152.772 ops/s -Iteration 3: 152.862 ops/s -Iteration 4: 153.242 ops/s - -# Run progress: 48.75% complete, ETA 00:55:09 -# Fork: 3 of 4 -# Warmup Iteration 1: 126.648 ops/s -# Warmup Iteration 2: 150.016 ops/s -# Warmup Iteration 3: 149.659 ops/s -# Warmup Iteration 4: 150.011 ops/s -Iteration 1: 150.225 ops/s -Iteration 2: 149.818 ops/s -Iteration 3: 150.126 ops/s -Iteration 4: 150.131 ops/s - -# Run progress: 49.38% complete, ETA 00:54:29 -# Fork: 4 of 4 -# Warmup Iteration 1: 130.483 ops/s -# Warmup Iteration 2: 150.768 ops/s -# Warmup Iteration 3: 151.151 ops/s -# Warmup Iteration 4: 151.233 ops/s -Iteration 1: 150.993 ops/s -Iteration 2: 151.186 ops/s -Iteration 3: 150.990 ops/s -Iteration 4: 151.471 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 151.520 ±(99.9%) 1.160 ops/s [Average] - (min, avg, max) = (149.818, 151.520, 153.242), stdev = 1.139 - CI (99.9%): [150.360, 152.681] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = json4s-jackson) - -# Run progress: 50.00% complete, ETA 00:53:49 -# Fork: 1 of 4 -# Warmup Iteration 1: 76.231 ops/s -# Warmup Iteration 2: 93.310 ops/s -# Warmup Iteration 3: 93.460 ops/s -# Warmup Iteration 4: 93.636 ops/s -Iteration 1: 94.129 ops/s -Iteration 2: 93.924 ops/s -Iteration 3: 93.570 ops/s -Iteration 4: 93.809 ops/s - -# Run progress: 50.63% complete, ETA 00:53:08 -# Fork: 2 of 4 -# Warmup Iteration 1: 73.057 ops/s -# Warmup Iteration 2: 88.855 ops/s -# Warmup Iteration 3: 89.678 ops/s -# Warmup Iteration 4: 89.749 ops/s -Iteration 1: 89.436 ops/s -Iteration 2: 88.976 ops/s -Iteration 3: 89.370 ops/s -Iteration 4: 89.071 ops/s - -# Run progress: 51.25% complete, ETA 00:52:28 -# Fork: 3 of 4 -# Warmup Iteration 1: 68.859 ops/s -# Warmup Iteration 2: 83.481 ops/s -# Warmup Iteration 3: 83.872 ops/s -# Warmup Iteration 4: 83.568 ops/s -Iteration 1: 83.910 ops/s -Iteration 2: 83.590 ops/s -Iteration 3: 83.353 ops/s -Iteration 4: 84.112 ops/s - -# Run progress: 51.88% complete, ETA 00:51:48 -# Fork: 4 of 4 -# Warmup Iteration 1: 72.743 ops/s -# Warmup Iteration 2: 89.039 ops/s -# Warmup Iteration 3: 89.310 ops/s -# Warmup Iteration 4: 89.423 ops/s -Iteration 1: 89.718 ops/s -Iteration 2: 89.156 ops/s -Iteration 3: 89.342 ops/s -Iteration 4: 89.384 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 89.053 ±(99.9%) 3.779 ops/s [Average] - (min, avg, max) = (83.353, 89.053, 94.129), stdev = 3.711 - CI (99.9%): [85.274, 92.832] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = json4s-native) - -# Run progress: 52.50% complete, ETA 00:51:07 -# Fork: 1 of 4 -# Warmup Iteration 1: 69.640 ops/s -# Warmup Iteration 2: 83.311 ops/s -# Warmup Iteration 3: 83.526 ops/s -# Warmup Iteration 4: 83.267 ops/s -Iteration 1: 83.596 ops/s -Iteration 2: 83.361 ops/s -Iteration 3: 83.415 ops/s -Iteration 4: 83.955 ops/s - -# Run progress: 53.13% complete, ETA 00:50:27 -# Fork: 2 of 4 -# Warmup Iteration 1: 65.542 ops/s -# Warmup Iteration 2: 77.588 ops/s -# Warmup Iteration 3: 77.125 ops/s -# Warmup Iteration 4: 77.037 ops/s -Iteration 1: 77.037 ops/s -Iteration 2: 77.762 ops/s -Iteration 3: 77.194 ops/s -Iteration 4: 77.555 ops/s - -# Run progress: 53.75% complete, ETA 00:49:47 -# Fork: 3 of 4 -# Warmup Iteration 1: 71.904 ops/s -# Warmup Iteration 2: 85.260 ops/s -# Warmup Iteration 3: 85.122 ops/s -# Warmup Iteration 4: 85.263 ops/s -Iteration 1: 85.470 ops/s -Iteration 2: 85.308 ops/s -Iteration 3: 85.522 ops/s -Iteration 4: 85.485 ops/s - -# Run progress: 54.37% complete, ETA 00:49:07 -# Fork: 4 of 4 -# Warmup Iteration 1: 62.558 ops/s -# Warmup Iteration 2: 73.977 ops/s -# Warmup Iteration 3: 73.796 ops/s -# Warmup Iteration 4: 73.589 ops/s -Iteration 1: 74.035 ops/s -Iteration 2: 74.103 ops/s -Iteration 3: 73.896 ops/s -Iteration 4: 73.813 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 80.094 ±(99.9%) 4.873 ops/s [Average] - (min, avg, max) = (73.813, 80.094, 85.522), stdev = 4.786 - CI (99.9%): [75.221, 84.967] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = play-json) - -# Run progress: 55.00% complete, ETA 00:48:26 -# Fork: 1 of 4 -# Warmup Iteration 1: 164.051 ops/s -# Warmup Iteration 2: 185.444 ops/s -# Warmup Iteration 3: 185.639 ops/s -# Warmup Iteration 4: 186.089 ops/s -Iteration 1: 185.723 ops/s -Iteration 2: 185.886 ops/s -Iteration 3: 186.833 ops/s -Iteration 4: 187.767 ops/s - -# Run progress: 55.63% complete, ETA 00:47:46 -# Fork: 2 of 4 -# Warmup Iteration 1: 167.606 ops/s -# Warmup Iteration 2: 188.637 ops/s -# Warmup Iteration 3: 189.060 ops/s -# Warmup Iteration 4: 188.930 ops/s -Iteration 1: 189.205 ops/s -Iteration 2: 188.515 ops/s -Iteration 3: 188.285 ops/s -Iteration 4: 189.180 ops/s - -# Run progress: 56.25% complete, ETA 00:47:06 -# Fork: 3 of 4 -# Warmup Iteration 1: 164.633 ops/s -# Warmup Iteration 2: 185.508 ops/s -# Warmup Iteration 3: 185.587 ops/s -# Warmup Iteration 4: 185.881 ops/s -Iteration 1: 185.455 ops/s -Iteration 2: 186.683 ops/s -Iteration 3: 186.960 ops/s -Iteration 4: 186.906 ops/s - -# Run progress: 56.88% complete, ETA 00:46:25 -# Fork: 4 of 4 -# Warmup Iteration 1: 162.743 ops/s -# Warmup Iteration 2: 184.766 ops/s -# Warmup Iteration 3: 184.359 ops/s -# Warmup Iteration 4: 184.054 ops/s -Iteration 1: 184.490 ops/s -Iteration 2: 184.532 ops/s -Iteration 3: 185.417 ops/s -Iteration 4: 185.902 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 186.734 ±(99.9%) 1.545 ops/s [Average] - (min, avg, max) = (184.490, 186.734, 189.205), stdev = 1.517 - CI (99.9%): [185.189, 188.278] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 128kb, processorName = spray-json) - -# Run progress: 57.50% complete, ETA 00:45:45 -# Fork: 1 of 4 -# Warmup Iteration 1: 332.477 ops/s -# Warmup Iteration 2: 350.615 ops/s -# Warmup Iteration 3: 349.267 ops/s -# Warmup Iteration 4: 351.696 ops/s -Iteration 1: 350.526 ops/s -Iteration 2: 350.829 ops/s -Iteration 3: 350.891 ops/s -Iteration 4: 350.181 ops/s - -# Run progress: 58.13% complete, ETA 00:45:05 -# Fork: 2 of 4 -# Warmup Iteration 1: 330.053 ops/s -# Warmup Iteration 2: 346.306 ops/s -# Warmup Iteration 3: 347.624 ops/s -# Warmup Iteration 4: 347.093 ops/s -Iteration 1: 346.350 ops/s -Iteration 2: 348.193 ops/s -Iteration 3: 346.475 ops/s -Iteration 4: 347.190 ops/s - -# Run progress: 58.75% complete, ETA 00:44:24 -# Fork: 3 of 4 -# Warmup Iteration 1: 328.308 ops/s -# Warmup Iteration 2: 345.777 ops/s -# Warmup Iteration 3: 347.263 ops/s -# Warmup Iteration 4: 346.856 ops/s -Iteration 1: 344.256 ops/s -Iteration 2: 347.354 ops/s -Iteration 3: 346.715 ops/s -Iteration 4: 346.547 ops/s - -# Run progress: 59.38% complete, ETA 00:43:44 -# Fork: 4 of 4 -# Warmup Iteration 1: 314.633 ops/s -# Warmup Iteration 2: 345.681 ops/s -# Warmup Iteration 3: 347.667 ops/s -# Warmup Iteration 4: 348.049 ops/s -Iteration 1: 347.954 ops/s -Iteration 2: 348.309 ops/s -Iteration 3: 344.894 ops/s -Iteration 4: 347.329 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 347.749 ±(99.9%) 2.047 ops/s [Average] - (min, avg, max) = (344.256, 347.749, 350.891), stdev = 2.010 - CI (99.9%): [345.702, 349.796] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = tethys-jackson) - -# Run progress: 60.00% complete, ETA 00:43:04 -# Fork: 1 of 4 -# Warmup Iteration 1: 69.870 ops/s -# Warmup Iteration 2: 76.192 ops/s -# Warmup Iteration 3: 76.614 ops/s -# Warmup Iteration 4: 76.108 ops/s -Iteration 1: 76.107 ops/s -Iteration 2: 76.217 ops/s -Iteration 3: 76.387 ops/s -Iteration 4: 76.550 ops/s - -# Run progress: 60.62% complete, ETA 00:42:23 -# Fork: 2 of 4 -# Warmup Iteration 1: 69.637 ops/s -# Warmup Iteration 2: 76.385 ops/s -# Warmup Iteration 3: 76.811 ops/s -# Warmup Iteration 4: 76.466 ops/s -Iteration 1: 76.342 ops/s -Iteration 2: 76.681 ops/s -Iteration 3: 76.991 ops/s -Iteration 4: 76.637 ops/s - -# Run progress: 61.25% complete, ETA 00:41:43 -# Fork: 3 of 4 -# Warmup Iteration 1: 68.809 ops/s -# Warmup Iteration 2: 74.397 ops/s -# Warmup Iteration 3: 74.262 ops/s -# Warmup Iteration 4: 74.554 ops/s -Iteration 1: 74.615 ops/s -Iteration 2: 74.492 ops/s -Iteration 3: 73.932 ops/s -Iteration 4: 74.342 ops/s - -# Run progress: 61.88% complete, ETA 00:41:03 -# Fork: 4 of 4 -# Warmup Iteration 1: 68.983 ops/s -# Warmup Iteration 2: 74.574 ops/s -# Warmup Iteration 3: 74.790 ops/s -# Warmup Iteration 4: 74.482 ops/s -Iteration 1: 74.645 ops/s -Iteration 2: 74.946 ops/s -Iteration 3: 74.430 ops/s -Iteration 4: 74.626 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 75.496 ±(99.9%) 1.082 ops/s [Average] - (min, avg, max) = (73.932, 75.496, 76.991), stdev = 1.063 - CI (99.9%): [74.414, 76.578] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = pure-jackson) - -# Run progress: 62.50% complete, ETA 00:40:22 -# Fork: 1 of 4 -# Warmup Iteration 1: 87.261 ops/s -# Warmup Iteration 2: 94.728 ops/s -# Warmup Iteration 3: 96.075 ops/s -# Warmup Iteration 4: 95.583 ops/s -Iteration 1: 95.542 ops/s -Iteration 2: 95.050 ops/s -Iteration 3: 96.062 ops/s -Iteration 4: 95.628 ops/s - -# Run progress: 63.13% complete, ETA 00:39:42 -# Fork: 2 of 4 -# Warmup Iteration 1: 87.023 ops/s -# Warmup Iteration 2: 94.026 ops/s -# Warmup Iteration 3: 94.585 ops/s -# Warmup Iteration 4: 94.502 ops/s -Iteration 1: 94.306 ops/s -Iteration 2: 94.874 ops/s -Iteration 3: 94.437 ops/s -Iteration 4: 94.477 ops/s - -# Run progress: 63.75% complete, ETA 00:39:02 -# Fork: 3 of 4 -# Warmup Iteration 1: 87.291 ops/s -# Warmup Iteration 2: 94.565 ops/s -# Warmup Iteration 3: 95.410 ops/s -# Warmup Iteration 4: 95.416 ops/s -Iteration 1: 95.515 ops/s -Iteration 2: 95.028 ops/s -Iteration 3: 94.484 ops/s -Iteration 4: 94.936 ops/s - -# Run progress: 64.38% complete, ETA 00:38:21 -# Fork: 4 of 4 -# Warmup Iteration 1: 87.294 ops/s -# Warmup Iteration 2: 95.155 ops/s -# Warmup Iteration 3: 95.628 ops/s -# Warmup Iteration 4: 94.859 ops/s -Iteration 1: 94.954 ops/s -Iteration 2: 95.332 ops/s -Iteration 3: 95.366 ops/s -Iteration 4: 95.068 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 95.066 ±(99.9%) 0.501 ops/s [Average] - (min, avg, max) = (94.306, 95.066, 96.062), stdev = 0.492 - CI (99.9%): [94.566, 95.567] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = circe-jawn) - -# Run progress: 65.00% complete, ETA 00:37:41 -# Fork: 1 of 4 -# Warmup Iteration 1: 45.879 ops/s -# Warmup Iteration 2: 50.488 ops/s -# Warmup Iteration 3: 50.722 ops/s -# Warmup Iteration 4: 50.606 ops/s -Iteration 1: 50.770 ops/s -Iteration 2: 50.562 ops/s -Iteration 3: 50.698 ops/s -Iteration 4: 50.607 ops/s - -# Run progress: 65.63% complete, ETA 00:37:01 -# Fork: 2 of 4 -# Warmup Iteration 1: 46.519 ops/s -# Warmup Iteration 2: 50.776 ops/s -# Warmup Iteration 3: 50.917 ops/s -# Warmup Iteration 4: 50.933 ops/s -Iteration 1: 51.066 ops/s -Iteration 2: 50.930 ops/s -Iteration 3: 50.934 ops/s -Iteration 4: 51.037 ops/s - -# Run progress: 66.25% complete, ETA 00:36:21 -# Fork: 3 of 4 -# Warmup Iteration 1: 46.322 ops/s -# Warmup Iteration 2: 50.660 ops/s -# Warmup Iteration 3: 50.712 ops/s -# Warmup Iteration 4: 50.738 ops/s -Iteration 1: 50.868 ops/s -Iteration 2: 50.756 ops/s -Iteration 3: 51.112 ops/s -Iteration 4: 50.973 ops/s - -# Run progress: 66.88% complete, ETA 00:35:40 -# Fork: 4 of 4 -# Warmup Iteration 1: 47.241 ops/s -# Warmup Iteration 2: 51.732 ops/s -# Warmup Iteration 3: 51.572 ops/s -# Warmup Iteration 4: 51.814 ops/s -Iteration 1: 51.976 ops/s -Iteration 2: 51.965 ops/s -Iteration 3: 51.867 ops/s -Iteration 4: 51.729 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 51.116 ±(99.9%) 0.495 ops/s [Average] - (min, avg, max) = (50.562, 51.116, 51.976), stdev = 0.486 - CI (99.9%): [50.620, 51.611] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = circe-jackson) - -# Run progress: 67.50% complete, ETA 00:35:00 -# Fork: 1 of 4 -# Warmup Iteration 1: 13.567 ops/s -# Warmup Iteration 2: 15.711 ops/s -# Warmup Iteration 3: 15.596 ops/s -# Warmup Iteration 4: 15.685 ops/s -Iteration 1: 15.710 ops/s -Iteration 2: 15.597 ops/s -Iteration 3: 15.645 ops/s -Iteration 4: 15.671 ops/s - -# Run progress: 68.13% complete, ETA 00:34:20 -# Fork: 2 of 4 -# Warmup Iteration 1: 14.332 ops/s -# Warmup Iteration 2: 16.397 ops/s -# Warmup Iteration 3: 16.410 ops/s -# Warmup Iteration 4: 16.442 ops/s -Iteration 1: 16.464 ops/s -Iteration 2: 16.465 ops/s -Iteration 3: 16.448 ops/s -Iteration 4: 16.495 ops/s - -# Run progress: 68.75% complete, ETA 00:33:40 -# Fork: 3 of 4 -# Warmup Iteration 1: 14.723 ops/s -# Warmup Iteration 2: 17.012 ops/s -# Warmup Iteration 3: 17.033 ops/s -# Warmup Iteration 4: 17.030 ops/s -Iteration 1: 17.081 ops/s -Iteration 2: 17.036 ops/s -Iteration 3: 17.081 ops/s -Iteration 4: 17.125 ops/s - -# Run progress: 69.38% complete, ETA 00:32:59 -# Fork: 4 of 4 -# Warmup Iteration 1: 14.110 ops/s -# Warmup Iteration 2: 16.223 ops/s -# Warmup Iteration 3: 16.258 ops/s -# Warmup Iteration 4: 16.284 ops/s -Iteration 1: 16.368 ops/s -Iteration 2: 16.252 ops/s -Iteration 3: 16.256 ops/s -Iteration 4: 16.264 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 16.372 ±(99.9%) 0.536 ops/s [Average] - (min, avg, max) = (15.597, 16.372, 17.125), stdev = 0.526 - CI (99.9%): [15.837, 16.908] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = json4s-jackson) - -# Run progress: 70.00% complete, ETA 00:32:19 -# Fork: 1 of 4 -# Warmup Iteration 1: 8.786 ops/s -# Warmup Iteration 2: 10.881 ops/s -# Warmup Iteration 3: 10.918 ops/s -# Warmup Iteration 4: 10.872 ops/s -Iteration 1: 10.990 ops/s -Iteration 2: 10.945 ops/s -Iteration 3: 10.896 ops/s -Iteration 4: 10.922 ops/s - -# Run progress: 70.63% complete, ETA 00:31:39 -# Fork: 2 of 4 -# Warmup Iteration 1: 8.647 ops/s -# Warmup Iteration 2: 10.668 ops/s -# Warmup Iteration 3: 10.699 ops/s -# Warmup Iteration 4: 10.730 ops/s -Iteration 1: 10.646 ops/s -Iteration 2: 10.660 ops/s -Iteration 3: 10.667 ops/s -Iteration 4: 10.684 ops/s - -# Run progress: 71.25% complete, ETA 00:30:59 -# Fork: 3 of 4 -# Warmup Iteration 1: 8.465 ops/s -# Warmup Iteration 2: 10.361 ops/s -# Warmup Iteration 3: 10.424 ops/s -# Warmup Iteration 4: 10.387 ops/s -Iteration 1: 10.329 ops/s -Iteration 2: 10.441 ops/s -Iteration 3: 10.466 ops/s -Iteration 4: 10.381 ops/s - -# Run progress: 71.88% complete, ETA 00:30:18 -# Fork: 4 of 4 -# Warmup Iteration 1: 8.278 ops/s -# Warmup Iteration 2: 10.063 ops/s -# Warmup Iteration 3: 10.091 ops/s -# Warmup Iteration 4: 10.081 ops/s -Iteration 1: 10.127 ops/s -Iteration 2: 10.166 ops/s -Iteration 3: 10.113 ops/s -Iteration 4: 10.106 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 10.534 ±(99.9%) 0.319 ops/s [Average] - (min, avg, max) = (10.106, 10.534, 10.990), stdev = 0.313 - CI (99.9%): [10.215, 10.852] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = json4s-native) - -# Run progress: 72.50% complete, ETA 00:29:38 -# Fork: 1 of 4 -# Warmup Iteration 1: 7.580 ops/s -# Warmup Iteration 2: 9.197 ops/s -# Warmup Iteration 3: 9.196 ops/s -# Warmup Iteration 4: 9.227 ops/s -Iteration 1: 9.202 ops/s -Iteration 2: 9.233 ops/s -Iteration 3: 9.175 ops/s -Iteration 4: 9.211 ops/s - -# Run progress: 73.13% complete, ETA 00:28:58 -# Fork: 2 of 4 -# Warmup Iteration 1: 7.647 ops/s -# Warmup Iteration 2: 9.249 ops/s -# Warmup Iteration 3: 9.266 ops/s -# Warmup Iteration 4: 9.240 ops/s -Iteration 1: 9.220 ops/s -Iteration 2: 9.195 ops/s -Iteration 3: 9.232 ops/s -Iteration 4: 9.261 ops/s - -# Run progress: 73.75% complete, ETA 00:28:18 -# Fork: 3 of 4 -# Warmup Iteration 1: 7.539 ops/s -# Warmup Iteration 2: 9.140 ops/s -# Warmup Iteration 3: 9.082 ops/s -# Warmup Iteration 4: 9.078 ops/s -Iteration 1: 9.068 ops/s -Iteration 2: 9.058 ops/s -Iteration 3: 9.131 ops/s -Iteration 4: 9.128 ops/s - -# Run progress: 74.38% complete, ETA 00:27:37 -# Fork: 4 of 4 -# Warmup Iteration 1: 7.703 ops/s -# Warmup Iteration 2: 9.319 ops/s -# Warmup Iteration 3: 9.346 ops/s -# Warmup Iteration 4: 9.351 ops/s -Iteration 1: 9.312 ops/s -Iteration 2: 9.349 ops/s -Iteration 3: 9.329 ops/s -Iteration 4: 9.233 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 9.209 ±(99.9%) 0.086 ops/s [Average] - (min, avg, max) = (9.058, 9.209, 9.349), stdev = 0.084 - CI (99.9%): [9.123, 9.294] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = play-json) - -# Run progress: 75.00% complete, ETA 00:26:57 -# Fork: 1 of 4 -# Warmup Iteration 1: 14.551 ops/s -# Warmup Iteration 2: 17.306 ops/s -# Warmup Iteration 3: 17.362 ops/s -# Warmup Iteration 4: 17.361 ops/s -Iteration 1: 17.329 ops/s -Iteration 2: 17.358 ops/s -Iteration 3: 17.340 ops/s -Iteration 4: 17.338 ops/s - -# Run progress: 75.63% complete, ETA 00:26:17 -# Fork: 2 of 4 -# Warmup Iteration 1: 15.024 ops/s -# Warmup Iteration 2: 17.534 ops/s -# Warmup Iteration 3: 17.539 ops/s -# Warmup Iteration 4: 17.563 ops/s -Iteration 1: 17.529 ops/s -Iteration 2: 17.548 ops/s -Iteration 3: 17.453 ops/s -Iteration 4: 17.566 ops/s - -# Run progress: 76.25% complete, ETA 00:25:36 -# Fork: 3 of 4 -# Warmup Iteration 1: 14.703 ops/s -# Warmup Iteration 2: 16.927 ops/s -# Warmup Iteration 3: 17.045 ops/s -# Warmup Iteration 4: 16.960 ops/s -Iteration 1: 17.081 ops/s -Iteration 2: 16.962 ops/s -Iteration 3: 17.065 ops/s -Iteration 4: 17.079 ops/s - -# Run progress: 76.88% complete, ETA 00:24:56 -# Fork: 4 of 4 -# Warmup Iteration 1: 14.500 ops/s -# Warmup Iteration 2: 17.300 ops/s -# Warmup Iteration 3: 17.329 ops/s -# Warmup Iteration 4: 17.314 ops/s -Iteration 1: 17.252 ops/s -Iteration 2: 17.198 ops/s -Iteration 3: 17.317 ops/s -Iteration 4: 17.343 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 17.297 ±(99.9%) 0.185 ops/s [Average] - (min, avg, max) = (16.962, 17.297, 17.566), stdev = 0.182 - CI (99.9%): [17.112, 17.483] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 1mb, processorName = spray-json) - -# Run progress: 77.50% complete, ETA 00:24:16 -# Fork: 1 of 4 -# Warmup Iteration 1: 33.109 ops/s -# Warmup Iteration 2: 35.926 ops/s -# Warmup Iteration 3: 35.946 ops/s -# Warmup Iteration 4: 35.938 ops/s -Iteration 1: 35.973 ops/s -Iteration 2: 35.943 ops/s -Iteration 3: 35.950 ops/s -Iteration 4: 35.978 ops/s - -# Run progress: 78.13% complete, ETA 00:23:35 -# Fork: 2 of 4 -# Warmup Iteration 1: 33.566 ops/s -# Warmup Iteration 2: 36.558 ops/s -# Warmup Iteration 3: 36.451 ops/s -# Warmup Iteration 4: 36.423 ops/s -Iteration 1: 36.490 ops/s -Iteration 2: 36.356 ops/s -Iteration 3: 36.390 ops/s -Iteration 4: 36.477 ops/s - -# Run progress: 78.75% complete, ETA 00:22:55 -# Fork: 3 of 4 -# Warmup Iteration 1: 33.044 ops/s -# Warmup Iteration 2: 35.770 ops/s -# Warmup Iteration 3: 35.971 ops/s -# Warmup Iteration 4: 35.886 ops/s -Iteration 1: 35.952 ops/s -Iteration 2: 35.796 ops/s -Iteration 3: 35.766 ops/s -Iteration 4: 35.866 ops/s - -# Run progress: 79.38% complete, ETA 00:22:14 -# Fork: 4 of 4 -# Warmup Iteration 1: 34.574 ops/s -# Warmup Iteration 2: 36.872 ops/s -# Warmup Iteration 3: 37.032 ops/s -# Warmup Iteration 4: 37.060 ops/s -Iteration 1: 37.015 ops/s -Iteration 2: 36.867 ops/s -Iteration 3: 37.053 ops/s -Iteration 4: 36.928 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 36.300 ±(99.9%) 0.469 ops/s [Average] - (min, avg, max) = (35.766, 36.300, 37.053), stdev = 0.461 - CI (99.9%): [35.831, 36.769] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = tethys-jackson) - -# Run progress: 80.00% complete, ETA 00:21:34 -# Fork: 1 of 4 -# Warmup Iteration 1: 1.901 ops/s -# Warmup Iteration 2: 2.068 ops/s -# Warmup Iteration 3: 2.076 ops/s -# Warmup Iteration 4: 1.981 ops/s -Iteration 1: 2.069 ops/s -Iteration 2: 1.983 ops/s -Iteration 3: 2.103 ops/s -Iteration 4: 2.111 ops/s - -# Run progress: 80.63% complete, ETA 00:20:54 -# Fork: 2 of 4 -# Warmup Iteration 1: 1.771 ops/s -# Warmup Iteration 2: 2.030 ops/s -# Warmup Iteration 3: 2.114 ops/s -# Warmup Iteration 4: 2.070 ops/s -Iteration 1: 2.090 ops/s -Iteration 2: 2.083 ops/s -Iteration 3: 2.057 ops/s -Iteration 4: 2.074 ops/s - -# Run progress: 81.25% complete, ETA 00:20:15 -# Fork: 3 of 4 -# Warmup Iteration 1: 1.872 ops/s -# Warmup Iteration 2: 2.007 ops/s -# Warmup Iteration 3: 2.064 ops/s -# Warmup Iteration 4: 2.082 ops/s -Iteration 1: 2.058 ops/s -Iteration 2: 2.075 ops/s -Iteration 3: 2.107 ops/s -Iteration 4: 2.120 ops/s - -# Run progress: 81.88% complete, ETA 00:19:35 -# Fork: 4 of 4 -# Warmup Iteration 1: 1.875 ops/s -# Warmup Iteration 2: 2.124 ops/s -# Warmup Iteration 3: 2.039 ops/s -# Warmup Iteration 4: 2.098 ops/s -Iteration 1: 2.017 ops/s -Iteration 2: 2.125 ops/s -Iteration 3: 2.097 ops/s -Iteration 4: 2.022 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 2.074 ±(99.9%) 0.040 ops/s [Average] - (min, avg, max) = (1.983, 2.074, 2.125), stdev = 0.040 - CI (99.9%): [2.034, 2.115] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = pure-jackson) - -# Run progress: 82.50% complete, ETA 00:18:55 -# Fork: 1 of 4 -# Warmup Iteration 1: 1.695 ops/s -# Warmup Iteration 2: 1.770 ops/s -# Warmup Iteration 3: 1.939 ops/s -# Warmup Iteration 4: 1.957 ops/s -Iteration 1: 1.888 ops/s -Iteration 2: 1.905 ops/s -Iteration 3: 1.926 ops/s -Iteration 4: 1.832 ops/s - -# Run progress: 83.13% complete, ETA 00:18:15 -# Fork: 2 of 4 -# Warmup Iteration 1: 1.577 ops/s -# Warmup Iteration 2: 1.783 ops/s -# Warmup Iteration 3: 1.991 ops/s -# Warmup Iteration 4: 1.927 ops/s -Iteration 1: 1.958 ops/s -Iteration 2: 1.987 ops/s -Iteration 3: 1.971 ops/s -Iteration 4: 1.865 ops/s - -# Run progress: 83.75% complete, ETA 00:17:35 -# Fork: 3 of 4 -# Warmup Iteration 1: 1.649 ops/s -# Warmup Iteration 2: 1.889 ops/s -# Warmup Iteration 3: 1.927 ops/s -# Warmup Iteration 4: 1.872 ops/s -Iteration 1: 1.974 ops/s -Iteration 2: 1.968 ops/s -Iteration 3: 1.993 ops/s -Iteration 4: 1.813 ops/s - -# Run progress: 84.38% complete, ETA 00:16:55 -# Fork: 4 of 4 -# Warmup Iteration 1: 1.572 ops/s -# Warmup Iteration 2: 1.902 ops/s -# Warmup Iteration 3: 1.905 ops/s -# Warmup Iteration 4: 1.843 ops/s -Iteration 1: 1.979 ops/s -Iteration 2: 1.924 ops/s -Iteration 3: 1.985 ops/s -Iteration 4: 1.900 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 1.929 ±(99.9%) 0.058 ops/s [Average] - (min, avg, max) = (1.813, 1.929, 1.993), stdev = 0.057 - CI (99.9%): [1.871, 1.988] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = circe-jawn) - -# Run progress: 85.00% complete, ETA 00:16:15 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.179 ops/s -# Warmup Iteration 2: 0.220 ops/s -# Warmup Iteration 3: 0.238 ops/s -# Warmup Iteration 4: 0.238 ops/s -Iteration 1: 0.238 ops/s -Iteration 2: 0.235 ops/s -Iteration 3: 0.248 ops/s -Iteration 4: 0.227 ops/s - -# Run progress: 85.63% complete, ETA 00:15:39 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.224 ops/s -# Warmup Iteration 2: 0.219 ops/s -# Warmup Iteration 3: 0.216 ops/s -# Warmup Iteration 4: 0.199 ops/s -Iteration 1: 0.224 ops/s -Iteration 2: 0.227 ops/s -Iteration 3: 0.249 ops/s -Iteration 4: 0.248 ops/s - -# Run progress: 86.25% complete, ETA 00:15:03 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.186 ops/s -# Warmup Iteration 2: 0.217 ops/s -# Warmup Iteration 3: 0.223 ops/s -# Warmup Iteration 4: 0.199 ops/s -Iteration 1: 0.248 ops/s -Iteration 2: 0.238 ops/s -Iteration 3: 0.247 ops/s -Iteration 4: 0.237 ops/s - -# Run progress: 86.88% complete, ETA 00:14:25 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.193 ops/s -# Warmup Iteration 2: 0.224 ops/s -# Warmup Iteration 3: 0.217 ops/s -# Warmup Iteration 4: 0.200 ops/s -Iteration 1: 0.216 ops/s -Iteration 2: 0.216 ops/s -Iteration 3: 0.247 ops/s -Iteration 4: 0.245 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.237 ±(99.9%) 0.012 ops/s [Average] - (min, avg, max) = (0.216, 0.237, 0.249), stdev = 0.012 - CI (99.9%): [0.225, 0.249] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = circe-jackson) - -# Run progress: 87.50% complete, ETA 00:13:47 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.070 ops/s -# Warmup Iteration 2: 0.081 ops/s -# Warmup Iteration 3: 0.079 ops/s -# Warmup Iteration 4: 0.079 ops/s -Iteration 1: 0.097 ops/s -Iteration 2: 0.079 ops/s -Iteration 3: 0.083 ops/s -Iteration 4: 0.119 ops/s - -# Run progress: 88.13% complete, ETA 00:13:13 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.072 ops/s -# Warmup Iteration 2: 0.078 ops/s -# Warmup Iteration 3: 0.079 ops/s -# Warmup Iteration 4: 0.077 ops/s -Iteration 1: 0.089 ops/s -Iteration 2: 0.078 ops/s -Iteration 3: 0.079 ops/s -Iteration 4: 0.080 ops/s - -# Run progress: 88.75% complete, ETA 00:12:39 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.073 ops/s -# Warmup Iteration 2: 0.080 ops/s -# Warmup Iteration 3: 0.081 ops/s -# Warmup Iteration 4: 0.079 ops/s -Iteration 1: 0.081 ops/s -Iteration 2: 0.081 ops/s -Iteration 3: 0.119 ops/s -Iteration 4: 0.077 ops/s - -# Run progress: 89.38% complete, ETA 00:12:04 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.073 ops/s -# Warmup Iteration 2: 0.081 ops/s -# Warmup Iteration 3: 0.079 ops/s -# Warmup Iteration 4: 0.079 ops/s -Iteration 1: 0.079 ops/s -Iteration 2: 0.116 ops/s -Iteration 3: 0.076 ops/s -Iteration 4: 0.085 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.089 ±(99.9%) 0.016 ops/s [Average] - (min, avg, max) = (0.076, 0.089, 0.119), stdev = 0.016 - CI (99.9%): [0.073, 0.104] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = json4s-jackson) - -# Run progress: 90.00% complete, ETA 00:11:27 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.056 ops/s -# Warmup Iteration 2: 0.059 ops/s -# Warmup Iteration 3: 0.066 ops/s -# Warmup Iteration 4: 0.068 ops/s -Iteration 1: 0.069 ops/s -Iteration 2: 0.071 ops/s -Iteration 3: 0.070 ops/s -Iteration 4: 0.068 ops/s - -# Run progress: 90.63% complete, ETA 00:10:53 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.059 ops/s -# Warmup Iteration 2: 0.060 ops/s -# Warmup Iteration 3: 0.064 ops/s -# Warmup Iteration 4: 0.062 ops/s -Iteration 1: 0.064 ops/s -Iteration 2: 0.068 ops/s -Iteration 3: 0.073 ops/s -Iteration 4: 0.069 ops/s - -# Run progress: 91.25% complete, ETA 00:10:17 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.055 ops/s -# Warmup Iteration 2: 0.060 ops/s -# Warmup Iteration 3: 0.065 ops/s -# Warmup Iteration 4: 0.063 ops/s -Iteration 1: 0.064 ops/s -Iteration 2: 0.064 ops/s -Iteration 3: 0.065 ops/s -Iteration 4: 0.064 ops/s - -# Run progress: 91.88% complete, ETA 00:09:41 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.058 ops/s -# Warmup Iteration 2: 0.063 ops/s -# Warmup Iteration 3: 0.069 ops/s -# Warmup Iteration 4: 0.067 ops/s -Iteration 1: 0.063 ops/s -Iteration 2: 0.064 ops/s -Iteration 3: 0.063 ops/s -Iteration 4: 0.067 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.067 ±(99.9%) 0.003 ops/s [Average] - (min, avg, max) = (0.063, 0.067, 0.073), stdev = 0.003 - CI (99.9%): [0.064, 0.070] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = json4s-native) - -# Run progress: 92.50% complete, ETA 00:09:03 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.039 ops/s -# Warmup Iteration 2: 0.034 ops/s -# Warmup Iteration 3: 0.034 ops/s -# Warmup Iteration 4: 0.033 ops/s -Iteration 1: 0.034 ops/s -Iteration 2: 0.034 ops/s -Iteration 3: 0.034 ops/s -Iteration 4: 0.034 ops/s - -# Run progress: 93.13% complete, ETA 00:08:31 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.040 ops/s -# Warmup Iteration 2: 0.035 ops/s -# Warmup Iteration 3: 0.035 ops/s -# Warmup Iteration 4: 0.034 ops/s -Iteration 1: 0.034 ops/s -Iteration 2: 0.035 ops/s -Iteration 3: 0.035 ops/s -Iteration 4: 0.034 ops/s - -# Run progress: 93.75% complete, ETA 00:07:57 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.041 ops/s -# Warmup Iteration 2: 0.035 ops/s -# Warmup Iteration 3: 0.035 ops/s -# Warmup Iteration 4: 0.034 ops/s -Iteration 1: 0.035 ops/s -Iteration 2: 0.034 ops/s -Iteration 3: 0.035 ops/s -Iteration 4: 0.035 ops/s - -# Run progress: 94.38% complete, ETA 00:07:20 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.042 ops/s -# Warmup Iteration 2: 0.034 ops/s -# Warmup Iteration 3: 0.034 ops/s -# Warmup Iteration 4: 0.034 ops/s -Iteration 1: 0.034 ops/s -Iteration 2: 0.034 ops/s -Iteration 3: 0.035 ops/s -Iteration 4: 0.034 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.034 ±(99.9%) 0.001 ops/s [Average] - (min, avg, max) = (0.034, 0.034, 0.035), stdev = 0.001 - CI (99.9%): [0.034, 0.035] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = play-json) - -# Run progress: 95.00% complete, ETA 00:06:41 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.073 ops/s -# Warmup Iteration 2: 0.081 ops/s -# Warmup Iteration 3: 0.112 ops/s -# Warmup Iteration 4: 0.130 ops/s -Iteration 1: 0.082 ops/s -Iteration 2: 0.087 ops/s -Iteration 3: 0.085 ops/s -Iteration 4: 0.079 ops/s - -# Run progress: 95.63% complete, ETA 00:05:52 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.068 ops/s -# Warmup Iteration 2: 0.078 ops/s -# Warmup Iteration 3: 0.078 ops/s -# Warmup Iteration 4: 0.073 ops/s -Iteration 1: 0.077 ops/s -Iteration 2: 0.079 ops/s -Iteration 3: 0.085 ops/s -Iteration 4: 0.079 ops/s - -# Run progress: 96.25% complete, ETA 00:05:04 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.071 ops/s -# Warmup Iteration 2: 0.077 ops/s -# Warmup Iteration 3: 0.085 ops/s -# Warmup Iteration 4: 0.072 ops/s -Iteration 1: 0.074 ops/s -Iteration 2: 0.081 ops/s -Iteration 3: 0.080 ops/s -Iteration 4: 0.079 ops/s - -# Run progress: 96.88% complete, ETA 00:04:15 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.071 ops/s -# Warmup Iteration 2: 0.104 ops/s -# Warmup Iteration 3: 0.084 ops/s -# Warmup Iteration 4: 0.076 ops/s -Iteration 1: 0.079 ops/s -Iteration 2: 0.084 ops/s -Iteration 3: 0.078 ops/s -Iteration 4: 0.085 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.081 ±(99.9%) 0.004 ops/s [Average] - (min, avg, max) = (0.074, 0.081, 0.087), stdev = 0.004 - CI (99.9%): [0.077, 0.084] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhReaderBench.bench -# Parameters: (jsonSize = 32mb, processorName = spray-json) - -# Run progress: 97.50% complete, ETA 00:03:25 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.263 ops/s -# Warmup Iteration 2: 0.390 ops/s -# Warmup Iteration 3: 0.310 ops/s -# Warmup Iteration 4: 0.403 ops/s -Iteration 1: 0.328 ops/s -Iteration 2: 0.351 ops/s -Iteration 3: 0.350 ops/s -Iteration 4: 0.354 ops/s - -# Run progress: 98.13% complete, ETA 00:02:34 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.252 ops/s -# Warmup Iteration 2: 0.381 ops/s -# Warmup Iteration 3: 0.296 ops/s -# Warmup Iteration 4: 0.379 ops/s -Iteration 1: 0.282 ops/s -Iteration 2: 0.381 ops/s -Iteration 3: 0.332 ops/s -Iteration 4: 0.381 ops/s - -# Run progress: 98.75% complete, ETA 00:01:42 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.263 ops/s -# Warmup Iteration 2: 0.380 ops/s -# Warmup Iteration 3: 0.319 ops/s -# Warmup Iteration 4: 0.375 ops/s -Iteration 1: 0.291 ops/s -Iteration 2: 0.379 ops/s -Iteration 3: 0.328 ops/s -Iteration 4: 0.377 ops/s - -# Run progress: 99.38% complete, ETA 00:00:51 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.264 ops/s -# Warmup Iteration 2: 0.385 ops/s -# Warmup Iteration 3: 0.299 ops/s -# Warmup Iteration 4: 0.377 ops/s -Iteration 1: 0.286 ops/s -Iteration 2: 0.379 ops/s -Iteration 3: 0.331 ops/s -Iteration 4: 0.388 ops/s - - -Result "json.bench.JmhReaderBench.bench": - 0.345 ±(99.9%) 0.036 ops/s [Average] - (min, avg, max) = (0.282, 0.345, 0.388), stdev = 0.036 - CI (99.9%): [0.309, 0.381] (assumes normal distribution) - - -# Run complete. Total time: 02:17:04 - -REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on -why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial -experiments, perform baseline and negative tests that provide experimental control, make sure -the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. -Do not assume the numbers tell you what you want them to tell. - -Benchmark (jsonSize) (processorName) Mode Cnt Score Error Units -JmhReaderBench.bench 128b tethys-jackson thrpt 16 658951.389 ± 10409.795 ops/s -JmhReaderBench.bench 128b pure-jackson thrpt 16 605937.562 ± 5578.447 ops/s -JmhReaderBench.bench 128b circe-jawn thrpt 16 500633.274 ± 2620.895 ops/s -JmhReaderBench.bench 128b circe-jackson thrpt 16 176264.381 ± 3700.649 ops/s -JmhReaderBench.bench 128b json4s-jackson thrpt 16 81864.174 ± 1224.992 ops/s -JmhReaderBench.bench 128b json4s-native thrpt 16 77152.505 ± 2504.261 ops/s -JmhReaderBench.bench 128b play-json thrpt 16 214148.365 ± 1853.803 ops/s -JmhReaderBench.bench 128b spray-json thrpt 16 351719.553 ± 1143.099 ops/s -JmhReaderBench.bench 1kb tethys-jackson thrpt 16 94736.726 ± 1854.179 ops/s -JmhReaderBench.bench 1kb pure-jackson thrpt 16 105919.836 ± 1401.072 ops/s -JmhReaderBench.bench 1kb circe-jawn thrpt 16 66962.275 ± 291.910 ops/s -JmhReaderBench.bench 1kb circe-jackson thrpt 16 25799.317 ± 162.343 ops/s -JmhReaderBench.bench 1kb json4s-jackson thrpt 16 12649.038 ± 323.720 ops/s -JmhReaderBench.bench 1kb json4s-native thrpt 16 11726.397 ± 136.414 ops/s -JmhReaderBench.bench 1kb play-json thrpt 16 28851.521 ± 685.392 ops/s -JmhReaderBench.bench 1kb spray-json thrpt 16 47149.179 ± 666.593 ops/s -JmhReaderBench.bench 128kb tethys-jackson thrpt 16 733.012 ± 5.142 ops/s -JmhReaderBench.bench 128kb pure-jackson thrpt 16 868.511 ± 12.146 ops/s -JmhReaderBench.bench 128kb circe-jawn thrpt 16 498.646 ± 3.766 ops/s -JmhReaderBench.bench 128kb circe-jackson thrpt 16 151.520 ± 1.160 ops/s -JmhReaderBench.bench 128kb json4s-jackson thrpt 16 89.053 ± 3.779 ops/s -JmhReaderBench.bench 128kb json4s-native thrpt 16 80.094 ± 4.873 ops/s -JmhReaderBench.bench 128kb play-json thrpt 16 186.734 ± 1.545 ops/s -JmhReaderBench.bench 128kb spray-json thrpt 16 347.749 ± 2.047 ops/s -JmhReaderBench.bench 1mb tethys-jackson thrpt 16 75.496 ± 1.082 ops/s -JmhReaderBench.bench 1mb pure-jackson thrpt 16 95.066 ± 0.501 ops/s -JmhReaderBench.bench 1mb circe-jawn thrpt 16 51.116 ± 0.495 ops/s -JmhReaderBench.bench 1mb circe-jackson thrpt 16 16.372 ± 0.536 ops/s -JmhReaderBench.bench 1mb json4s-jackson thrpt 16 10.534 ± 0.319 ops/s -JmhReaderBench.bench 1mb json4s-native thrpt 16 9.209 ± 0.086 ops/s -JmhReaderBench.bench 1mb play-json thrpt 16 17.297 ± 0.185 ops/s -JmhReaderBench.bench 1mb spray-json thrpt 16 36.300 ± 0.469 ops/s -JmhReaderBench.bench 32mb tethys-jackson thrpt 16 2.074 ± 0.040 ops/s -JmhReaderBench.bench 32mb pure-jackson thrpt 16 1.929 ± 0.058 ops/s -JmhReaderBench.bench 32mb circe-jawn thrpt 16 0.237 ± 0.012 ops/s -JmhReaderBench.bench 32mb circe-jackson thrpt 16 0.089 ± 0.016 ops/s -JmhReaderBench.bench 32mb json4s-jackson thrpt 16 0.067 ± 0.003 ops/s -JmhReaderBench.bench 32mb json4s-native thrpt 16 0.034 ± 0.001 ops/s -JmhReaderBench.bench 32mb play-json thrpt 16 0.081 ± 0.004 ops/s -JmhReaderBench.bench 32mb spray-json thrpt 16 0.345 ± 0.036 ops/s - -Benchmark result is saved to /home/alex/projects/tethys/./modules/benchmarks/jmh-reader.json diff --git a/modules/benchmarks/jmh-writer.json b/modules/benchmarks/jmh-writer.json index bed23703..5227eab3 100644 --- a/modules/benchmarks/jmh-writer.json +++ b/modules/benchmarks/jmh-writer.json @@ -1,18 +1,18 @@ [ { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -24,49 +24,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 933624.5856830316, - "scoreError" : 5048.702787879248, + "score" : 1819887.866280839, + "scoreError" : 204446.28818611056, "scoreConfidence" : [ - 928575.8828951523, - 938673.2884709109 + 1615441.5780947285, + 2024334.1544669496 ], "scorePercentiles" : { - "0.0" : 923665.4311157817, - "50.0" : 933202.256295131, - "90.0" : 939739.5995091328, - "95.0" : 939861.0544486333, - "99.0" : 939861.0544486333, - "99.9" : 939861.0544486333, - "99.99" : 939861.0544486333, - "99.999" : 939861.0544486333, - "99.9999" : 939861.0544486333, - "100.0" : 939861.0544486333 + "0.0" : 1787500.8132402124, + "50.0" : 1822320.2268073645, + "90.0" : 1847410.1982684152, + "95.0" : 1847410.1982684152, + "99.0" : 1847410.1982684152, + "99.9" : 1847410.1982684152, + "99.99" : 1847410.1982684152, + "99.999" : 1847410.1982684152, + "99.9999" : 1847410.1982684152, + "100.0" : 1847410.1982684152 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 934391.0074771836, - 936312.5206221929, - 937556.2787830083, - 938562.1772575043 - ], - [ - 923665.4311157817, - 928321.3373049224, - 928989.5479745104, - 928280.2030467377 - ], - [ - 931865.0227157315, - 932013.5051130784, - 929978.6035743216, - 931718.1570933271 - ], - [ - 939687.547392204, - 939861.0544486333, - 938392.3488985095, - 938398.6281108573 + 1847410.1982684152, + 1846658.5849204224, + 1797981.8686943066, + 1787500.8132402124 ] ] }, @@ -74,19 +56,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -98,49 +80,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 563304.4409868319, - "scoreError" : 3482.829432485619, + "score" : 1109155.6927294005, + "scoreError" : 11722.369381590592, "scoreConfidence" : [ - 559821.6115543463, - 566787.2704193175 + 1097433.32334781, + 1120878.062110991 ], "scorePercentiles" : { - "0.0" : 557345.4189331543, - "50.0" : 563841.1421941028, - "90.0" : 568053.4498168938, - "95.0" : 568067.1843862887, - "99.0" : 568067.1843862887, - "99.9" : 568067.1843862887, - "99.99" : 568067.1843862887, - "99.999" : 568067.1843862887, - "99.9999" : 568067.1843862887, - "100.0" : 568067.1843862887 + "0.0" : 1107159.6211813919, + "50.0" : 1109266.9122699166, + "90.0" : 1110929.3251963765, + "95.0" : 1110929.3251963765, + "99.0" : 1110929.3251963765, + "99.9" : 1110929.3251963765, + "99.99" : 1110929.3251963765, + "99.999" : 1110929.3251963765, + "99.9999" : 1110929.3251963765, + "100.0" : 1110929.3251963765 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 568067.1843862887, - 565062.1566512353, - 567110.0190987127, - 568047.5635728674 - ], - [ - 564294.1524486572, - 565781.9765689089, - 565069.1231991659, - 563388.1319395482 - ], - [ - 561833.8007101894, - 564997.9072332017, - 562663.9891711226, - 562704.9779932862 - ], - [ - 557925.092861156, - 557345.4189331543, - 559419.7401334428, - 559159.8208883748 + 1107159.6211813919, + 1110432.569796542, + 1110929.3251963765, + 1108101.2547432913 ] ] }, @@ -148,19 +112,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -172,271 +136,31 @@ "processorName" : "circe" }, "primaryMetric" : { - "score" : 621310.9624874144, - "scoreError" : 16389.223607509342, - "scoreConfidence" : [ - 604921.738879905, - 637700.1860949238 - ], - "scorePercentiles" : { - "0.0" : 600073.0025338108, - "50.0" : 620618.174459741, - "90.0" : 641837.1690381359, - "95.0" : 642197.9504262727, - "99.0" : 642197.9504262727, - "99.9" : 642197.9504262727, - "99.99" : 642197.9504262727, - "99.999" : 642197.9504262727, - "99.9999" : 642197.9504262727, - "100.0" : 642197.9504262727 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 601479.9819137418, - 601040.4271019758, - 600073.0025338108, - 601962.802348393 - ], - [ - 611485.5980069543, - 613991.5534947357, - 612260.6042473968, - 613350.6186929503 - ], - [ - 641608.2252389534, - 640244.4862810893, - 641682.5484432202, - 642197.9504262727 - ], - [ - 635604.2118326549, - 627244.7954247462, - 628848.5343658671, - 627900.0594458666 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "128b", - "processorName" : "java.lang.StringBuilder" - }, - "primaryMetric" : { - "score" : 1365829.787572255, - "scoreError" : 7485.739891380353, - "scoreConfidence" : [ - 1358344.0476808746, - 1373315.5274636352 - ], - "scorePercentiles" : { - "0.0" : 1354793.45261631, - "50.0" : 1366403.8597581836, - "90.0" : 1376175.720744112, - "95.0" : 1376264.2316097682, - "99.0" : 1376264.2316097682, - "99.9" : 1376264.2316097682, - "99.99" : 1376264.2316097682, - "99.999" : 1376264.2316097682, - "99.9999" : 1376264.2316097682, - "100.0" : 1376264.2316097682 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 1369797.065152551, - 1371596.5052932333, - 1370143.7125401685, - 1372256.8460958274 - ], - [ - 1376137.7875159737, - 1373501.7964181728, - 1370039.0903762963, - 1376264.2316097682 - ], - [ - 1354793.45261631, - 1358675.6887370807, - 1356390.9655028225, - 1361343.3971401101 - ], - [ - 1361750.3562794721, - 1357341.9869219726, - 1360233.0645924993, - 1363010.6543638161 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "128b", - "processorName" : "scala.StringBuilder" - }, - "primaryMetric" : { - "score" : 1288411.4863045835, - "scoreError" : 8471.962758043903, - "scoreConfidence" : [ - 1279939.5235465395, - 1296883.4490626275 - ], - "scorePercentiles" : { - "0.0" : 1270587.3072899063, - "50.0" : 1290379.0521812285, - "90.0" : 1297757.458962184, - "95.0" : 1298043.523540003, - "99.0" : 1298043.523540003, - "99.9" : 1298043.523540003, - "99.99" : 1298043.523540003, - "99.999" : 1298043.523540003, - "99.9999" : 1298043.523540003, - "100.0" : 1298043.523540003 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 1278777.2392350559, - 1280142.00483564, - 1276548.9785387444, - 1270587.3072899063 - ], - [ - 1293059.0025309795, - 1294255.0639050724, - 1296405.130475639, - 1292365.2707913732 - ], - [ - 1295617.146385506, - 1298043.523540003, - 1294242.5663851115, - 1297634.8598574044 - ], - [ - 1285312.4467745633, - 1288392.8335710838, - 1285249.4460534567, - 1287950.960703797 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "128b", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 185964.9672268775, - "scoreError" : 1618.8648059900495, + "score" : 1348593.2665467546, + "scoreError" : 16725.42285120894, "scoreConfidence" : [ - 184346.10242088744, - 187583.83203286753 + 1331867.8436955458, + 1365318.6893979635 ], "scorePercentiles" : { - "0.0" : 182851.135806947, - "50.0" : 186242.88032337266, - "90.0" : 187751.85029656874, - "95.0" : 187818.51371936974, - "99.0" : 187818.51371936974, - "99.9" : 187818.51371936974, - "99.99" : 187818.51371936974, - "99.999" : 187818.51371936974, - "99.9999" : 187818.51371936974, - "100.0" : 187818.51371936974 + "0.0" : 1344915.614381369, + "50.0" : 1349258.9734497662, + "90.0" : 1350939.5049061175, + "95.0" : 1350939.5049061175, + "99.0" : 1350939.5049061175, + "99.9" : 1350939.5049061175, + "99.99" : 1350939.5049061175, + "99.999" : 1350939.5049061175, + "99.9999" : 1350939.5049061175, + "100.0" : 1350939.5049061175 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 186480.3452637613, - 187337.47415737898, - 187590.9877748935, - 186346.48254153703 - ], - [ - 185867.58057163964, - 185841.2464062758, - 186139.27810520833, - 185059.02721827457 - ], - [ - 183926.34916022836, - 182851.135806947, - 184227.7026085086, - 183679.53581797527 - ], - [ - 187818.51371936974, - 187117.6941366971, - 187723.28025822545, - 187432.84208311935 + 1348957.93100329, + 1349560.0158962426, + 1350939.5049061175, + 1344915.614381369 ] ] }, @@ -444,19 +168,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -465,52 +189,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "json4s-native" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 197545.06501014042, - "scoreError" : 1248.965753185505, + "score" : 327191.60334054136, + "scoreError" : 16833.393674908828, "scoreConfidence" : [ - 196296.0992569549, - 198794.03076332592 + 310358.2096656325, + 344024.9970154502 ], "scorePercentiles" : { - "0.0" : 195382.45053921008, - "50.0" : 197612.49851872353, - "90.0" : 199417.708453266, - "95.0" : 199683.72029220473, - "99.0" : 199683.72029220473, - "99.9" : 199683.72029220473, - "99.99" : 199683.72029220473, - "99.999" : 199683.72029220473, - "99.9999" : 199683.72029220473, - "100.0" : 199683.72029220473 + "0.0" : 323284.24612123315, + "50.0" : 328479.9201514422, + "90.0" : 328522.32693804795, + "95.0" : 328522.32693804795, + "99.0" : 328522.32693804795, + "99.9" : 328522.32693804795, + "99.99" : 328522.32693804795, + "99.999" : 328522.32693804795, + "99.9999" : 328522.32693804795, + "100.0" : 328522.32693804795 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 197708.55415741744, - 198206.40272073008, - 198354.97493060795, - 198037.49570623683 - ], - [ - 197516.44288002964, - 197001.34283063875, - 196789.06525508995, - 196856.8670621516 - ], - [ - 198119.0643366069, - 199012.40330105473, - 199303.70337943512, - 199683.72029220473 - ], - [ - 196246.04814607647, - 195382.45053921008, - 196298.68334613796, - 196203.82127861888 + 323284.24612123315, + 328473.80463527696, + 328486.03566760744, + 328522.32693804795 ] ] }, @@ -518,19 +224,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -539,52 +245,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "play-json" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 197279.4340595046, - "scoreError" : 1479.2261766481695, + "score" : 1172370.1949547157, + "scoreError" : 44623.57635400855, "scoreConfidence" : [ - 195800.20788285643, - 198758.66023615276 + 1127746.618600707, + 1216993.7713087243 ], "scorePercentiles" : { - "0.0" : 193868.36854501316, - "50.0" : 197851.3185611014, - "90.0" : 198710.33715178136, - "95.0" : 198902.51130861556, - "99.0" : 198902.51130861556, - "99.9" : 198902.51130861556, - "99.99" : 198902.51130861556, - "99.999" : 198902.51130861556, - "99.9999" : 198902.51130861556, - "100.0" : 198902.51130861556 + "0.0" : 1164002.9183628866, + "50.0" : 1172433.802146774, + "90.0" : 1180610.257162428, + "95.0" : 1180610.257162428, + "99.0" : 1180610.257162428, + "99.9" : 1180610.257162428, + "99.99" : 1180610.257162428, + "99.999" : 1180610.257162428, + "99.9999" : 1180610.257162428, + "100.0" : 1180610.257162428 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 196217.9949937294, - 193868.36854501316, - 195775.64220360373, - 194796.6236098545 - ], - [ - 197769.24342004198, - 197605.63771746727, - 198627.97679885244, - 198133.6240046731 - ], - [ - 196814.43866480672, - 198004.31790237414, - 197933.39370216077, - 196916.3959169053 - ], - [ - 198497.3137386389, - 198130.6414102984, - 198902.51130861556, - 198476.8210150381 + 1180610.257162428, + 1164002.9183628866, + 1174037.1951503523, + 1170830.4091431957 ] ] }, @@ -592,19 +280,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -613,52 +301,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128b", - "processorName" : "spray-json" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 409063.53667942266, - "scoreError" : 5338.225418306701, + "score" : 2191564.9811769784, + "scoreError" : 20901.204115111937, "scoreConfidence" : [ - 403725.31126111594, - 414401.76209772937 + 2170663.7770618666, + 2212466.1852920903 ], "scorePercentiles" : { - "0.0" : 404618.26201463316, - "50.0" : 406367.85996358696, - "90.0" : 418251.4009889962, - "95.0" : 418478.7380315492, - "99.0" : 418478.7380315492, - "99.9" : 418478.7380315492, - "99.99" : 418478.7380315492, - "99.999" : 418478.7380315492, - "99.9999" : 418478.7380315492, - "100.0" : 418478.7380315492 + "0.0" : 2187130.045963812, + "50.0" : 2192139.318299738, + "90.0" : 2194851.2421446256, + "95.0" : 2194851.2421446256, + "99.0" : 2194851.2421446256, + "99.9" : 2194851.2421446256, + "99.99" : 2194851.2421446256, + "99.999" : 2194851.2421446256, + "99.9999" : 2194851.2421446256, + "100.0" : 2194851.2421446256 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 417654.2542801621, - 416574.38624464534, - 418478.7380315492, - 418153.9708279021 - ], - [ - 406139.90245413734, - 406504.48714251694, - 406035.2333814256, - 405954.68644884333 - ], - [ - 407812.3803913964, - 407893.60217851814, - 406176.8504454553, - 406532.6872100536 - ], - [ - 404652.14655566425, - 404618.26201463316, - 406231.232784657, - 405603.76647920435 + 2187130.045963812, + 2192498.331993979, + 2194851.2421446256, + 2191780.3046054975 ] ] }, @@ -666,19 +336,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -690,49 +360,31 @@ "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 220229.69392304972, - "scoreError" : 5928.675734798157, + "score" : 403267.4027522539, + "scoreError" : 43515.31402068551, "scoreConfidence" : [ - 214301.01818825156, - 226158.36965784788 + 359752.0887315684, + 446782.7167729394 ], "scorePercentiles" : { - "0.0" : 213713.7722097068, - "50.0" : 219618.82212542673, - "90.0" : 227913.03534933858, - "95.0" : 228053.87784153683, - "99.0" : 228053.87784153683, - "99.9" : 228053.87784153683, - "99.99" : 228053.87784153683, - "99.999" : 228053.87784153683, - "99.9999" : 228053.87784153683, - "100.0" : 228053.87784153683 + "0.0" : 397328.9014945461, + "50.0" : 402949.1987281769, + "90.0" : 409842.3120581157, + "95.0" : 409842.3120581157, + "99.0" : 409842.3120581157, + "99.9" : 409842.3120581157, + "99.99" : 409842.3120581157, + "99.999" : 409842.3120581157, + "99.9999" : 409842.3120581157, + "100.0" : 409842.3120581157 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 214266.8257594763, - 214315.62102346716, - 213878.80706919514, - 213713.7722097068 - ], - [ - 214972.92304951695, - 215774.90031881005, - 215473.4904215579, - 216096.13094016255 - ], - [ - 223862.29505420278, - 223884.54654639968, - 223657.2811003, - 223141.51331069088 - ], - [ - 227852.67428125362, - 227607.07215589136, - 227123.3716866276, - 228053.87784153683 + 397594.5620112011, + 397328.9014945461, + 408303.8354451526, + 409842.3120581157 ] ] }, @@ -740,19 +392,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -764,49 +416,31 @@ "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 179625.30577187473, - "scoreError" : 426.5065931856132, + "score" : 427421.9247585598, + "scoreError" : 24518.728600886658, "scoreConfidence" : [ - 179198.7991786891, - 180051.81236506035 + 402903.19615767314, + 451940.65335944644 ], "scorePercentiles" : { - "0.0" : 178806.41811848036, - "50.0" : 179686.37136839028, - "90.0" : 180162.30859443996, - "95.0" : 180180.8147225908, - "99.0" : 180180.8147225908, - "99.9" : 180180.8147225908, - "99.99" : 180180.8147225908, - "99.999" : 180180.8147225908, - "99.9999" : 180180.8147225908, - "100.0" : 180180.8147225908 + "0.0" : 421863.8499176919, + "50.0" : 428821.3012850069, + "90.0" : 430181.24654653337, + "95.0" : 430181.24654653337, + "99.0" : 430181.24654653337, + "99.9" : 430181.24654653337, + "99.99" : 430181.24654653337, + "99.999" : 430181.24654653337, + "99.9999" : 430181.24654653337, + "100.0" : 430181.24654653337 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 179578.21174154445, - 180036.04400787034, - 179466.3782569789, - 179631.43933738666 - ], - [ - 179880.42672876257, - 179803.00371130084, - 179482.19758585267, - 179741.30339939386 - ], - [ - 180154.37739666103, - 180180.8147225908, - 179924.64501921588, - 179902.6461174701 - ], - [ - 178814.87683761018, - 178806.41811848036, - 179380.0874156904, - 179222.02195318614 + 428201.79164324555, + 430181.24654653337, + 429440.8109267683, + 421863.8499176919 ] ] }, @@ -814,19 +448,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -838,49 +472,31 @@ "processorName" : "circe" }, "primaryMetric" : { - "score" : 86294.0799484006, - "scoreError" : 602.7776783075554, + "score" : 177497.0107319799, + "scoreError" : 14364.31626843296, "scoreConfidence" : [ - 85691.30227009305, - 86896.85762670815 + 163132.69446354694, + 191861.3270004129 ], "scorePercentiles" : { - "0.0" : 85120.90811946317, - "50.0" : 86544.68215985066, - "90.0" : 86790.57747569929, - "95.0" : 86804.03731213199, - "99.0" : 86804.03731213199, - "99.9" : 86804.03731213199, - "99.99" : 86804.03731213199, - "99.999" : 86804.03731213199, - "99.9999" : 86804.03731213199, - "100.0" : 86804.03731213199 + "0.0" : 174194.40738251232, + "50.0" : 178388.27788455077, + "90.0" : 179017.07977630582, + "95.0" : 179017.07977630582, + "99.0" : 179017.07977630582, + "99.9" : 179017.07977630582, + "99.99" : 179017.07977630582, + "99.999" : 179017.07977630582, + "99.9999" : 179017.07977630582, + "100.0" : 179017.07977630582 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 85581.44758851755, - 85445.54362244045, - 85213.7105666595, - 85120.90811946317 - ], - [ - 86804.03731213199, - 86440.18361653111, - 86548.53747272231, - 86749.14724609483 - ], - [ - 86342.10262944819, - 86784.80897437099, - 86540.82684697903, - 86706.09243257881 - ], - [ - 86670.41547087657, - 86698.22869940719, - 86675.88930746695, - 86383.39926872081 + 179017.07977630582, + 178481.170435525, + 174194.40738251232, + 178295.38533357653 ] ] }, @@ -888,19 +504,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -909,52 +525,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "java.lang.StringBuilder" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 197955.2721253776, - "scoreError" : 18303.810572725924, + "score" : 47736.65476696285, + "scoreError" : 1345.094348191517, "scoreConfidence" : [ - 179651.4615526517, - 216259.08269810354 + 46391.56041877133, + 49081.749115154365 ], "scorePercentiles" : { - "0.0" : 179703.76966543982, - "50.0" : 197933.1443169925, - "90.0" : 216605.9100460481, - "95.0" : 216772.74801381998, - "99.0" : 216772.74801381998, - "99.9" : 216772.74801381998, - "99.99" : 216772.74801381998, - "99.999" : 216772.74801381998, - "99.9999" : 216772.74801381998, - "100.0" : 216772.74801381998 + "0.0" : 47555.57243850504, + "50.0" : 47686.14025700826, + "90.0" : 48018.76611532986, + "95.0" : 48018.76611532986, + "99.0" : 48018.76611532986, + "99.9" : 48018.76611532986, + "99.99" : 48018.76611532986, + "99.999" : 48018.76611532986, + "99.9999" : 48018.76611532986, + "100.0" : 48018.76611532986 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 216534.40805986017, - 214989.68609992866, - 216772.74801381998, - 215752.22902986326 - ], - [ - 180130.36668750303, - 180182.74077398502, - 179703.76966543982, - 179809.82241705642 - ], - [ - 214775.10607552616, - 213976.3086581423, - 214933.91050994454, - 215007.13288499284 - ], - [ - 181071.0334418615, - 181221.41219872877, - 180533.69951354625, - 181889.97997584267 + 48018.76611532986, + 47607.06985357856, + 47765.210660437944, + 47555.57243850504 ] ] }, @@ -962,19 +560,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -983,52 +581,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "scala.StringBuilder" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 196492.3246322904, - "scoreError" : 12187.468041451428, + "score" : 148580.55389673484, + "scoreError" : 7903.956542352092, "scoreConfidence" : [ - 184304.856590839, - 208679.79267374182 + 140676.59735438274, + 156484.51043908694 ], "scorePercentiles" : { - "0.0" : 188695.35689373504, - "50.0" : 190178.7137637199, - "90.0" : 216692.98865595393, - "95.0" : 217199.60141181303, - "99.0" : 217199.60141181303, - "99.9" : 217199.60141181303, - "99.99" : 217199.60141181303, - "99.999" : 217199.60141181303, - "99.9999" : 217199.60141181303, - "100.0" : 217199.60141181303 + "0.0" : 147110.3341399147, + "50.0" : 148799.92883293395, + "90.0" : 149612.0237811568, + "95.0" : 149612.0237811568, + "99.0" : 149612.0237811568, + "99.9" : 149612.0237811568, + "99.99" : 149612.0237811568, + "99.999" : 149612.0237811568, + "99.9999" : 149612.0237811568, + "100.0" : 149612.0237811568 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 190040.62040488273, - 189941.38160840553, - 189737.01805077115, - 188728.22131653724 - ], - [ - 190689.473814169, - 190790.63270282012, - 190652.9240565499, - 190316.80712255707 - ], - [ - 189969.69380441296, - 188744.9172126264, - 188695.35689373504, - 189438.99403582298 - ], - [ - 216475.86890344287, - 216321.40614224927, - 217199.60141181303, - 216134.27663585104 + 148036.21042685886, + 147110.3341399147, + 149563.64723900906, + 149612.0237811568 ] ] }, @@ -1036,19 +616,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1057,52 +637,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "1kb", - "processorName" : "json4s-jackson" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 24597.713749937204, - "scoreError" : 42.6817830430244, + "score" : 266636.44019146083, + "scoreError" : 3831.5862190856205, "scoreConfidence" : [ - 24555.03196689418, - 24640.395532980227 + 262804.8539723752, + 270468.02641054644 ], "scorePercentiles" : { - "0.0" : 24505.14269738479, - "50.0" : 24602.6854666611, - "90.0" : 24649.30065761709, - "95.0" : 24654.525358498995, - "99.0" : 24654.525358498995, - "99.9" : 24654.525358498995, - "99.99" : 24654.525358498995, - "99.999" : 24654.525358498995, - "99.9999" : 24654.525358498995, - "100.0" : 24654.525358498995 + "0.0" : 266038.3930441509, + "50.0" : 266528.46815931366, + "90.0" : 267450.43140306504, + "95.0" : 267450.43140306504, + "99.0" : 267450.43140306504, + "99.9" : 267450.43140306504, + "99.99" : 267450.43140306504, + "99.999" : 267450.43140306504, + "99.9999" : 267450.43140306504, + "100.0" : 267450.43140306504 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 24555.414289525117, - 24600.643987769356, - 24579.659483682804, - 24554.091420044366 - ], - [ - 24610.03885493252, - 24577.608812363676, - 24604.726945552844, - 24558.405109538926 - ], - [ - 24654.525358498995, - 24645.5854573975, - 24647.06150009627, - 24635.554540321544 - ], - [ - 24606.569857995328, - 24505.14269738479, - 24642.512026793123, - 24585.879657098092 + 267450.43140306504, + 266453.6905350327, + 266603.24578359467, + 266038.3930441509 ] ] }, @@ -1110,19 +672,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1130,53 +692,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1kb", - "processorName" : "json4s-native" + "jsonSize" : "128kb", + "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 25536.41443446626, - "scoreError" : 139.52230205690216, + "score" : 3265.018485513807, + "scoreError" : 211.52248659255656, "scoreConfidence" : [ - 25396.892132409357, - 25675.936736523163 + 3053.4959989212502, + 3476.5409721063634 ], "scorePercentiles" : { - "0.0" : 25385.562720521677, - "50.0" : 25509.43274899979, - "90.0" : 25768.018081894166, - "95.0" : 25798.53389162019, - "99.0" : 25798.53389162019, - "99.9" : 25798.53389162019, - "99.99" : 25798.53389162019, - "99.999" : 25798.53389162019, - "99.9999" : 25798.53389162019, - "100.0" : 25798.53389162019 + "0.0" : 3220.6314731712628, + "50.0" : 3274.0272158278585, + "90.0" : 3291.388037228249, + "95.0" : 3291.388037228249, + "99.0" : 3291.388037228249, + "99.9" : 3291.388037228249, + "99.99" : 3291.388037228249, + "99.999" : 3291.388037228249, + "99.9999" : 3291.388037228249, + "100.0" : 3291.388037228249 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 25798.53389162019, - 25718.60249185533, - 25754.93987772587, - 25716.270921399733 - ], - [ - 25385.562720521677, - 25434.338679487362, - 25396.677271516877, - 25406.420724100983 - ], - [ - 25440.56753883711, - 25546.990574260042, - 25473.643967720684, - 25417.016581464715 - ], - [ - 25485.946490943585, - 25532.919007055996, - 25537.59774147447, - 25536.602471475533 + 3260.1250600835074, + 3220.6314731712628, + 3291.388037228249, + 3287.929371572209 ] ] }, @@ -1184,19 +728,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1204,53 +748,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1kb", - "processorName" : "play-json" + "jsonSize" : "128kb", + "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 27718.52583083225, - "scoreError" : 1235.3697102708227, + "score" : 3096.090303694719, + "scoreError" : 114.1578488303212, "scoreConfidence" : [ - 26483.15612056143, - 28953.895541103073 + 2981.9324548643976, + 3210.24815252504 ], "scorePercentiles" : { - "0.0" : 25663.184747344858, - "50.0" : 28316.031789287452, - "90.0" : 28580.478890078248, - "95.0" : 28585.115130610062, - "99.0" : 28585.115130610062, - "99.9" : 28585.115130610062, - "99.99" : 28585.115130610062, - "99.999" : 28585.115130610062, - "99.9999" : 28585.115130610062, - "100.0" : 28585.115130610062 + "0.0" : 3075.4612594160444, + "50.0" : 3098.1337498176445, + "90.0" : 3112.6324557275416, + "95.0" : 3112.6324557275416, + "99.0" : 3112.6324557275416, + "99.9" : 3112.6324557275416, + "99.99" : 3112.6324557275416, + "99.999" : 3112.6324557275416, + "99.9999" : 3112.6324557275416, + "100.0" : 3112.6324557275416 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 28574.511191110672, - 28585.115130610062, - 28578.491929850326, - 28556.072596873953 - ], - [ - 28333.425415882968, - 28364.12688296916, - 28417.0881581586, - 28147.88283304866 - ], - [ - 28323.833953074285, - 28262.810524656095, - 28264.51977501936, - 28308.22962550062 - ], - [ - 25671.441798032025, - 25737.38933915303, - 25708.289392031256, - 25663.184747344858 + 3108.8275968787652, + 3075.4612594160444, + 3087.439902756524, + 3112.6324557275416 ] ] }, @@ -1258,19 +784,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1278,53 +804,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1kb", - "processorName" : "spray-json" + "jsonSize" : "128kb", + "processorName" : "circe" }, "primaryMetric" : { - "score" : 54303.17624465435, - "scoreError" : 650.6387644192305, + "score" : 1255.0932751513285, + "scoreError" : 46.22591384242437, "scoreConfidence" : [ - 53652.53748023512, - 54953.81500907358 + 1208.867361308904, + 1301.319188993753 ], "scorePercentiles" : { - "0.0" : 53056.96909598906, - "50.0" : 54564.21057446329, - "90.0" : 54997.24173924413, - "95.0" : 55045.66105252169, - "99.0" : 55045.66105252169, - "99.9" : 55045.66105252169, - "99.99" : 55045.66105252169, - "99.999" : 55045.66105252169, - "99.9999" : 55045.66105252169, - "100.0" : 55045.66105252169 + "0.0" : 1244.6630457421552, + "50.0" : 1257.3824405600344, + "90.0" : 1260.9451737430902, + "95.0" : 1260.9451737430902, + "99.0" : 1260.9451737430902, + "99.9" : 1260.9451737430902, + "99.99" : 1260.9451737430902, + "99.999" : 1260.9451737430902, + "99.9999" : 1260.9451737430902, + "100.0" : 1260.9451737430902 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 54946.71748755316, - 54799.9753321613, - 55045.66105252169, - 54976.49060498232 - ], - [ - 53056.96909598906, - 54549.541127072094, - 54578.88002185449, - 54674.41153338684 - ], - [ - 53587.67833500353, - 53437.369807622184, - 53525.544961585765, - 53618.466533304534 - ], - [ - 54741.8904884049, - 54448.86121761908, - 54272.46586064276, - 54589.89645476597 + 1257.4225286709386, + 1257.34235244913, + 1260.9451737430902, + 1244.6630457421552 ] ] }, @@ -1332,19 +840,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1353,52 +861,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "tethys-jackson" + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 1641.102361148265, - "scoreError" : 4.017851551447623, + "score" : 360.73397668574137, + "scoreError" : 2.9849183809715094, "scoreConfidence" : [ - 1637.0845095968173, - 1645.1202126997125 + 357.74905830476985, + 363.7188950667129 ], "scorePercentiles" : { - "0.0" : 1635.0883656499059, - "50.0" : 1640.8450731715377, - "90.0" : 1646.1394627854856, - "95.0" : 1646.4181175562846, - "99.0" : 1646.4181175562846, - "99.9" : 1646.4181175562846, - "99.99" : 1646.4181175562846, - "99.999" : 1646.4181175562846, - "99.9999" : 1646.4181175562846, - "100.0" : 1646.4181175562846 + "0.0" : 360.1643871524679, + "50.0" : 360.74936066459566, + "90.0" : 361.27279826130626, + "95.0" : 361.27279826130626, + "99.0" : 361.27279826130626, + "99.9" : 361.27279826130626, + "99.99" : 361.27279826130626, + "99.999" : 361.27279826130626, + "99.9999" : 361.27279826130626, + "100.0" : 361.27279826130626 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 1635.964212731526, - 1638.2218325634447, - 1636.7400774919938, - 1636.2654868686147 - ], - [ - 1644.916799450317, - 1645.2645878143117, - 1644.6127970145415, - 1643.4557032744879 - ], - [ - 1640.3763363269181, - 1639.0059551347608, - 1635.0883656499059, - 1646.4181175562846 - ], - [ - 1641.3138100161573, - 1644.3923553419645, - 1646.020039312286, - 1639.581301824726 + 360.86088286252544, + 361.27279826130626, + 360.6378384666658, + 360.1643871524679 ] ] }, @@ -1406,19 +896,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1427,52 +917,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "pure-jackson" + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 1876.3640631063897, - "scoreError" : 12.736625908379718, + "score" : 1053.7816934132636, + "scoreError" : 17.98846836879526, "scoreConfidence" : [ - 1863.62743719801, - 1889.1006890147694 + 1035.7932250444683, + 1071.770161782059 ], "scorePercentiles" : { - "0.0" : 1863.220818153004, - "50.0" : 1872.0572104212474, - "90.0" : 1898.496711064786, - "95.0" : 1899.3094633366397, - "99.0" : 1899.3094633366397, - "99.9" : 1899.3094633366397, - "99.99" : 1899.3094633366397, - "99.999" : 1899.3094633366397, - "99.9999" : 1899.3094633366397, - "100.0" : 1899.3094633366397 + "0.0" : 1051.7004653852352, + "50.0" : 1052.8498041712742, + "90.0" : 1057.726699925271, + "95.0" : 1057.726699925271, + "99.0" : 1057.726699925271, + "99.9" : 1057.726699925271, + "99.99" : 1057.726699925271, + "99.999" : 1057.726699925271, + "99.9999" : 1057.726699925271, + "100.0" : 1057.726699925271 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 1869.4158016005872, - 1863.220818153004, - 1872.9322537928615, - 1872.1759061605603 - ], - [ - 1868.4285309505433, - 1864.628140207722, - 1869.3242250732123, - 1863.9240477045496 - ], - [ - 1894.9837122440356, - 1899.3094633366397, - 1898.1483886625629, - 1893.4226752861914 - ], - [ - 1874.8293980240974, - 1873.6557161437293, - 1871.4874176800097, - 1871.9385146819345 + 1057.726699925271, + 1053.7487275819278, + 1051.9508807606203, + 1051.7004653852352 ] ] }, @@ -1480,19 +952,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1501,52 +973,34 @@ "measurementBatchSize" : 1, "params" : { "jsonSize" : "128kb", - "processorName" : "circe" + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 616.2215032452009, - "scoreError" : 9.041039309859105, + "score" : 2092.4795061467858, + "scoreError" : 3.4526544775530565, "scoreConfidence" : [ - 607.1804639353418, - 625.26254255506 + 2089.0268516692327, + 2095.932160624339 ], "scorePercentiles" : { - "0.0" : 605.7208786793759, - "50.0" : 611.6120209137682, - "90.0" : 628.3125349647662, - "95.0" : 628.6608122329927, - "99.0" : 628.6608122329927, - "99.9" : 628.6608122329927, - "99.99" : 628.6608122329927, - "99.999" : 628.6608122329927, - "99.9999" : 628.6608122329927, - "100.0" : 628.6608122329927 + "0.0" : 2092.002062716033, + "50.0" : 2092.3633355152065, + "90.0" : 2093.189290840698, + "95.0" : 2093.189290840698, + "99.0" : 2093.189290840698, + "99.9" : 2093.189290840698, + "99.99" : 2093.189290840698, + "99.999" : 2093.189290840698, + "99.9999" : 2093.189290840698, + "100.0" : 2093.189290840698 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 625.2095344168486, - 626.9046688638626, - 614.5658881516387, - 605.7208786793759 - ], - [ - 608.1083934570145, - 607.5112633813052, - 608.6273734356413, - 609.3253439964727 - ], - [ - 628.6608122329927, - 626.9210968548758, - 628.1632732783834, - 626.2282659157596 - ], - [ - 609.7085865135657, - 610.6646309179413, - 611.8326153225662, - 611.3914265049701 + 2092.142316922251, + 2093.189290840698, + 2092.5843541081617, + 2092.002062716033 ] ] }, @@ -1554,19 +1008,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1574,53 +1028,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "java.lang.StringBuilder" + "jsonSize" : "1mb", + "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 1527.102099599413, - "scoreError" : 149.60887874262335, + "score" : 300.50175605365195, + "scoreError" : 16.628260772796597, "scoreConfidence" : [ - 1377.4932208567895, - 1676.7109783420362 + 283.87349528085537, + 317.1300168264485 ], "scorePercentiles" : { - "0.0" : 1432.6701370480973, - "50.0" : 1451.423009568845, - "90.0" : 1775.5915608383727, - "95.0" : 1778.5009321625757, - "99.0" : 1778.5009321625757, - "99.9" : 1778.5009321625757, - "99.99" : 1778.5009321625757, - "99.999" : 1778.5009321625757, - "99.9999" : 1778.5009321625757, - "100.0" : 1778.5009321625757 + "0.0" : 296.7270976551244, + "50.0" : 301.46267892494234, + "90.0" : 302.35456870959865, + "95.0" : 302.35456870959865, + "99.0" : 302.35456870959865, + "99.9" : 302.35456870959865, + "99.99" : 302.35456870959865, + "99.999" : 302.35456870959865, + "99.9999" : 302.35456870959865, + "100.0" : 302.35456870959865 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 1778.5009321625757, - 1771.3264006795212, - 1768.4773355824402, - 1774.3446874137144 - ], - [ - 1451.273743247904, - 1454.6608555795883, - 1453.3312141243018, - 1459.166063818666 - ], - [ - 1451.5722758897862, - 1443.7857006209997, - 1441.609769499646, - 1446.4484043963978 - ], - [ - 1434.143907476662, - 1436.3686369527936, - 1435.95352909751, - 1432.6701370480973 + 302.35456870959865, + 301.0521833779614, + 301.87317447192333, + 296.7270976551244 ] ] }, @@ -1628,19 +1064,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1648,53 +1084,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "scala.StringBuilder" + "jsonSize" : "1mb", + "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 1531.3574196141678, - "scoreError" : 101.64373249871164, + "score" : 392.0619134376386, + "scoreError" : 1.6351377127176903, "scoreConfidence" : [ - 1429.7136871154562, - 1633.0011521128795 + 390.42677572492096, + 393.6970511503563 ], "scorePercentiles" : { - "0.0" : 1400.1857231379338, - "50.0" : 1528.398539951202, - "90.0" : 1670.9689262512131, - "95.0" : 1671.151724675563, - "99.0" : 1671.151724675563, - "99.9" : 1671.151724675563, - "99.99" : 1671.151724675563, - "99.999" : 1671.151724675563, - "99.9999" : 1671.151724675563, - "100.0" : 1671.151724675563 + "0.0" : 391.8480127263682, + "50.0" : 391.98575996613056, + "90.0" : 392.42812109192516, + "95.0" : 392.42812109192516, + "99.0" : 392.42812109192516, + "99.9" : 392.42812109192516, + "99.99" : 392.42812109192516, + "99.999" : 392.42812109192516, + "99.9999" : 392.42812109192516, + "100.0" : 392.42812109192516 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 1662.2054328701429, - 1665.224723108275, - 1670.890584069349, - 1671.151724675563 - ], - [ - 1494.1508370797937, - 1501.0919967310535, - 1498.2097690095673, - 1503.0568693053408 - ], - [ - 1553.7402105970637, - 1563.1868694747432, - 1556.8165164076458, - 1559.2131810016624 - ], - [ - 1400.1857231379338, - 1400.3698956999222, - 1400.6462897146157, - 1401.578090944017 + 392.00345893627724, + 391.96806099598393, + 392.42812109192516, + 391.8480127263682 ] ] }, @@ -1702,19 +1120,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1722,53 +1140,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "json4s-jackson" + "jsonSize" : "1mb", + "processorName" : "circe" }, "primaryMetric" : { - "score" : 178.297914046242, - "scoreError" : 0.7522148602625766, + "score" : 157.51845044919145, + "scoreError" : 0.680659832435363, "scoreConfidence" : [ - 177.54569918597943, - 179.05012890650457 + 156.83779061675608, + 158.19911028162682 ], "scorePercentiles" : { - "0.0" : 176.86947510284992, - "50.0" : 178.27540558259287, - "90.0" : 179.28139570940232, - "95.0" : 179.6274359459413, - "99.0" : 179.6274359459413, - "99.9" : 179.6274359459413, - "99.99" : 179.6274359459413, - "99.999" : 179.6274359459413, - "99.9999" : 179.6274359459413, - "100.0" : 179.6274359459413 + "0.0" : 157.41259901009516, + "50.0" : 157.51990966919712, + "90.0" : 157.62138344827642, + "95.0" : 157.62138344827642, + "99.0" : 157.62138344827642, + "99.9" : 157.62138344827642, + "99.99" : 157.62138344827642, + "99.999" : 157.62138344827642, + "99.9999" : 157.62138344827642, + "100.0" : 157.62138344827642 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 178.23642231141602, - 177.18676368806692, - 177.77137372456906, - 178.77056943020406 - ], - [ - 178.28296012486197, - 179.1302777668538, - 179.1330927508856, - 179.6274359459413 - ], - [ - 177.78185817916938, - 178.19680862984387, - 178.26785104032376, - 177.62732378918318 - ], - [ - 178.54217283264367, - 176.86947510284992, - 178.3680067370828, - 178.9742326859769 + 157.44414342450114, + 157.62138344827642, + 157.5956759138931, + 157.41259901009516 ] ] }, @@ -1776,19 +1176,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1796,53 +1196,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "json4s-native" + "jsonSize" : "1mb", + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 194.54443309870706, - "scoreError" : 0.8502041567367838, + "score" : 49.41659582197183, + "scoreError" : 4.128650672278151, "scoreConfidence" : [ - 193.69422894197027, - 195.39463725544385 + 45.287945149693684, + 53.54524649424998 ], "scorePercentiles" : { - "0.0" : 193.2757263751458, - "50.0" : 194.18285211706575, - "90.0" : 195.9056970871784, - "95.0" : 195.91268246189492, - "99.0" : 195.91268246189492, - "99.9" : 195.91268246189492, - "99.99" : 195.91268246189492, - "99.999" : 195.91268246189492, - "99.9999" : 195.91268246189492, - "100.0" : 195.91268246189492 + "0.0" : 48.76101535916496, + "50.0" : 49.306450172914005, + "90.0" : 50.29246758289436, + "95.0" : 50.29246758289436, + "99.0" : 50.29246758289436, + "99.9" : 50.29246758289436, + "99.99" : 50.29246758289436, + "99.999" : 50.29246758289436, + "99.9999" : 50.29246758289436, + "100.0" : 50.29246758289436 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 194.11888905280796, - 194.15047563071496, - 194.49971680181574, - 194.0682179377957 - ], - [ - 194.21522860341656, - 193.2757263751458, - 193.79075393306465, - 193.7618005973071 - ], - [ - 195.90270335515703, - 195.89233717970137, - 195.37723198779844, - 195.91268246189492 - ], - [ - 193.9892973388808, - 194.03858298954407, - 194.80295719839972, - 194.91432813586846 + 49.34785823381571, + 50.29246758289436, + 48.76101535916496, + 49.2650421120123 ] ] }, @@ -1850,19 +1232,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1870,53 +1252,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "play-json" + "jsonSize" : "1mb", + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 208.25712360254272, - "scoreError" : 1.358416468591148, + "score" : 142.1640514746978, + "scoreError" : 1.4225526580210257, "scoreConfidence" : [ - 206.89870713395158, - 209.61554007113386 + 140.74149881667677, + 143.58660413271883 ], "scorePercentiles" : { - "0.0" : 206.44503178915343, - "50.0" : 208.0061140873449, - "90.0" : 210.2487649790165, - "95.0" : 210.39924478331997, - "99.0" : 210.39924478331997, - "99.9" : 210.39924478331997, - "99.99" : 210.39924478331997, - "99.999" : 210.39924478331997, - "99.9999" : 210.39924478331997, - "100.0" : 210.39924478331997 + "0.0" : 141.90393517724456, + "50.0" : 142.1560858061505, + "90.0" : 142.4400991092456, + "95.0" : 142.4400991092456, + "99.0" : 142.4400991092456, + "99.9" : 142.4400991092456, + "99.99" : 142.4400991092456, + "99.999" : 142.4400991092456, + "99.9999" : 142.4400991092456, + "100.0" : 142.4400991092456 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 208.6001557523453, - 208.82827437043392, - 208.8773276822671, - 208.40250153415113 - ], - [ - 206.44503178915343, - 207.6097266405387, - 206.8667802759037, - 206.5014288970323 - ], - [ - 209.89184512497414, - 209.97213207868626, - 210.39924478331997, - 210.184273634315 - ], - [ - 207.59287686561612, - 207.0601513253227, - 207.3727503641407, - 207.5094765224827 + 142.18251762104686, + 142.4400991092456, + 141.90393517724456, + 142.12965399125414 ] ] }, @@ -1924,19 +1288,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -1944,53 +1308,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "128kb", - "processorName" : "spray-json" + "jsonSize" : "1mb", + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 384.9628616168525, - "scoreError" : 8.194152646521244, + "score" : 239.59825470502108, + "scoreError" : 12.090993885755951, "scoreConfidence" : [ - 376.76870897033126, - 393.1570142633737 + 227.50726081926513, + 251.68924859077703 ], "scorePercentiles" : { - "0.0" : 376.0617550356831, - "50.0" : 383.1887611460431, - "90.0" : 397.29425617030745, - "95.0" : 397.6338227814255, - "99.0" : 397.6338227814255, - "99.9" : 397.6338227814255, - "99.99" : 397.6338227814255, - "99.999" : 397.6338227814255, - "99.9999" : 397.6338227814255, - "100.0" : 397.6338227814255 + "0.0" : 237.33856097367186, + "50.0" : 239.95747440052935, + "90.0" : 241.13950904535375, + "95.0" : 241.13950904535375, + "99.0" : 241.13950904535375, + "99.9" : 241.13950904535375, + "99.99" : 241.13950904535375, + "99.999" : 241.13950904535375, + "99.9999" : 241.13950904535375, + "100.0" : 241.13950904535375 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 387.03325577832607, - 387.1872156202023, - 386.78205083743603, - 387.5227470303613 - ], - [ - 378.70749910277266, - 378.756739317849, - 378.07928200742583, - 379.5954714546501 - ], - [ - 395.7019812162157, - 397.6338227814255, - 396.41413829779447, - 397.14872762268544 - ], - [ - 376.0617550356831, - 377.8187966694059, - 378.1260957839556, - 376.83620731345155 + 241.1328951147916, + 241.13950904535375, + 238.78205368626712, + 237.33856097367186 ] ] }, @@ -1998,19 +1344,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2018,53 +1364,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", + "jsonSize" : "32mb", "processorName" : "tethys-jackson" }, "primaryMetric" : { - "score" : 205.9244021866403, - "scoreError" : 0.7278441932523408, + "score" : 11.786317004742862, + "scoreError" : 0.14575827384743734, "scoreConfidence" : [ - 205.19655799338796, - 206.65224637989263 + 11.640558730895425, + 11.9320752785903 ], "scorePercentiles" : { - "0.0" : 204.79286221855048, - "50.0" : 205.74430162040798, - "90.0" : 207.14769420002736, - "95.0" : 207.34397831106327, - "99.0" : 207.34397831106327, - "99.9" : 207.34397831106327, - "99.99" : 207.34397831106327, - "99.999" : 207.34397831106327, - "99.9999" : 207.34397831106327, - "100.0" : 207.34397831106327 + "0.0" : 11.758114656066427, + "50.0" : 11.78703829894285, + "90.0" : 11.81307676501932, + "95.0" : 11.81307676501932, + "99.0" : 11.81307676501932, + "99.9" : 11.81307676501932, + "99.99" : 11.81307676501932, + "99.999" : 11.81307676501932, + "99.9999" : 11.81307676501932, + "100.0" : 11.81307676501932 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 205.8535343868696, - 205.53999555807275, - 205.08167771587847, - 205.27704582369412 - ], - [ - 205.7895358490495, - 205.64326507829853, - 205.65334350054684, - 205.69330934876052 - ], - [ - 206.69944373843313, - 206.86953698177211, - 207.34397831106327, - 207.0635724381548 - ], - [ - 205.76486145230385, - 204.79286221855048, - 206.0007307962841, - 205.72374178851211 + 11.758114656066427, + 11.78967041235971, + 11.784406185525992, + 11.81307676501932 ] ] }, @@ -2072,19 +1400,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2092,53 +1420,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", + "jsonSize" : "32mb", "processorName" : "pure-jackson" }, "primaryMetric" : { - "score" : 220.4717569125693, - "scoreError" : 2.3540716332045517, + "score" : 10.441401348799962, + "scoreError" : 0.4257042267370256, "scoreConfidence" : [ - 218.11768527936476, - 222.82582854577385 + 10.015697122062937, + 10.867105575536987 ], "scorePercentiles" : { - "0.0" : 216.27751460353352, - "50.0" : 221.19719173925927, - "90.0" : 222.75991236987505, - "95.0" : 222.7720569434726, - "99.0" : 222.7720569434726, - "99.9" : 222.7720569434726, - "99.99" : 222.7720569434726, - "99.999" : 222.7720569434726, - "99.9999" : 222.7720569434726, - "100.0" : 222.7720569434726 + "0.0" : 10.349816758614011, + "50.0" : 10.460552010194798, + "90.0" : 10.494684616196244, + "95.0" : 10.494684616196244, + "99.0" : 10.494684616196244, + "99.9" : 10.494684616196244, + "99.99" : 10.494684616196244, + "99.999" : 10.494684616196244, + "99.9999" : 10.494684616196244, + "100.0" : 10.494684616196244 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 221.37541382516517, - 221.02702668021735, - 222.41763693253327, - 221.0885398928859 - ], - [ - 222.75470755261898, - 222.31407112076758, - 222.22323945753857, - 222.7720569434726 - ], - [ - 216.83603214860017, - 216.492830290297, - 217.4647718367599, - 216.27751460353352 - ], - [ - 220.55444161287713, - 221.1401110120478, - 221.55544422532233, - 221.25427246647072 + 10.494684616196244, + 10.437536011173183, + 10.483568009216413, + 10.349816758614011 ] ] }, @@ -2146,19 +1456,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2166,53 +1476,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", + "jsonSize" : "32mb", "processorName" : "circe" }, "primaryMetric" : { - "score" : 56.90001764577559, - "scoreError" : 2.4888092413017597, + "score" : 2.7059660558815626, + "scoreError" : 0.5529906205263425, "scoreConfidence" : [ - 54.41120840447383, - 59.38882688707735 + 2.15297543535522, + 3.258956676407905 ], "scorePercentiles" : { - "0.0" : 53.8988508939462, - "50.0" : 57.126774872965946, - "90.0" : 59.45993998580039, - "95.0" : 59.68954011287098, - "99.0" : 59.68954011287098, - "99.9" : 59.68954011287098, - "99.99" : 59.68954011287098, - "99.999" : 59.68954011287098, - "99.9999" : 59.68954011287098, - "100.0" : 59.68954011287098 + "0.0" : 2.5821394278212177, + "50.0" : 2.7386367255520128, + "90.0" : 2.7644513446010057, + "95.0" : 2.7644513446010057, + "99.0" : 2.7644513446010057, + "99.9" : 2.7644513446010057, + "99.99" : 2.7644513446010057, + "99.999" : 2.7644513446010057, + "99.9999" : 2.7644513446010057, + "100.0" : 2.7644513446010057 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 59.36153993134157, - 59.27490811884806, - 59.056388104571894, - 59.03483313492188 - ], - [ - 54.10467614164006, - 54.119814178295975, - 53.8988508939462, - 53.93204824031475 - ], - [ - 55.16979353394992, - 55.108918272410364, - 55.021053355531784, - 55.21871661101001 - ], - [ - 59.193880145990896, - 59.049620292448616, - 59.16570126431659, - 59.68954011287098 + 2.715383754518447, + 2.5821394278212177, + 2.7618896965855786, + 2.7644513446010057 ] ] }, @@ -2220,19 +1512,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2240,53 +1532,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", - "processorName" : "java.lang.StringBuilder" + "jsonSize" : "32mb", + "processorName" : "play-json" }, "primaryMetric" : { - "score" : 167.98099950549957, - "scoreError" : 1.4192077101520342, + "score" : 1.0644466719884713, + "scoreError" : 0.10828100329407624, "scoreConfidence" : [ - 166.56179179534755, - 169.4002072156516 + 0.9561656686943951, + 1.1727276752825475 ], "scorePercentiles" : { - "0.0" : 165.71409755696507, - "50.0" : 168.39111579785265, - "90.0" : 169.258980617174, - "95.0" : 169.26296199775922, - "99.0" : 169.26296199775922, - "99.9" : 169.26296199775922, - "99.99" : 169.26296199775922, - "99.999" : 169.26296199775922, - "99.9999" : 169.26296199775922, - "100.0" : 169.26296199775922 + "0.0" : 1.0488479596654356, + "50.0" : 1.0605586721042153, + "90.0" : 1.0878213840800195, + "95.0" : 1.0878213840800195, + "99.0" : 1.0878213840800195, + "99.9" : 1.0878213840800195, + "99.99" : 1.0878213840800195, + "99.999" : 1.0878213840800195, + "99.9999" : 1.0878213840800195, + "100.0" : 1.0878213840800195 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 169.26296199775922, - 169.2489301313039, - 169.20668792426602, - 169.2572743112089 - ], - [ - 169.1927622043413, - 168.47850694754848, - 168.7101156368517, - 169.0855319355166 - ], - [ - 165.8283248668893, - 165.91329159012486, - 165.8547699672682, - 165.71409755696507 - ], - [ - 167.25360893722717, - 168.2098046356271, - 168.1755987969384, - 168.30372464815684 + 1.0639069080349006, + 1.0488479596654356, + 1.05721043617353, + 1.0878213840800195 ] ] }, @@ -2294,19 +1568,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2314,53 +1588,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", - "processorName" : "scala.StringBuilder" + "jsonSize" : "32mb", + "processorName" : "spray-json" }, "primaryMetric" : { - "score" : 155.44477905927874, - "scoreError" : 1.7492381089876357, + "score" : 3.4253825528465027, + "scoreError" : 0.39600842164497063, "scoreConfidence" : [ - 153.6955409502911, - 157.19401716826638 + 3.029374131201532, + 3.8213909744914734 ], "scorePercentiles" : { - "0.0" : 153.29934830820102, - "50.0" : 155.01402743741107, - "90.0" : 158.18069488800927, - "95.0" : 158.4137206089156, - "99.0" : 158.4137206089156, - "99.9" : 158.4137206089156, - "99.99" : 158.4137206089156, - "99.999" : 158.4137206089156, - "99.9999" : 158.4137206089156, - "100.0" : 158.4137206089156 + "0.0" : 3.385092868844048, + "50.0" : 3.400474031886585, + "90.0" : 3.5154892787687935, + "95.0" : 3.5154892787687935, + "99.0" : 3.5154892787687935, + "99.9" : 3.5154892787687935, + "99.99" : 3.5154892787687935, + "99.999" : 3.5154892787687935, + "99.9999" : 3.5154892787687935, + "100.0" : 3.5154892787687935 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 155.59839250098264, - 155.04327772760922, - 154.98477714721295, - 155.30430310359233 - ], - [ - 153.50600627677863, - 153.29934830820102, - 153.66586479002623, - 153.79800870855138 - ], - [ - 158.4137206089156, - 157.97691988795822, - 158.08082672190653, - 157.87518211281957 - ], - [ - 155.37577697851935, - 154.70058856640404, - 154.70918880035796, - 154.78428270862406 + 3.5154892787687935, + 3.385092868844048, + 3.4123772610553913, + 3.388570802717778 ] ] }, @@ -2368,19 +1624,19 @@ } }, { - "jmhVersion" : "1.21", + "jmhVersion" : "1.36", "benchmark" : "json.bench.JmhWriterBench.bench", "mode" : "thrpt", "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", + "forks" : 1, + "jvm" : "/Users/gosha/Library/Java/JavaVirtualMachines/corretto-17.0.7/Contents/Home/bin/java", "jvmArgs" : [ "-Xms1G", "-Xmx1G" ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7-LTS", "warmupIterations" : 4, "warmupTime" : "5 s", "warmupBatchSize" : 1, @@ -2388,941 +1644,35 @@ "measurementTime" : "5 s", "measurementBatchSize" : 1, "params" : { - "jsonSize" : "1mb", - "processorName" : "json4s-jackson" + "jsonSize" : "32mb", + "processorName" : "zio-json" }, "primaryMetric" : { - "score" : 20.37420370258087, - "scoreError" : 0.6437490207868535, + "score" : 7.347089488260391, + "scoreError" : 0.025160682828075858, "scoreConfidence" : [ - 19.73045468179402, - 21.017952723367724 + 7.321928805432315, + 7.372250171088466 ], "scorePercentiles" : { - "0.0" : 19.552674620317216, - "50.0" : 20.182154617853392, - "90.0" : 21.59623854282174, - "95.0" : 21.604110423577715, - "99.0" : 21.604110423577715, - "99.9" : 21.604110423577715, - "99.99" : 21.604110423577715, - "99.999" : 21.604110423577715, - "99.9999" : 21.604110423577715, - "100.0" : 21.604110423577715 + "0.0" : 7.344136033159427, + "50.0" : 7.345870502020608, + "90.0" : 7.35248091584092, + "95.0" : 7.35248091584092, + "99.0" : 7.35248091584092, + "99.9" : 7.35248091584092, + "99.99" : 7.35248091584092, + "99.999" : 7.35248091584092, + "99.9999" : 7.35248091584092, + "100.0" : 7.35248091584092 }, "scoreUnit" : "ops/s", "rawData" : [ [ - 20.97579396732298, - 21.27915925925626, - 21.604110423577715, - 21.592864879640608 - ], - [ - 19.552674620317216, - 19.89440213288299, - 20.011367427547366, - 20.059400540369825 - ], - [ - 20.18771574670533, - 20.176593489001455, - 20.282526482674605, - 20.277719019552677 - ], - [ - 19.79922429411107, - 19.974055200348886, - 20.099218482605146, - 20.22043327537984 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "1mb", - "processorName" : "json4s-native" - }, - "primaryMetric" : { - "score" : 21.216037535428097, - "scoreError" : 1.3902633276066458, - "scoreConfidence" : [ - 19.82577420782145, - 22.606300863034743 - ], - "scorePercentiles" : { - "0.0" : 19.70792041772924, - "50.0" : 21.266077469864456, - "90.0" : 22.581928852631815, - "95.0" : 22.585842913597304, - "99.0" : 22.585842913597304, - "99.9" : 22.585842913597304, - "99.99" : 22.585842913597304, - "99.999" : 22.585842913597304, - "99.9999" : 22.585842913597304, - "100.0" : 22.585842913597304 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 19.962953318179995, - 20.002561924170344, - 20.08983751660655, - 20.06275521372791 - ], - [ - 22.585842913597304, - 22.580251397932322, - 22.579196296225334, - 22.51651351885643 - ], - [ - 19.816561121667267, - 19.70792041772924, - 19.759104537867945, - 19.782545673995905 - ], - [ - 22.503284362816377, - 22.442317423122365, - 22.517550354602466, - 22.54740457575181 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "1mb", - "processorName" : "play-json" - }, - "primaryMetric" : { - "score" : 22.433279153023605, - "scoreError" : 0.32258642361370987, - "scoreConfidence" : [ - 22.110692729409894, - 22.755865576637316 - ], - "scorePercentiles" : { - "0.0" : 21.854562306840474, - "50.0" : 22.523027819968558, - "90.0" : 22.716984513474895, - "95.0" : 22.723504186318287, - "99.0" : 22.723504186318287, - "99.9" : 22.723504186318287, - "99.99" : 22.723504186318287, - "99.999" : 22.723504186318287, - "99.9999" : 22.723504186318287, - "100.0" : 22.723504186318287 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 21.913890808003963, - 21.992685844084924, - 21.854562306840474, - 21.93897158172373 - ], - [ - 22.517451939900365, - 22.463845531505118, - 22.438867395276986, - 22.519649233959473 - ], - [ - 22.63251921746911, - 22.714190367970584, - 22.6229958659803, - 22.687184065961475 - ], - [ - 22.681575881416247, - 22.526406405977642, - 22.723504186318287, - 22.70416581598904 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "1mb", - "processorName" : "spray-json" - }, - "primaryMetric" : { - "score" : 39.31741395709232, - "scoreError" : 0.7789710919953607, - "scoreConfidence" : [ - 38.53844286509696, - 40.09638504908768 - ], - "scorePercentiles" : { - "0.0" : 38.33915828618427, - "50.0" : 39.22345690302931, - "90.0" : 40.28441254644963, - "95.0" : 40.30253886096942, - "99.0" : 40.30253886096942, - "99.9" : 40.30253886096942, - "99.99" : 40.30253886096942, - "99.999" : 40.30253886096942, - "99.9999" : 40.30253886096942, - "100.0" : 40.30253886096942 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 40.193728291218626, - 40.30253886096942, - 40.2640402301403, - 40.27664412594115 - ], - [ - 40.019170034596065, - 39.8030278308552, - 39.6165714156913, - 39.72515879396115 - ], - [ - 38.83034239036732, - 38.82327987750485, - 38.70219029980803, - 38.70541282684963 - ], - [ - 38.54932176634875, - 38.33915828618427, - 38.42537997223185, - 38.50265831080912 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "tethys-jackson" - }, - "primaryMetric" : { - "score" : 3.4840116383584103, - "scoreError" : 0.05671715462352081, - "scoreConfidence" : [ - 3.4272944837348893, - 3.5407287929819313 - ], - "scorePercentiles" : { - "0.0" : 3.4193848597076713, - "50.0" : 3.4707399787441897, - "90.0" : 3.5607776531021718, - "95.0" : 3.5621500095964422, - "99.0" : 3.5621500095964422, - "99.9" : 3.5621500095964422, - "99.99" : 3.5621500095964422, - "99.999" : 3.5621500095964422, - "99.9999" : 3.5621500095964422, - "100.0" : 3.5621500095964422 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 3.5549859699101463, - 3.560189500318913, - 3.55448626849121, - 3.5621500095964422 - ], - [ - 3.425260548238001, - 3.432045823879606, - 3.4193848597076713, - 3.430210307264926 - ], - [ - 3.515877813589033, - 3.4906225135932227, - 3.5203159048257078, - 3.518068198731228 - ], - [ - 3.4508574438951567, - 3.4336523910667918, - 3.4401059518079204, - 3.4359727088185794 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "pure-jackson" - }, - "primaryMetric" : { - "score" : 4.014385931538531, - "scoreError" : 0.007674004366804509, - "scoreConfidence" : [ - 4.006711927171726, - 4.022059935905335 - ], - "scorePercentiles" : { - "0.0" : 3.997145575151816, - "50.0" : 4.015331878409051, - "90.0" : 4.023129195975932, - "95.0" : 4.025268599095853, - "99.0" : 4.025268599095853, - "99.9" : 4.025268599095853, - "99.99" : 4.025268599095853, - "99.999" : 4.025268599095853, - "99.9999" : 4.025268599095853, - "100.0" : 4.025268599095853 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 4.00627852294676, - 4.011591738845462, - 4.021324599494267, - 4.019971468643013 - ], - [ - 4.019552655279791, - 4.025268599095853, - 4.022212308924538, - 4.017804308986717 - ], - [ - 4.01539347360737, - 3.997145575151816, - 4.005784889010396, - 4.01344753452025 - ], - [ - 4.012416128995867, - 4.020471220167916, - 4.006241597735729, - 4.015270283210732 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "circe" - }, - "primaryMetric" : { - "score" : 0.8011955641936555, - "scoreError" : 0.09226271316834735, - "scoreConfidence" : [ - 0.7089328510253081, - 0.8934582773620028 - ], - "scorePercentiles" : { - "0.0" : 0.674789517119142, - "50.0" : 0.859485637552333, - "90.0" : 0.8815994366238631, - "95.0" : 0.8845095385975663, - "99.0" : 0.8845095385975663, - "99.9" : 0.8845095385975663, - "99.99" : 0.8845095385975663, - "99.999" : 0.8845095385975663, - "99.9999" : 0.8845095385975663, - "100.0" : 0.8845095385975663 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.6955946477759751, - 0.8845095385975663, - 0.8621121237419961, - 0.8803522500637045 - ], - [ - 0.8615480014038118, - 0.8791460212286226, - 0.674789517119142, - 0.8539378855774633 - ], - [ - 0.863510967941292, - 0.684009358227522, - 0.8574232737008542, - 0.7094621234705585 - ], - [ - 0.8719819298682412, - 0.6831960462862718, - 0.8722760673964474, - 0.6852792746990177 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "java.lang.StringBuilder" - }, - "primaryMetric" : { - "score" : 4.628897756232377, - "scoreError" : 0.1342029855521775, - "scoreConfidence" : [ - 4.4946947706802, - 4.763100741784555 - ], - "scorePercentiles" : { - "0.0" : 4.306019908940593, - "50.0" : 4.645957555356699, - "90.0" : 4.805316650637008, - "95.0" : 4.869968565702863, - "99.0" : 4.869968565702863, - "99.9" : 4.869968565702863, - "99.99" : 4.869968565702863, - "99.999" : 4.869968565702863, - "99.9999" : 4.869968565702863, - "100.0" : 4.869968565702863 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 4.530046958691306, - 4.585480107503758, - 4.651932224795342, - 4.727794183701847 - ], - [ - 4.73783034373521, - 4.5320591918410535, - 4.714716031637786, - 4.869968565702863 - ], - [ - 4.306019908940593, - 4.777608687037356, - 4.547377485805318, - 4.5627626054001755 - ], - [ - 4.639982885918057, - 4.529806964690784, - 4.688883959816848, - 4.660093994499744 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "scala.StringBuilder" - }, - "primaryMetric" : { - "score" : 4.543542268926196, - "scoreError" : 0.18080092672493456, - "scoreConfidence" : [ - 4.362741342201262, - 4.724343195651131 - ], - "scorePercentiles" : { - "0.0" : 4.296314503233119, - "50.0" : 4.54993208326235, - "90.0" : 4.819878457301497, - "95.0" : 4.843550716676863, - "99.0" : 4.843550716676863, - "99.9" : 4.843550716676863, - "99.99" : 4.843550716676863, - "99.999" : 4.843550716676863, - "99.9999" : 4.843550716676863, - "100.0" : 4.843550716676863 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 4.332196726647606, - 4.809733203283483, - 4.587612260540012, - 4.515177891607192 - ], - [ - 4.36663566608741, - 4.627121137301832, - 4.296314503233119, - 4.596753116532759 - ], - [ - 4.324007380579014, - 4.489391221299418, - 4.426353153056011, - 4.667995665390251 - ], - [ - 4.802091652208794, - 4.584686274917509, - 4.427055733457871, - 4.843550716676863 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "json4s-jackson" - }, - "primaryMetric" : { - "score" : 0.37684100772411694, - "scoreError" : 0.013679688097392872, - "scoreConfidence" : [ - 0.36316131962672404, - 0.39052069582150983 - ], - "scorePercentiles" : { - "0.0" : 0.3495249919009467, - "50.0" : 0.3787518867094639, - "90.0" : 0.39522275147857655, - "95.0" : 0.3968034464303026, - "99.0" : 0.3968034464303026, - "99.9" : 0.3968034464303026, - "99.99" : 0.3968034464303026, - "99.999" : 0.3968034464303026, - "99.9999" : 0.3968034464303026, - "100.0" : 0.3968034464303026 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.3733228878983038, - 0.3682160530049085, - 0.3968034464303026, - 0.37547502326121274 - ], - [ - 0.36387940186454376, - 0.39275204797776697, - 0.3945453107849797, - 0.386727004793663 - ], - [ - 0.3638782222435439, - 0.38484880059360155, - 0.3653286108633603, - 0.3820287501577151 - ], - [ - 0.3646187897190209, - 0.38210796488785687, - 0.3495249919009467, - 0.3853988172041442 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "json4s-native" - }, - "primaryMetric" : { - "score" : 0.7281002294287263, - "scoreError" : 0.005418046901171389, - "scoreConfidence" : [ - 0.7226821825275549, - 0.7335182763298977 - ], - "scorePercentiles" : { - "0.0" : 0.7179429889477541, - "50.0" : 0.7309572409049319, - "90.0" : 0.7334001180343369, - "95.0" : 0.7337895712919531, - "99.0" : 0.7337895712919531, - "99.9" : 0.7337895712919531, - "99.99" : 0.7337895712919531, - "99.999" : 0.7337895712919531, - "99.9999" : 0.7337895712919531, - "100.0" : 0.7337895712919531 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.7202535870846117, - 0.7182102287715167, - 0.7337895712919531, - 0.7179429889477541 - ], - [ - 0.7311669591886535, - 0.7313291990522158, - 0.7315158115862521, - 0.7307475226212103 - ], - [ - 0.7318557518336308, - 0.7325184328131972, - 0.7318212498166068, - 0.7332332094953585 - ], - [ - 0.7259362884647947, - 0.7271097415259093, - 0.7247230897755503, - 0.7274500385904061 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "play-json" - }, - "primaryMetric" : { - "score" : 0.4885343153005361, - "scoreError" : 0.01576117148523935, - "scoreConfidence" : [ - 0.4727731438152967, - 0.5042954867857754 - ], - "scorePercentiles" : { - "0.0" : 0.4425229084905249, - "50.0" : 0.49516448317824735, - "90.0" : 0.5030024634638968, - "95.0" : 0.5032610287169592, - "99.0" : 0.5032610287169592, - "99.9" : 0.5032610287169592, - "99.99" : 0.5032610287169592, - "99.999" : 0.5032610287169592, - "99.9999" : 0.5032610287169592, - "100.0" : 0.5032610287169592 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.46946871530455525, - 0.4425229084905249, - 0.4744756028183037, - 0.4863778937091697 - ], - [ - 0.5028916497840129, - 0.4984967436881656, - 0.5032610287169592, - 0.49821238266664736 - ], - [ - 0.4961749144811607, - 0.49656961130134913, - 0.49599561347299126, - 0.4943333528835034 - ], - [ - 0.4859647895990327, - 0.49658421197847175, - 0.48986085560200204, - 0.4853587703117288 - ] - ] - }, - "secondaryMetrics" : { - } - }, - { - "jmhVersion" : "1.21", - "benchmark" : "json.bench.JmhWriterBench.bench", - "mode" : "thrpt", - "threads" : 1, - "forks" : 4, - "jvm" : "/usr/lib/jvm/java-8-oracle/jre/bin/java", - "jvmArgs" : [ - "-Xms1G", - "-Xmx1G" - ], - "jdkVersion" : "1.8.0_201", - "vmName" : "Java HotSpot(TM) 64-Bit Server VM", - "vmVersion" : "25.201-b09", - "warmupIterations" : 4, - "warmupTime" : "5 s", - "warmupBatchSize" : 1, - "measurementIterations" : 4, - "measurementTime" : "5 s", - "measurementBatchSize" : 1, - "params" : { - "jsonSize" : "32mb", - "processorName" : "spray-json" - }, - "primaryMetric" : { - "score" : 0.5404206274327645, - "scoreError" : 0.051222327536293445, - "scoreConfidence" : [ - 0.48919829989647107, - 0.5916429549690579 - ], - "scorePercentiles" : { - "0.0" : 0.47114722979101575, - "50.0" : 0.5142777934355679, - "90.0" : 0.6177935852868495, - "95.0" : 0.6490684705209794, - "99.0" : 0.6490684705209794, - "99.9" : 0.6490684705209794, - "99.99" : 0.6490684705209794, - "99.999" : 0.6490684705209794, - "99.9999" : 0.6490684705209794, - "100.0" : 0.6490684705209794 - }, - "scoreUnit" : "ops/s", - "rawData" : [ - [ - 0.47114722979101575, - 0.5083157798861887, - 0.5092007272328746, - 0.5105081086592876 - ], - [ - 0.47468710513306445, - 0.5117074497498432, - 0.513718910070617, - 0.5146528340327398 - ], - [ - 0.6490684705209794, - 0.5421427661205719, - 0.5967179031587204, - 0.513902752838396 - ], - [ - 0.5846798204753318, - 0.5795054599037011, - 0.5623846583072509, - 0.604390063043651 + 7.344334413439188, + 7.347406590602027, + 7.35248091584092, + 7.344136033159427 ] ] }, diff --git a/modules/benchmarks/jmh-writer.log b/modules/benchmarks/jmh-writer.log deleted file mode 100644 index e24bc7f2..00000000 --- a/modules/benchmarks/jmh-writer.log +++ /dev/null @@ -1,2891 +0,0 @@ -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = tethys-jackson) - -# Run progress: 0.00% complete, ETA 02:00:00 -# Fork: 1 of 4 -# Warmup Iteration 1: 880966.095 ops/s -# Warmup Iteration 2: 938942.825 ops/s -# Warmup Iteration 3: 938394.492 ops/s -# Warmup Iteration 4: 934700.822 ops/s -Iteration 1: 934391.007 ops/s -Iteration 2: 936312.521 ops/s -Iteration 3: 937556.279 ops/s -Iteration 4: 938562.177 ops/s - -# Run progress: 0.56% complete, ETA 02:00:33 -# Fork: 2 of 4 -# Warmup Iteration 1: 874264.695 ops/s -# Warmup Iteration 2: 926263.996 ops/s -# Warmup Iteration 3: 928167.678 ops/s -# Warmup Iteration 4: 926504.483 ops/s -Iteration 1: 923665.431 ops/s -Iteration 2: 928321.337 ops/s -Iteration 3: 928989.548 ops/s -Iteration 4: 928280.203 ops/s - -# Run progress: 1.11% complete, ETA 01:59:45 -# Fork: 3 of 4 -# Warmup Iteration 1: 880943.137 ops/s -# Warmup Iteration 2: 929773.012 ops/s -# Warmup Iteration 3: 931883.090 ops/s -# Warmup Iteration 4: 931834.229 ops/s -Iteration 1: 931865.023 ops/s -Iteration 2: 932013.505 ops/s -Iteration 3: 929978.604 ops/s -Iteration 4: 931718.157 ops/s - -# Run progress: 1.67% complete, ETA 01:59:02 -# Fork: 4 of 4 -# Warmup Iteration 1: 887208.603 ops/s -# Warmup Iteration 2: 940649.101 ops/s -# Warmup Iteration 3: 939703.336 ops/s -# Warmup Iteration 4: 938588.397 ops/s -Iteration 1: 939687.547 ops/s -Iteration 2: 939861.054 ops/s -Iteration 3: 938392.349 ops/s -Iteration 4: 938398.628 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 933624.586 ±(99.9%) 5048.703 ops/s [Average] - (min, avg, max) = (923665.431, 933624.586, 939861.054), stdev = 4958.501 - CI (99.9%): [928575.883, 938673.288] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = pure-jackson) - -# Run progress: 2.22% complete, ETA 01:58:20 -# Fork: 1 of 4 -# Warmup Iteration 1: 521066.452 ops/s -# Warmup Iteration 2: 566745.695 ops/s -# Warmup Iteration 3: 567640.873 ops/s -# Warmup Iteration 4: 566331.376 ops/s -Iteration 1: 568067.184 ops/s -Iteration 2: 565062.157 ops/s -Iteration 3: 567110.019 ops/s -Iteration 4: 568047.564 ops/s - -# Run progress: 2.78% complete, ETA 01:57:40 -# Fork: 2 of 4 -# Warmup Iteration 1: 521518.015 ops/s -# Warmup Iteration 2: 564288.333 ops/s -# Warmup Iteration 3: 564732.809 ops/s -# Warmup Iteration 4: 564164.711 ops/s -Iteration 1: 564294.152 ops/s -Iteration 2: 565781.977 ops/s -Iteration 3: 565069.123 ops/s -Iteration 4: 563388.132 ops/s - -# Run progress: 3.33% complete, ETA 01:56:59 -# Fork: 3 of 4 -# Warmup Iteration 1: 521144.724 ops/s -# Warmup Iteration 2: 562082.344 ops/s -# Warmup Iteration 3: 563512.626 ops/s -# Warmup Iteration 4: 562359.239 ops/s -Iteration 1: 561833.801 ops/s -Iteration 2: 564997.907 ops/s -Iteration 3: 562663.989 ops/s -Iteration 4: 562704.978 ops/s - -# Run progress: 3.89% complete, ETA 01:56:18 -# Fork: 4 of 4 -# Warmup Iteration 1: 517867.556 ops/s -# Warmup Iteration 2: 558347.484 ops/s -# Warmup Iteration 3: 559691.825 ops/s -# Warmup Iteration 4: 558213.231 ops/s -Iteration 1: 557925.093 ops/s -Iteration 2: 557345.419 ops/s -Iteration 3: 559419.740 ops/s -Iteration 4: 559159.821 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 563304.441 ±(99.9%) 3482.829 ops/s [Average] - (min, avg, max) = (557345.419, 563304.441, 568067.184), stdev = 3420.604 - CI (99.9%): [559821.612, 566787.270] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = circe) - -# Run progress: 4.44% complete, ETA 01:55:37 -# Fork: 1 of 4 -# Warmup Iteration 1: 559697.171 ops/s -# Warmup Iteration 2: 599699.128 ops/s -# Warmup Iteration 3: 600156.552 ops/s -# Warmup Iteration 4: 601913.098 ops/s -Iteration 1: 601479.982 ops/s -Iteration 2: 601040.427 ops/s -Iteration 3: 600073.003 ops/s -Iteration 4: 601962.802 ops/s - -# Run progress: 5.00% complete, ETA 01:54:57 -# Fork: 2 of 4 -# Warmup Iteration 1: 571360.171 ops/s -# Warmup Iteration 2: 610634.844 ops/s -# Warmup Iteration 3: 611950.769 ops/s -# Warmup Iteration 4: 611939.451 ops/s -Iteration 1: 611485.598 ops/s -Iteration 2: 613991.553 ops/s -Iteration 3: 612260.604 ops/s -Iteration 4: 613350.619 ops/s - -# Run progress: 5.56% complete, ETA 01:54:17 -# Fork: 3 of 4 -# Warmup Iteration 1: 597954.323 ops/s -# Warmup Iteration 2: 641610.001 ops/s -# Warmup Iteration 3: 643208.444 ops/s -# Warmup Iteration 4: 639853.707 ops/s -Iteration 1: 641608.225 ops/s -Iteration 2: 640244.486 ops/s -Iteration 3: 641682.548 ops/s -Iteration 4: 642197.950 ops/s - -# Run progress: 6.11% complete, ETA 01:53:36 -# Fork: 4 of 4 -# Warmup Iteration 1: 589638.436 ops/s -# Warmup Iteration 2: 627832.096 ops/s -# Warmup Iteration 3: 632676.124 ops/s -# Warmup Iteration 4: 630986.355 ops/s -Iteration 1: 635604.212 ops/s -Iteration 2: 627244.795 ops/s -Iteration 3: 628848.534 ops/s -Iteration 4: 627900.059 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 621310.962 ±(99.9%) 16389.224 ops/s [Average] - (min, avg, max) = (600073.003, 621310.962, 642197.950), stdev = 16096.409 - CI (99.9%): [604921.739, 637700.186] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = java.lang.StringBuilder) - -# Run progress: 6.67% complete, ETA 01:52:56 -# Fork: 1 of 4 -# Warmup Iteration 1: 1324923.129 ops/s -# Warmup Iteration 2: 1374895.585 ops/s -# Warmup Iteration 3: 1374466.238 ops/s -# Warmup Iteration 4: 1371567.802 ops/s -Iteration 1: 1369797.065 ops/s -Iteration 2: 1371596.505 ops/s -Iteration 3: 1370143.713 ops/s -Iteration 4: 1372256.846 ops/s - -# Run progress: 7.22% complete, ETA 01:52:15 -# Fork: 2 of 4 -# Warmup Iteration 1: 1329269.583 ops/s -# Warmup Iteration 2: 1376069.801 ops/s -# Warmup Iteration 3: 1370936.324 ops/s -# Warmup Iteration 4: 1374969.606 ops/s -Iteration 1: 1376137.788 ops/s -Iteration 2: 1373501.796 ops/s -Iteration 3: 1370039.090 ops/s -Iteration 4: 1376264.232 ops/s - -# Run progress: 7.78% complete, ETA 01:51:35 -# Fork: 3 of 4 -# Warmup Iteration 1: 1308351.395 ops/s -# Warmup Iteration 2: 1354853.357 ops/s -# Warmup Iteration 3: 1359245.118 ops/s -# Warmup Iteration 4: 1359250.047 ops/s -Iteration 1: 1354793.453 ops/s -Iteration 2: 1358675.689 ops/s -Iteration 3: 1356390.966 ops/s -Iteration 4: 1361343.397 ops/s - -# Run progress: 8.33% complete, ETA 01:50:55 -# Fork: 4 of 4 -# Warmup Iteration 1: 1308460.686 ops/s -# Warmup Iteration 2: 1359030.873 ops/s -# Warmup Iteration 3: 1359160.932 ops/s -# Warmup Iteration 4: 1359379.112 ops/s -Iteration 1: 1361750.356 ops/s -Iteration 2: 1357341.987 ops/s -Iteration 3: 1360233.065 ops/s -Iteration 4: 1363010.654 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1365829.788 ±(99.9%) 7485.740 ops/s [Average] - (min, avg, max) = (1354793.453, 1365829.788, 1376264.232), stdev = 7351.998 - CI (99.9%): [1358344.048, 1373315.527] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = scala.StringBuilder) - -# Run progress: 8.89% complete, ETA 01:50:14 -# Fork: 1 of 4 -# Warmup Iteration 1: 1196167.049 ops/s -# Warmup Iteration 2: 1274037.127 ops/s -# Warmup Iteration 3: 1277677.894 ops/s -# Warmup Iteration 4: 1276988.468 ops/s -Iteration 1: 1278777.239 ops/s -Iteration 2: 1280142.005 ops/s -Iteration 3: 1276548.979 ops/s -Iteration 4: 1270587.307 ops/s - -# Run progress: 9.44% complete, ETA 01:49:34 -# Fork: 2 of 4 -# Warmup Iteration 1: 1226712.825 ops/s -# Warmup Iteration 2: 1290354.119 ops/s -# Warmup Iteration 3: 1291183.255 ops/s -# Warmup Iteration 4: 1293939.910 ops/s -Iteration 1: 1293059.003 ops/s -Iteration 2: 1294255.064 ops/s -Iteration 3: 1296405.130 ops/s -Iteration 4: 1292365.271 ops/s - -# Run progress: 10.00% complete, ETA 01:48:54 -# Fork: 3 of 4 -# Warmup Iteration 1: 1220191.061 ops/s -# Warmup Iteration 2: 1293872.661 ops/s -# Warmup Iteration 3: 1293722.146 ops/s -# Warmup Iteration 4: 1293369.680 ops/s -Iteration 1: 1295617.146 ops/s -Iteration 2: 1298043.524 ops/s -Iteration 3: 1294242.566 ops/s -Iteration 4: 1297634.860 ops/s - -# Run progress: 10.56% complete, ETA 01:48:13 -# Fork: 4 of 4 -# Warmup Iteration 1: 1221082.026 ops/s -# Warmup Iteration 2: 1286401.192 ops/s -# Warmup Iteration 3: 1289628.368 ops/s -# Warmup Iteration 4: 1288502.090 ops/s -Iteration 1: 1285312.447 ops/s -Iteration 2: 1288392.834 ops/s -Iteration 3: 1285249.446 ops/s -Iteration 4: 1287950.961 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1288411.486 ±(99.9%) 8471.963 ops/s [Average] - (min, avg, max) = (1270587.307, 1288411.486, 1298043.524), stdev = 8320.600 - CI (99.9%): [1279939.524, 1296883.449] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = json4s-jackson) - -# Run progress: 11.11% complete, ETA 01:47:33 -# Fork: 1 of 4 -# Warmup Iteration 1: 154806.323 ops/s -# Warmup Iteration 2: 187155.627 ops/s -# Warmup Iteration 3: 186852.090 ops/s -# Warmup Iteration 4: 186235.418 ops/s -Iteration 1: 186480.345 ops/s -Iteration 2: 187337.474 ops/s -Iteration 3: 187590.988 ops/s -Iteration 4: 186346.483 ops/s - -# Run progress: 11.67% complete, ETA 01:46:53 -# Fork: 2 of 4 -# Warmup Iteration 1: 153648.972 ops/s -# Warmup Iteration 2: 185876.124 ops/s -# Warmup Iteration 3: 185054.943 ops/s -# Warmup Iteration 4: 186086.055 ops/s -Iteration 1: 185867.581 ops/s -Iteration 2: 185841.246 ops/s -Iteration 3: 186139.278 ops/s -Iteration 4: 185059.027 ops/s - -# Run progress: 12.22% complete, ETA 01:46:12 -# Fork: 3 of 4 -# Warmup Iteration 1: 153396.324 ops/s -# Warmup Iteration 2: 184106.938 ops/s -# Warmup Iteration 3: 184137.160 ops/s -# Warmup Iteration 4: 184403.439 ops/s -Iteration 1: 183926.349 ops/s -Iteration 2: 182851.136 ops/s -Iteration 3: 184227.703 ops/s -Iteration 4: 183679.536 ops/s - -# Run progress: 12.78% complete, ETA 01:45:32 -# Fork: 4 of 4 -# Warmup Iteration 1: 155568.235 ops/s -# Warmup Iteration 2: 187643.437 ops/s -# Warmup Iteration 3: 186541.994 ops/s -# Warmup Iteration 4: 187328.578 ops/s -Iteration 1: 187818.514 ops/s -Iteration 2: 187117.694 ops/s -Iteration 3: 187723.280 ops/s -Iteration 4: 187432.842 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 185964.967 ±(99.9%) 1618.865 ops/s [Average] - (min, avg, max) = (182851.136, 185964.967, 187818.514), stdev = 1589.942 - CI (99.9%): [184346.102, 187583.832] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = json4s-native) - -# Run progress: 13.33% complete, ETA 01:44:51 -# Fork: 1 of 4 -# Warmup Iteration 1: 154846.157 ops/s -# Warmup Iteration 2: 198306.798 ops/s -# Warmup Iteration 3: 197465.168 ops/s -# Warmup Iteration 4: 197048.775 ops/s -Iteration 1: 197708.554 ops/s -Iteration 2: 198206.403 ops/s -Iteration 3: 198354.975 ops/s -Iteration 4: 198037.496 ops/s - -# Run progress: 13.89% complete, ETA 01:44:11 -# Fork: 2 of 4 -# Warmup Iteration 1: 154673.936 ops/s -# Warmup Iteration 2: 196339.480 ops/s -# Warmup Iteration 3: 197091.676 ops/s -# Warmup Iteration 4: 196606.875 ops/s -Iteration 1: 197516.443 ops/s -Iteration 2: 197001.343 ops/s -Iteration 3: 196789.065 ops/s -Iteration 4: 196856.867 ops/s - -# Run progress: 14.44% complete, ETA 01:43:31 -# Fork: 3 of 4 -# Warmup Iteration 1: 156069.658 ops/s -# Warmup Iteration 2: 198545.205 ops/s -# Warmup Iteration 3: 199325.944 ops/s -# Warmup Iteration 4: 198810.621 ops/s -Iteration 1: 198119.064 ops/s -Iteration 2: 199012.403 ops/s -Iteration 3: 199303.703 ops/s -Iteration 4: 199683.720 ops/s - -# Run progress: 15.00% complete, ETA 01:42:50 -# Fork: 4 of 4 -# Warmup Iteration 1: 154593.110 ops/s -# Warmup Iteration 2: 195169.539 ops/s -# Warmup Iteration 3: 195667.275 ops/s -# Warmup Iteration 4: 195587.846 ops/s -Iteration 1: 196246.048 ops/s -Iteration 2: 195382.451 ops/s -Iteration 3: 196298.683 ops/s -Iteration 4: 196203.821 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 197545.065 ±(99.9%) 1248.966 ops/s [Average] - (min, avg, max) = (195382.451, 197545.065, 199683.720), stdev = 1226.651 - CI (99.9%): [196296.099, 198794.031] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = play-json) - -# Run progress: 15.56% complete, ETA 01:42:10 -# Fork: 1 of 4 -# Warmup Iteration 1: 169102.423 ops/s -# Warmup Iteration 2: 194890.816 ops/s -# Warmup Iteration 3: 195932.214 ops/s -# Warmup Iteration 4: 195621.930 ops/s -Iteration 1: 196217.995 ops/s -Iteration 2: 193868.369 ops/s -Iteration 3: 195775.642 ops/s -Iteration 4: 194796.624 ops/s - -# Run progress: 16.11% complete, ETA 01:41:30 -# Fork: 2 of 4 -# Warmup Iteration 1: 170370.733 ops/s -# Warmup Iteration 2: 196073.335 ops/s -# Warmup Iteration 3: 197310.486 ops/s -# Warmup Iteration 4: 197828.223 ops/s -Iteration 1: 197769.243 ops/s -Iteration 2: 197605.638 ops/s -Iteration 3: 198627.977 ops/s -Iteration 4: 198133.624 ops/s - -# Run progress: 16.67% complete, ETA 01:40:49 -# Fork: 3 of 4 -# Warmup Iteration 1: 171096.418 ops/s -# Warmup Iteration 2: 196904.131 ops/s -# Warmup Iteration 3: 196921.442 ops/s -# Warmup Iteration 4: 197283.642 ops/s -Iteration 1: 196814.439 ops/s -Iteration 2: 198004.318 ops/s -Iteration 3: 197933.394 ops/s -Iteration 4: 196916.396 ops/s - -# Run progress: 17.22% complete, ETA 01:40:09 -# Fork: 4 of 4 -# Warmup Iteration 1: 171677.138 ops/s -# Warmup Iteration 2: 197989.012 ops/s -# Warmup Iteration 3: 198346.338 ops/s -# Warmup Iteration 4: 198855.563 ops/s -Iteration 1: 198497.314 ops/s -Iteration 2: 198130.641 ops/s -Iteration 3: 198902.511 ops/s -Iteration 4: 198476.821 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 197279.434 ±(99.9%) 1479.226 ops/s [Average] - (min, avg, max) = (193868.369, 197279.434, 198902.511), stdev = 1452.798 - CI (99.9%): [195800.208, 198758.660] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128b, processorName = spray-json) - -# Run progress: 17.78% complete, ETA 01:39:29 -# Fork: 1 of 4 -# Warmup Iteration 1: 387379.695 ops/s -# Warmup Iteration 2: 416699.785 ops/s -# Warmup Iteration 3: 418289.438 ops/s -# Warmup Iteration 4: 416804.385 ops/s -Iteration 1: 417654.254 ops/s -Iteration 2: 416574.386 ops/s -Iteration 3: 418478.738 ops/s -Iteration 4: 418153.971 ops/s - -# Run progress: 18.33% complete, ETA 01:38:48 -# Fork: 2 of 4 -# Warmup Iteration 1: 379160.496 ops/s -# Warmup Iteration 2: 405678.267 ops/s -# Warmup Iteration 3: 406486.675 ops/s -# Warmup Iteration 4: 405735.531 ops/s -Iteration 1: 406139.902 ops/s -Iteration 2: 406504.487 ops/s -Iteration 3: 406035.233 ops/s -Iteration 4: 405954.686 ops/s - -# Run progress: 18.89% complete, ETA 01:38:08 -# Fork: 3 of 4 -# Warmup Iteration 1: 378798.619 ops/s -# Warmup Iteration 2: 406496.852 ops/s -# Warmup Iteration 3: 407139.447 ops/s -# Warmup Iteration 4: 406814.953 ops/s -Iteration 1: 407812.380 ops/s -Iteration 2: 407893.602 ops/s -Iteration 3: 406176.850 ops/s -Iteration 4: 406532.687 ops/s - -# Run progress: 19.44% complete, ETA 01:37:27 -# Fork: 4 of 4 -# Warmup Iteration 1: 378864.928 ops/s -# Warmup Iteration 2: 405032.810 ops/s -# Warmup Iteration 3: 406437.614 ops/s -# Warmup Iteration 4: 405833.565 ops/s -Iteration 1: 404652.147 ops/s -Iteration 2: 404618.262 ops/s -Iteration 3: 406231.233 ops/s -Iteration 4: 405603.766 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 409063.537 ±(99.9%) 5338.225 ops/s [Average] - (min, avg, max) = (404618.262, 409063.537, 418478.738), stdev = 5242.851 - CI (99.9%): [403725.311, 414401.762] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = tethys-jackson) - -# Run progress: 20.00% complete, ETA 01:36:47 -# Fork: 1 of 4 -# Warmup Iteration 1: 202987.369 ops/s -# Warmup Iteration 2: 212762.848 ops/s -# Warmup Iteration 3: 212327.734 ops/s -# Warmup Iteration 4: 212360.676 ops/s -Iteration 1: 214266.826 ops/s -Iteration 2: 214315.621 ops/s -Iteration 3: 213878.807 ops/s -Iteration 4: 213713.772 ops/s - -# Run progress: 20.56% complete, ETA 01:36:07 -# Fork: 2 of 4 -# Warmup Iteration 1: 205770.036 ops/s -# Warmup Iteration 2: 215517.671 ops/s -# Warmup Iteration 3: 215995.490 ops/s -# Warmup Iteration 4: 215690.248 ops/s -Iteration 1: 214972.923 ops/s -Iteration 2: 215774.900 ops/s -Iteration 3: 215473.490 ops/s -Iteration 4: 216096.131 ops/s - -# Run progress: 21.11% complete, ETA 01:35:26 -# Fork: 3 of 4 -# Warmup Iteration 1: 214338.854 ops/s -# Warmup Iteration 2: 222839.531 ops/s -# Warmup Iteration 3: 224244.087 ops/s -# Warmup Iteration 4: 223884.284 ops/s -Iteration 1: 223862.295 ops/s -Iteration 2: 223884.547 ops/s -Iteration 3: 223657.281 ops/s -Iteration 4: 223141.513 ops/s - -# Run progress: 21.67% complete, ETA 01:34:46 -# Fork: 4 of 4 -# Warmup Iteration 1: 218635.403 ops/s -# Warmup Iteration 2: 227338.215 ops/s -# Warmup Iteration 3: 226606.673 ops/s -# Warmup Iteration 4: 227746.670 ops/s -Iteration 1: 227852.674 ops/s -Iteration 2: 227607.072 ops/s -Iteration 3: 227123.372 ops/s -Iteration 4: 228053.878 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 220229.694 ±(99.9%) 5928.676 ops/s [Average] - (min, avg, max) = (213713.772, 220229.694, 228053.878), stdev = 5822.752 - CI (99.9%): [214301.018, 226158.370] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = pure-jackson) - -# Run progress: 22.22% complete, ETA 01:34:06 -# Fork: 1 of 4 -# Warmup Iteration 1: 168109.171 ops/s -# Warmup Iteration 2: 180083.901 ops/s -# Warmup Iteration 3: 179618.685 ops/s -# Warmup Iteration 4: 179588.337 ops/s -Iteration 1: 179578.212 ops/s -Iteration 2: 180036.044 ops/s -Iteration 3: 179466.378 ops/s -Iteration 4: 179631.439 ops/s - -# Run progress: 22.78% complete, ETA 01:33:25 -# Fork: 2 of 4 -# Warmup Iteration 1: 166314.438 ops/s -# Warmup Iteration 2: 179617.581 ops/s -# Warmup Iteration 3: 179431.983 ops/s -# Warmup Iteration 4: 179434.899 ops/s -Iteration 1: 179880.427 ops/s -Iteration 2: 179803.004 ops/s -Iteration 3: 179482.198 ops/s -Iteration 4: 179741.303 ops/s - -# Run progress: 23.33% complete, ETA 01:32:45 -# Fork: 3 of 4 -# Warmup Iteration 1: 167140.259 ops/s -# Warmup Iteration 2: 180139.921 ops/s -# Warmup Iteration 3: 179868.236 ops/s -# Warmup Iteration 4: 180054.273 ops/s -Iteration 1: 180154.377 ops/s -Iteration 2: 180180.815 ops/s -Iteration 3: 179924.645 ops/s -Iteration 4: 179902.646 ops/s - -# Run progress: 23.89% complete, ETA 01:32:05 -# Fork: 4 of 4 -# Warmup Iteration 1: 165255.943 ops/s -# Warmup Iteration 2: 179315.423 ops/s -# Warmup Iteration 3: 178914.881 ops/s -# Warmup Iteration 4: 179001.033 ops/s -Iteration 1: 178814.877 ops/s -Iteration 2: 178806.418 ops/s -Iteration 3: 179380.087 ops/s -Iteration 4: 179222.022 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 179625.306 ±(99.9%) 426.507 ops/s [Average] - (min, avg, max) = (178806.418, 179625.306, 180180.815), stdev = 418.887 - CI (99.9%): [179198.799, 180051.812] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = circe) - -# Run progress: 24.44% complete, ETA 01:31:24 -# Fork: 1 of 4 -# Warmup Iteration 1: 79446.474 ops/s -# Warmup Iteration 2: 85482.835 ops/s -# Warmup Iteration 3: 85293.627 ops/s -# Warmup Iteration 4: 85469.484 ops/s -Iteration 1: 85581.448 ops/s -Iteration 2: 85445.544 ops/s -Iteration 3: 85213.711 ops/s -Iteration 4: 85120.908 ops/s - -# Run progress: 25.00% complete, ETA 01:30:44 -# Fork: 2 of 4 -# Warmup Iteration 1: 80174.570 ops/s -# Warmup Iteration 2: 86427.779 ops/s -# Warmup Iteration 3: 86126.710 ops/s -# Warmup Iteration 4: 86628.290 ops/s -Iteration 1: 86804.037 ops/s -Iteration 2: 86440.184 ops/s -Iteration 3: 86548.537 ops/s -Iteration 4: 86749.147 ops/s - -# Run progress: 25.56% complete, ETA 01:30:04 -# Fork: 3 of 4 -# Warmup Iteration 1: 80485.259 ops/s -# Warmup Iteration 2: 86380.052 ops/s -# Warmup Iteration 3: 86449.518 ops/s -# Warmup Iteration 4: 86448.132 ops/s -Iteration 1: 86342.103 ops/s -Iteration 2: 86784.809 ops/s -Iteration 3: 86540.827 ops/s -Iteration 4: 86706.092 ops/s - -# Run progress: 26.11% complete, ETA 01:29:23 -# Fork: 4 of 4 -# Warmup Iteration 1: 80386.966 ops/s -# Warmup Iteration 2: 86459.070 ops/s -# Warmup Iteration 3: 86644.141 ops/s -# Warmup Iteration 4: 86503.524 ops/s -Iteration 1: 86670.415 ops/s -Iteration 2: 86698.229 ops/s -Iteration 3: 86675.889 ops/s -Iteration 4: 86383.399 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 86294.080 ±(99.9%) 602.778 ops/s [Average] - (min, avg, max) = (85120.908, 86294.080, 86804.037), stdev = 592.008 - CI (99.9%): [85691.302, 86896.858] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = java.lang.StringBuilder) - -# Run progress: 26.67% complete, ETA 01:28:43 -# Fork: 1 of 4 -# Warmup Iteration 1: 207045.356 ops/s -# Warmup Iteration 2: 216409.194 ops/s -# Warmup Iteration 3: 215776.688 ops/s -# Warmup Iteration 4: 215981.910 ops/s -Iteration 1: 216534.408 ops/s -Iteration 2: 214989.686 ops/s -Iteration 3: 216772.748 ops/s -Iteration 4: 215752.229 ops/s - -# Run progress: 27.22% complete, ETA 01:28:03 -# Fork: 2 of 4 -# Warmup Iteration 1: 169686.634 ops/s -# Warmup Iteration 2: 179946.314 ops/s -# Warmup Iteration 3: 179975.535 ops/s -# Warmup Iteration 4: 179708.770 ops/s -Iteration 1: 180130.367 ops/s -Iteration 2: 180182.741 ops/s -Iteration 3: 179703.770 ops/s -Iteration 4: 179809.822 ops/s - -# Run progress: 27.78% complete, ETA 01:27:22 -# Fork: 3 of 4 -# Warmup Iteration 1: 206481.890 ops/s -# Warmup Iteration 2: 213214.423 ops/s -# Warmup Iteration 3: 214691.935 ops/s -# Warmup Iteration 4: 213974.409 ops/s -Iteration 1: 214775.106 ops/s -Iteration 2: 213976.309 ops/s -Iteration 3: 214933.911 ops/s -Iteration 4: 215007.133 ops/s - -# Run progress: 28.33% complete, ETA 01:26:42 -# Fork: 4 of 4 -# Warmup Iteration 1: 169997.289 ops/s -# Warmup Iteration 2: 180793.602 ops/s -# Warmup Iteration 3: 181573.400 ops/s -# Warmup Iteration 4: 181324.651 ops/s -Iteration 1: 181071.033 ops/s -Iteration 2: 181221.412 ops/s -Iteration 3: 180533.700 ops/s -Iteration 4: 181889.980 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 197955.272 ±(99.9%) 18303.811 ops/s [Average] - (min, avg, max) = (179703.770, 197955.272, 216772.748), stdev = 17976.789 - CI (99.9%): [179651.462, 216259.083] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = scala.StringBuilder) - -# Run progress: 28.89% complete, ETA 01:26:02 -# Fork: 1 of 4 -# Warmup Iteration 1: 178247.569 ops/s -# Warmup Iteration 2: 189056.219 ops/s -# Warmup Iteration 3: 189468.201 ops/s -# Warmup Iteration 4: 188604.499 ops/s -Iteration 1: 190040.620 ops/s -Iteration 2: 189941.382 ops/s -Iteration 3: 189737.018 ops/s -Iteration 4: 188728.221 ops/s - -# Run progress: 29.44% complete, ETA 01:25:21 -# Fork: 2 of 4 -# Warmup Iteration 1: 183730.630 ops/s -# Warmup Iteration 2: 190413.974 ops/s -# Warmup Iteration 3: 190637.997 ops/s -# Warmup Iteration 4: 191151.819 ops/s -Iteration 1: 190689.474 ops/s -Iteration 2: 190790.633 ops/s -Iteration 3: 190652.924 ops/s -Iteration 4: 190316.807 ops/s - -# Run progress: 30.00% complete, ETA 01:24:41 -# Fork: 3 of 4 -# Warmup Iteration 1: 177607.079 ops/s -# Warmup Iteration 2: 189021.346 ops/s -# Warmup Iteration 3: 188809.357 ops/s -# Warmup Iteration 4: 189656.902 ops/s -Iteration 1: 189969.694 ops/s -Iteration 2: 188744.917 ops/s -Iteration 3: 188695.357 ops/s -Iteration 4: 189438.994 ops/s - -# Run progress: 30.56% complete, ETA 01:24:01 -# Fork: 4 of 4 -# Warmup Iteration 1: 208666.519 ops/s -# Warmup Iteration 2: 215436.305 ops/s -# Warmup Iteration 3: 216117.806 ops/s -# Warmup Iteration 4: 215662.888 ops/s -Iteration 1: 216475.869 ops/s -Iteration 2: 216321.406 ops/s -Iteration 3: 217199.601 ops/s -Iteration 4: 216134.277 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 196492.325 ±(99.9%) 12187.468 ops/s [Average] - (min, avg, max) = (188695.357, 196492.325, 217199.601), stdev = 11969.723 - CI (99.9%): [184304.857, 208679.793] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = json4s-jackson) - -# Run progress: 31.11% complete, ETA 01:23:21 -# Fork: 1 of 4 -# Warmup Iteration 1: 20645.040 ops/s -# Warmup Iteration 2: 24272.781 ops/s -# Warmup Iteration 3: 24647.755 ops/s -# Warmup Iteration 4: 24628.054 ops/s -Iteration 1: 24555.414 ops/s -Iteration 2: 24600.644 ops/s -Iteration 3: 24579.659 ops/s -Iteration 4: 24554.091 ops/s - -# Run progress: 31.67% complete, ETA 01:22:40 -# Fork: 2 of 4 -# Warmup Iteration 1: 20693.269 ops/s -# Warmup Iteration 2: 24457.056 ops/s -# Warmup Iteration 3: 24547.088 ops/s -# Warmup Iteration 4: 24655.423 ops/s -Iteration 1: 24610.039 ops/s -Iteration 2: 24577.609 ops/s -Iteration 3: 24604.727 ops/s -Iteration 4: 24558.405 ops/s - -# Run progress: 32.22% complete, ETA 01:22:00 -# Fork: 3 of 4 -# Warmup Iteration 1: 20434.618 ops/s -# Warmup Iteration 2: 24624.511 ops/s -# Warmup Iteration 3: 24566.471 ops/s -# Warmup Iteration 4: 24503.394 ops/s -Iteration 1: 24654.525 ops/s -Iteration 2: 24645.585 ops/s -Iteration 3: 24647.062 ops/s -Iteration 4: 24635.555 ops/s - -# Run progress: 32.78% complete, ETA 01:21:20 -# Fork: 4 of 4 -# Warmup Iteration 1: 20588.756 ops/s -# Warmup Iteration 2: 24547.243 ops/s -# Warmup Iteration 3: 24705.374 ops/s -# Warmup Iteration 4: 24557.504 ops/s -Iteration 1: 24606.570 ops/s -Iteration 2: 24505.143 ops/s -Iteration 3: 24642.512 ops/s -Iteration 4: 24585.880 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 24597.714 ±(99.9%) 42.682 ops/s [Average] - (min, avg, max) = (24505.143, 24597.714, 24654.525), stdev = 41.919 - CI (99.9%): [24555.032, 24640.396] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = json4s-native) - -# Run progress: 33.33% complete, ETA 01:20:39 -# Fork: 1 of 4 -# Warmup Iteration 1: 19759.788 ops/s -# Warmup Iteration 2: 25678.630 ops/s -# Warmup Iteration 3: 25771.581 ops/s -# Warmup Iteration 4: 25775.722 ops/s -Iteration 1: 25798.534 ops/s -Iteration 2: 25718.602 ops/s -Iteration 3: 25754.940 ops/s -Iteration 4: 25716.271 ops/s - -# Run progress: 33.89% complete, ETA 01:19:59 -# Fork: 2 of 4 -# Warmup Iteration 1: 19625.983 ops/s -# Warmup Iteration 2: 25359.446 ops/s -# Warmup Iteration 3: 25401.433 ops/s -# Warmup Iteration 4: 25403.106 ops/s -Iteration 1: 25385.563 ops/s -Iteration 2: 25434.339 ops/s -Iteration 3: 25396.677 ops/s -Iteration 4: 25406.421 ops/s - -# Run progress: 34.44% complete, ETA 01:19:19 -# Fork: 3 of 4 -# Warmup Iteration 1: 19861.001 ops/s -# Warmup Iteration 2: 25580.319 ops/s -# Warmup Iteration 3: 25644.706 ops/s -# Warmup Iteration 4: 25463.861 ops/s -Iteration 1: 25440.568 ops/s -Iteration 2: 25546.991 ops/s -Iteration 3: 25473.644 ops/s -Iteration 4: 25417.017 ops/s - -# Run progress: 35.00% complete, ETA 01:18:38 -# Fork: 4 of 4 -# Warmup Iteration 1: 19836.642 ops/s -# Warmup Iteration 2: 25574.516 ops/s -# Warmup Iteration 3: 25583.444 ops/s -# Warmup Iteration 4: 25555.838 ops/s -Iteration 1: 25485.946 ops/s -Iteration 2: 25532.919 ops/s -Iteration 3: 25537.598 ops/s -Iteration 4: 25536.602 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 25536.414 ±(99.9%) 139.522 ops/s [Average] - (min, avg, max) = (25385.563, 25536.414, 25798.534), stdev = 137.030 - CI (99.9%): [25396.892, 25675.937] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = play-json) - -# Run progress: 35.56% complete, ETA 01:17:58 -# Fork: 1 of 4 -# Warmup Iteration 1: 24836.903 ops/s -# Warmup Iteration 2: 28495.919 ops/s -# Warmup Iteration 3: 28419.644 ops/s -# Warmup Iteration 4: 28487.904 ops/s -Iteration 1: 28574.511 ops/s -Iteration 2: 28585.115 ops/s -Iteration 3: 28578.492 ops/s -Iteration 4: 28556.073 ops/s - -# Run progress: 36.11% complete, ETA 01:17:18 -# Fork: 2 of 4 -# Warmup Iteration 1: 24777.300 ops/s -# Warmup Iteration 2: 28263.690 ops/s -# Warmup Iteration 3: 28295.366 ops/s -# Warmup Iteration 4: 28339.473 ops/s -Iteration 1: 28333.425 ops/s -Iteration 2: 28364.127 ops/s -Iteration 3: 28417.088 ops/s -Iteration 4: 28147.883 ops/s - -# Run progress: 36.67% complete, ETA 01:16:37 -# Fork: 3 of 4 -# Warmup Iteration 1: 24632.391 ops/s -# Warmup Iteration 2: 28222.308 ops/s -# Warmup Iteration 3: 28260.278 ops/s -# Warmup Iteration 4: 28332.390 ops/s -Iteration 1: 28323.834 ops/s -Iteration 2: 28262.811 ops/s -Iteration 3: 28264.520 ops/s -Iteration 4: 28308.230 ops/s - -# Run progress: 37.22% complete, ETA 01:15:57 -# Fork: 4 of 4 -# Warmup Iteration 1: 22478.021 ops/s -# Warmup Iteration 2: 25741.699 ops/s -# Warmup Iteration 3: 25744.631 ops/s -# Warmup Iteration 4: 25644.142 ops/s -Iteration 1: 25671.442 ops/s -Iteration 2: 25737.389 ops/s -Iteration 3: 25708.289 ops/s -Iteration 4: 25663.185 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 27718.526 ±(99.9%) 1235.370 ops/s [Average] - (min, avg, max) = (25663.185, 27718.526, 28585.115), stdev = 1213.298 - CI (99.9%): [26483.156, 28953.896] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1kb, processorName = spray-json) - -# Run progress: 37.78% complete, ETA 01:15:17 -# Fork: 1 of 4 -# Warmup Iteration 1: 50874.323 ops/s -# Warmup Iteration 2: 54978.050 ops/s -# Warmup Iteration 3: 54892.712 ops/s -# Warmup Iteration 4: 54886.155 ops/s -Iteration 1: 54946.717 ops/s -Iteration 2: 54799.975 ops/s -Iteration 3: 55045.661 ops/s -Iteration 4: 54976.491 ops/s - -# Run progress: 38.33% complete, ETA 01:14:36 -# Fork: 2 of 4 -# Warmup Iteration 1: 50834.842 ops/s -# Warmup Iteration 2: 54455.354 ops/s -# Warmup Iteration 3: 54502.562 ops/s -# Warmup Iteration 4: 54702.476 ops/s -Iteration 1: 53056.969 ops/s -Iteration 2: 54549.541 ops/s -Iteration 3: 54578.880 ops/s -Iteration 4: 54674.412 ops/s - -# Run progress: 38.89% complete, ETA 01:13:56 -# Fork: 3 of 4 -# Warmup Iteration 1: 49841.882 ops/s -# Warmup Iteration 2: 53466.696 ops/s -# Warmup Iteration 3: 53424.531 ops/s -# Warmup Iteration 4: 53451.177 ops/s -Iteration 1: 53587.678 ops/s -Iteration 2: 53437.370 ops/s -Iteration 3: 53525.545 ops/s -Iteration 4: 53618.467 ops/s - -# Run progress: 39.44% complete, ETA 01:13:16 -# Fork: 4 of 4 -# Warmup Iteration 1: 50974.115 ops/s -# Warmup Iteration 2: 54212.539 ops/s -# Warmup Iteration 3: 54504.230 ops/s -# Warmup Iteration 4: 54719.222 ops/s -Iteration 1: 54741.890 ops/s -Iteration 2: 54448.861 ops/s -Iteration 3: 54272.466 ops/s -Iteration 4: 54589.896 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 54303.176 ±(99.9%) 650.639 ops/s [Average] - (min, avg, max) = (53056.969, 54303.176, 55045.661), stdev = 639.014 - CI (99.9%): [53652.537, 54953.815] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = tethys-jackson) - -# Run progress: 40.00% complete, ETA 01:12:35 -# Fork: 1 of 4 -# Warmup Iteration 1: 1549.526 ops/s -# Warmup Iteration 2: 1635.939 ops/s -# Warmup Iteration 3: 1629.785 ops/s -# Warmup Iteration 4: 1635.237 ops/s -Iteration 1: 1635.964 ops/s -Iteration 2: 1638.222 ops/s -Iteration 3: 1636.740 ops/s -Iteration 4: 1636.265 ops/s - -# Run progress: 40.56% complete, ETA 01:11:55 -# Fork: 2 of 4 -# Warmup Iteration 1: 1563.369 ops/s -# Warmup Iteration 2: 1645.668 ops/s -# Warmup Iteration 3: 1632.805 ops/s -# Warmup Iteration 4: 1649.701 ops/s -Iteration 1: 1644.917 ops/s -Iteration 2: 1645.265 ops/s -Iteration 3: 1644.613 ops/s -Iteration 4: 1643.456 ops/s - -# Run progress: 41.11% complete, ETA 01:11:15 -# Fork: 3 of 4 -# Warmup Iteration 1: 1558.644 ops/s -# Warmup Iteration 2: 1638.649 ops/s -# Warmup Iteration 3: 1645.406 ops/s -# Warmup Iteration 4: 1633.959 ops/s -Iteration 1: 1640.376 ops/s -Iteration 2: 1639.006 ops/s -Iteration 3: 1635.088 ops/s -Iteration 4: 1646.418 ops/s - -# Run progress: 41.67% complete, ETA 01:10:34 -# Fork: 4 of 4 -# Warmup Iteration 1: 1568.247 ops/s -# Warmup Iteration 2: 1645.180 ops/s -# Warmup Iteration 3: 1644.308 ops/s -# Warmup Iteration 4: 1647.672 ops/s -Iteration 1: 1641.314 ops/s -Iteration 2: 1644.392 ops/s -Iteration 3: 1646.020 ops/s -Iteration 4: 1639.581 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1641.102 ±(99.9%) 4.018 ops/s [Average] - (min, avg, max) = (1635.088, 1641.102, 1646.418), stdev = 3.946 - CI (99.9%): [1637.085, 1645.120] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = pure-jackson) - -# Run progress: 42.22% complete, ETA 01:09:54 -# Fork: 1 of 4 -# Warmup Iteration 1: 1712.301 ops/s -# Warmup Iteration 2: 1867.483 ops/s -# Warmup Iteration 3: 1868.224 ops/s -# Warmup Iteration 4: 1864.577 ops/s -Iteration 1: 1869.416 ops/s -Iteration 2: 1863.221 ops/s -Iteration 3: 1872.932 ops/s -Iteration 4: 1872.176 ops/s - -# Run progress: 42.78% complete, ETA 01:09:14 -# Fork: 2 of 4 -# Warmup Iteration 1: 1705.681 ops/s -# Warmup Iteration 2: 1864.718 ops/s -# Warmup Iteration 3: 1869.532 ops/s -# Warmup Iteration 4: 1865.020 ops/s -Iteration 1: 1868.429 ops/s -Iteration 2: 1864.628 ops/s -Iteration 3: 1869.324 ops/s -Iteration 4: 1863.924 ops/s - -# Run progress: 43.33% complete, ETA 01:08:33 -# Fork: 3 of 4 -# Warmup Iteration 1: 1736.068 ops/s -# Warmup Iteration 2: 1904.996 ops/s -# Warmup Iteration 3: 1891.212 ops/s -# Warmup Iteration 4: 1892.258 ops/s -Iteration 1: 1894.984 ops/s -Iteration 2: 1899.309 ops/s -Iteration 3: 1898.148 ops/s -Iteration 4: 1893.423 ops/s - -# Run progress: 43.89% complete, ETA 01:07:53 -# Fork: 4 of 4 -# Warmup Iteration 1: 1712.178 ops/s -# Warmup Iteration 2: 1871.128 ops/s -# Warmup Iteration 3: 1869.793 ops/s -# Warmup Iteration 4: 1869.002 ops/s -Iteration 1: 1874.829 ops/s -Iteration 2: 1873.656 ops/s -Iteration 3: 1871.487 ops/s -Iteration 4: 1871.939 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1876.364 ±(99.9%) 12.737 ops/s [Average] - (min, avg, max) = (1863.221, 1876.364, 1899.309), stdev = 12.509 - CI (99.9%): [1863.627, 1889.101] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = circe) - -# Run progress: 44.44% complete, ETA 01:07:13 -# Fork: 1 of 4 -# Warmup Iteration 1: 580.143 ops/s -# Warmup Iteration 2: 626.254 ops/s -# Warmup Iteration 3: 626.667 ops/s -# Warmup Iteration 4: 624.999 ops/s -Iteration 1: 625.210 ops/s -Iteration 2: 626.905 ops/s -Iteration 3: 614.566 ops/s -Iteration 4: 605.721 ops/s - -# Run progress: 45.00% complete, ETA 01:06:33 -# Fork: 2 of 4 -# Warmup Iteration 1: 567.232 ops/s -# Warmup Iteration 2: 610.816 ops/s -# Warmup Iteration 3: 609.712 ops/s -# Warmup Iteration 4: 608.944 ops/s -Iteration 1: 608.108 ops/s -Iteration 2: 607.511 ops/s -Iteration 3: 608.627 ops/s -Iteration 4: 609.325 ops/s - -# Run progress: 45.56% complete, ETA 01:05:52 -# Fork: 3 of 4 -# Warmup Iteration 1: 581.071 ops/s -# Warmup Iteration 2: 627.247 ops/s -# Warmup Iteration 3: 628.761 ops/s -# Warmup Iteration 4: 626.628 ops/s -Iteration 1: 628.661 ops/s -Iteration 2: 626.921 ops/s -Iteration 3: 628.163 ops/s -Iteration 4: 626.228 ops/s - -# Run progress: 46.11% complete, ETA 01:05:12 -# Fork: 4 of 4 -# Warmup Iteration 1: 567.120 ops/s -# Warmup Iteration 2: 609.463 ops/s -# Warmup Iteration 3: 611.249 ops/s -# Warmup Iteration 4: 610.653 ops/s -Iteration 1: 609.709 ops/s -Iteration 2: 610.665 ops/s -Iteration 3: 611.833 ops/s -Iteration 4: 611.391 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 616.222 ±(99.9%) 9.041 ops/s [Average] - (min, avg, max) = (605.721, 616.222, 628.661), stdev = 8.880 - CI (99.9%): [607.180, 625.263] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = java.lang.StringBuilder) - -# Run progress: 46.67% complete, ETA 01:04:32 -# Fork: 1 of 4 -# Warmup Iteration 1: 1679.755 ops/s -# Warmup Iteration 2: 1767.680 ops/s -# Warmup Iteration 3: 1774.238 ops/s -# Warmup Iteration 4: 1772.103 ops/s -Iteration 1: 1778.501 ops/s -Iteration 2: 1771.326 ops/s -Iteration 3: 1768.477 ops/s -Iteration 4: 1774.345 ops/s - -# Run progress: 47.22% complete, ETA 01:03:51 -# Fork: 2 of 4 -# Warmup Iteration 1: 1364.506 ops/s -# Warmup Iteration 2: 1448.694 ops/s -# Warmup Iteration 3: 1454.547 ops/s -# Warmup Iteration 4: 1448.981 ops/s -Iteration 1: 1451.274 ops/s -Iteration 2: 1454.661 ops/s -Iteration 3: 1453.331 ops/s -Iteration 4: 1459.166 ops/s - -# Run progress: 47.78% complete, ETA 01:03:11 -# Fork: 3 of 4 -# Warmup Iteration 1: 1345.964 ops/s -# Warmup Iteration 2: 1448.572 ops/s -# Warmup Iteration 3: 1446.434 ops/s -# Warmup Iteration 4: 1445.374 ops/s -Iteration 1: 1451.572 ops/s -Iteration 2: 1443.786 ops/s -Iteration 3: 1441.610 ops/s -Iteration 4: 1446.448 ops/s - -# Run progress: 48.33% complete, ETA 01:02:31 -# Fork: 4 of 4 -# Warmup Iteration 1: 1367.701 ops/s -# Warmup Iteration 2: 1432.138 ops/s -# Warmup Iteration 3: 1437.179 ops/s -# Warmup Iteration 4: 1436.122 ops/s -Iteration 1: 1434.144 ops/s -Iteration 2: 1436.369 ops/s -Iteration 3: 1435.954 ops/s -Iteration 4: 1432.670 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1527.102 ±(99.9%) 149.609 ops/s [Average] - (min, avg, max) = (1432.670, 1527.102, 1778.501), stdev = 146.936 - CI (99.9%): [1377.493, 1676.711] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = scala.StringBuilder) - -# Run progress: 48.89% complete, ETA 01:01:51 -# Fork: 1 of 4 -# Warmup Iteration 1: 1576.214 ops/s -# Warmup Iteration 2: 1657.310 ops/s -# Warmup Iteration 3: 1666.518 ops/s -# Warmup Iteration 4: 1672.281 ops/s -Iteration 1: 1662.205 ops/s -Iteration 2: 1665.225 ops/s -Iteration 3: 1670.891 ops/s -Iteration 4: 1671.152 ops/s - -# Run progress: 49.44% complete, ETA 01:01:10 -# Fork: 2 of 4 -# Warmup Iteration 1: 1434.904 ops/s -# Warmup Iteration 2: 1500.416 ops/s -# Warmup Iteration 3: 1504.333 ops/s -# Warmup Iteration 4: 1500.028 ops/s -Iteration 1: 1494.151 ops/s -Iteration 2: 1501.092 ops/s -Iteration 3: 1498.210 ops/s -Iteration 4: 1503.057 ops/s - -# Run progress: 50.00% complete, ETA 01:00:30 -# Fork: 3 of 4 -# Warmup Iteration 1: 1477.385 ops/s -# Warmup Iteration 2: 1549.352 ops/s -# Warmup Iteration 3: 1557.786 ops/s -# Warmup Iteration 4: 1555.632 ops/s -Iteration 1: 1553.740 ops/s -Iteration 2: 1563.187 ops/s -Iteration 3: 1556.817 ops/s -Iteration 4: 1559.213 ops/s - -# Run progress: 50.56% complete, ETA 00:59:50 -# Fork: 4 of 4 -# Warmup Iteration 1: 1328.770 ops/s -# Warmup Iteration 2: 1398.774 ops/s -# Warmup Iteration 3: 1404.563 ops/s -# Warmup Iteration 4: 1398.455 ops/s -Iteration 1: 1400.186 ops/s -Iteration 2: 1400.370 ops/s -Iteration 3: 1400.646 ops/s -Iteration 4: 1401.578 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 1531.357 ±(99.9%) 101.644 ops/s [Average] - (min, avg, max) = (1400.186, 1531.357, 1671.152), stdev = 99.828 - CI (99.9%): [1429.714, 1633.001] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = json4s-jackson) - -# Run progress: 51.11% complete, ETA 00:59:09 -# Fork: 1 of 4 -# Warmup Iteration 1: 148.093 ops/s -# Warmup Iteration 2: 177.736 ops/s -# Warmup Iteration 3: 178.237 ops/s -# Warmup Iteration 4: 178.026 ops/s -Iteration 1: 178.236 ops/s -Iteration 2: 177.187 ops/s -Iteration 3: 177.771 ops/s -Iteration 4: 178.771 ops/s - -# Run progress: 51.67% complete, ETA 00:58:29 -# Fork: 2 of 4 -# Warmup Iteration 1: 149.438 ops/s -# Warmup Iteration 2: 179.606 ops/s -# Warmup Iteration 3: 179.188 ops/s -# Warmup Iteration 4: 179.761 ops/s -Iteration 1: 178.283 ops/s -Iteration 2: 179.130 ops/s -Iteration 3: 179.133 ops/s -Iteration 4: 179.627 ops/s - -# Run progress: 52.22% complete, ETA 00:57:49 -# Fork: 3 of 4 -# Warmup Iteration 1: 142.569 ops/s -# Warmup Iteration 2: 178.422 ops/s -# Warmup Iteration 3: 177.258 ops/s -# Warmup Iteration 4: 178.390 ops/s -Iteration 1: 177.782 ops/s -Iteration 2: 178.197 ops/s -Iteration 3: 178.268 ops/s -Iteration 4: 177.627 ops/s - -# Run progress: 52.78% complete, ETA 00:57:08 -# Fork: 4 of 4 -# Warmup Iteration 1: 142.837 ops/s -# Warmup Iteration 2: 178.777 ops/s -# Warmup Iteration 3: 178.469 ops/s -# Warmup Iteration 4: 177.665 ops/s -Iteration 1: 178.542 ops/s -Iteration 2: 176.869 ops/s -Iteration 3: 178.368 ops/s -Iteration 4: 178.974 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 178.298 ±(99.9%) 0.752 ops/s [Average] - (min, avg, max) = (176.869, 178.298, 179.627), stdev = 0.739 - CI (99.9%): [177.546, 179.050] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = json4s-native) - -# Run progress: 53.33% complete, ETA 00:56:28 -# Fork: 1 of 4 -# Warmup Iteration 1: 149.121 ops/s -# Warmup Iteration 2: 194.141 ops/s -# Warmup Iteration 3: 194.478 ops/s -# Warmup Iteration 4: 194.552 ops/s -Iteration 1: 194.119 ops/s -Iteration 2: 194.150 ops/s -Iteration 3: 194.500 ops/s -Iteration 4: 194.068 ops/s - -# Run progress: 53.89% complete, ETA 00:55:48 -# Fork: 2 of 4 -# Warmup Iteration 1: 146.138 ops/s -# Warmup Iteration 2: 193.764 ops/s -# Warmup Iteration 3: 193.108 ops/s -# Warmup Iteration 4: 193.438 ops/s -Iteration 1: 194.215 ops/s -Iteration 2: 193.276 ops/s -Iteration 3: 193.791 ops/s -Iteration 4: 193.762 ops/s - -# Run progress: 54.44% complete, ETA 00:55:08 -# Fork: 3 of 4 -# Warmup Iteration 1: 147.340 ops/s -# Warmup Iteration 2: 195.439 ops/s -# Warmup Iteration 3: 196.127 ops/s -# Warmup Iteration 4: 195.819 ops/s -Iteration 1: 195.903 ops/s -Iteration 2: 195.892 ops/s -Iteration 3: 195.377 ops/s -Iteration 4: 195.913 ops/s - -# Run progress: 55.00% complete, ETA 00:54:27 -# Fork: 4 of 4 -# Warmup Iteration 1: 146.922 ops/s -# Warmup Iteration 2: 194.313 ops/s -# Warmup Iteration 3: 194.735 ops/s -# Warmup Iteration 4: 194.096 ops/s -Iteration 1: 193.989 ops/s -Iteration 2: 194.039 ops/s -Iteration 3: 194.803 ops/s -Iteration 4: 194.914 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 194.544 ±(99.9%) 0.850 ops/s [Average] - (min, avg, max) = (193.276, 194.544, 195.913), stdev = 0.835 - CI (99.9%): [193.694, 195.395] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = play-json) - -# Run progress: 55.56% complete, ETA 00:53:47 -# Fork: 1 of 4 -# Warmup Iteration 1: 184.061 ops/s -# Warmup Iteration 2: 208.903 ops/s -# Warmup Iteration 3: 207.930 ops/s -# Warmup Iteration 4: 208.667 ops/s -Iteration 1: 208.600 ops/s -Iteration 2: 208.828 ops/s -Iteration 3: 208.877 ops/s -Iteration 4: 208.403 ops/s - -# Run progress: 56.11% complete, ETA 00:53:07 -# Fork: 2 of 4 -# Warmup Iteration 1: 181.701 ops/s -# Warmup Iteration 2: 205.926 ops/s -# Warmup Iteration 3: 206.186 ops/s -# Warmup Iteration 4: 205.347 ops/s -Iteration 1: 206.445 ops/s -Iteration 2: 207.610 ops/s -Iteration 3: 206.867 ops/s -Iteration 4: 206.501 ops/s - -# Run progress: 56.67% complete, ETA 00:52:26 -# Fork: 3 of 4 -# Warmup Iteration 1: 185.107 ops/s -# Warmup Iteration 2: 210.133 ops/s -# Warmup Iteration 3: 210.739 ops/s -# Warmup Iteration 4: 210.562 ops/s -Iteration 1: 209.892 ops/s -Iteration 2: 209.972 ops/s -Iteration 3: 210.399 ops/s -Iteration 4: 210.184 ops/s - -# Run progress: 57.22% complete, ETA 00:51:46 -# Fork: 4 of 4 -# Warmup Iteration 1: 184.107 ops/s -# Warmup Iteration 2: 207.617 ops/s -# Warmup Iteration 3: 207.593 ops/s -# Warmup Iteration 4: 207.458 ops/s -Iteration 1: 207.593 ops/s -Iteration 2: 207.060 ops/s -Iteration 3: 207.373 ops/s -Iteration 4: 207.509 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 208.257 ±(99.9%) 1.358 ops/s [Average] - (min, avg, max) = (206.445, 208.257, 210.399), stdev = 1.334 - CI (99.9%): [206.899, 209.616] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 128kb, processorName = spray-json) - -# Run progress: 57.78% complete, ETA 00:51:06 -# Fork: 1 of 4 -# Warmup Iteration 1: 362.129 ops/s -# Warmup Iteration 2: 389.676 ops/s -# Warmup Iteration 3: 390.857 ops/s -# Warmup Iteration 4: 387.909 ops/s -Iteration 1: 387.033 ops/s -Iteration 2: 387.187 ops/s -Iteration 3: 386.782 ops/s -Iteration 4: 387.523 ops/s - -# Run progress: 58.33% complete, ETA 00:50:25 -# Fork: 2 of 4 -# Warmup Iteration 1: 348.262 ops/s -# Warmup Iteration 2: 379.146 ops/s -# Warmup Iteration 3: 380.416 ops/s -# Warmup Iteration 4: 378.226 ops/s -Iteration 1: 378.707 ops/s -Iteration 2: 378.757 ops/s -Iteration 3: 378.079 ops/s -Iteration 4: 379.595 ops/s - -# Run progress: 58.89% complete, ETA 00:49:45 -# Fork: 3 of 4 -# Warmup Iteration 1: 367.130 ops/s -# Warmup Iteration 2: 398.682 ops/s -# Warmup Iteration 3: 397.805 ops/s -# Warmup Iteration 4: 396.909 ops/s -Iteration 1: 395.702 ops/s -Iteration 2: 397.634 ops/s -Iteration 3: 396.414 ops/s -Iteration 4: 397.149 ops/s - -# Run progress: 59.44% complete, ETA 00:49:05 -# Fork: 4 of 4 -# Warmup Iteration 1: 346.197 ops/s -# Warmup Iteration 2: 377.041 ops/s -# Warmup Iteration 3: 376.320 ops/s -# Warmup Iteration 4: 376.340 ops/s -Iteration 1: 376.062 ops/s -Iteration 2: 377.819 ops/s -Iteration 3: 378.126 ops/s -Iteration 4: 376.836 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 384.963 ±(99.9%) 8.194 ops/s [Average] - (min, avg, max) = (376.062, 384.963, 397.634), stdev = 8.048 - CI (99.9%): [376.769, 393.157] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = tethys-jackson) - -# Run progress: 60.00% complete, ETA 00:48:24 -# Fork: 1 of 4 -# Warmup Iteration 1: 186.261 ops/s -# Warmup Iteration 2: 206.047 ops/s -# Warmup Iteration 3: 206.370 ops/s -# Warmup Iteration 4: 205.770 ops/s -Iteration 1: 205.854 ops/s -Iteration 2: 205.540 ops/s -Iteration 3: 205.082 ops/s -Iteration 4: 205.277 ops/s - -# Run progress: 60.56% complete, ETA 00:47:44 -# Fork: 2 of 4 -# Warmup Iteration 1: 186.054 ops/s -# Warmup Iteration 2: 205.863 ops/s -# Warmup Iteration 3: 206.049 ops/s -# Warmup Iteration 4: 205.542 ops/s -Iteration 1: 205.790 ops/s -Iteration 2: 205.643 ops/s -Iteration 3: 205.653 ops/s -Iteration 4: 205.693 ops/s - -# Run progress: 61.11% complete, ETA 00:47:04 -# Fork: 3 of 4 -# Warmup Iteration 1: 187.806 ops/s -# Warmup Iteration 2: 207.806 ops/s -# Warmup Iteration 3: 206.901 ops/s -# Warmup Iteration 4: 205.319 ops/s -Iteration 1: 206.699 ops/s -Iteration 2: 206.870 ops/s -Iteration 3: 207.344 ops/s -Iteration 4: 207.064 ops/s - -# Run progress: 61.67% complete, ETA 00:46:23 -# Fork: 4 of 4 -# Warmup Iteration 1: 185.776 ops/s -# Warmup Iteration 2: 204.723 ops/s -# Warmup Iteration 3: 205.631 ops/s -# Warmup Iteration 4: 205.156 ops/s -Iteration 1: 205.765 ops/s -Iteration 2: 204.793 ops/s -Iteration 3: 206.001 ops/s -Iteration 4: 205.724 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 205.924 ±(99.9%) 0.728 ops/s [Average] - (min, avg, max) = (204.793, 205.924, 207.344), stdev = 0.715 - CI (99.9%): [205.197, 206.652] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = pure-jackson) - -# Run progress: 62.22% complete, ETA 00:45:43 -# Fork: 1 of 4 -# Warmup Iteration 1: 190.163 ops/s -# Warmup Iteration 2: 218.239 ops/s -# Warmup Iteration 3: 220.569 ops/s -# Warmup Iteration 4: 220.637 ops/s -Iteration 1: 221.375 ops/s -Iteration 2: 221.027 ops/s -Iteration 3: 222.418 ops/s -Iteration 4: 221.089 ops/s - -# Run progress: 62.78% complete, ETA 00:45:03 -# Fork: 2 of 4 -# Warmup Iteration 1: 191.897 ops/s -# Warmup Iteration 2: 220.252 ops/s -# Warmup Iteration 3: 222.387 ops/s -# Warmup Iteration 4: 223.051 ops/s -Iteration 1: 222.755 ops/s -Iteration 2: 222.314 ops/s -Iteration 3: 222.223 ops/s -Iteration 4: 222.772 ops/s - -# Run progress: 63.33% complete, ETA 00:44:23 -# Fork: 3 of 4 -# Warmup Iteration 1: 184.059 ops/s -# Warmup Iteration 2: 213.135 ops/s -# Warmup Iteration 3: 215.803 ops/s -# Warmup Iteration 4: 217.171 ops/s -Iteration 1: 216.836 ops/s -Iteration 2: 216.493 ops/s -Iteration 3: 217.465 ops/s -Iteration 4: 216.278 ops/s - -# Run progress: 63.89% complete, ETA 00:43:42 -# Fork: 4 of 4 -# Warmup Iteration 1: 190.518 ops/s -# Warmup Iteration 2: 218.355 ops/s -# Warmup Iteration 3: 220.956 ops/s -# Warmup Iteration 4: 221.329 ops/s -Iteration 1: 220.554 ops/s -Iteration 2: 221.140 ops/s -Iteration 3: 221.555 ops/s -Iteration 4: 221.254 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 220.472 ±(99.9%) 2.354 ops/s [Average] - (min, avg, max) = (216.278, 220.472, 222.772), stdev = 2.312 - CI (99.9%): [218.118, 222.826] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = circe) - -# Run progress: 64.44% complete, ETA 00:43:02 -# Fork: 1 of 4 -# Warmup Iteration 1: 53.238 ops/s -# Warmup Iteration 2: 59.274 ops/s -# Warmup Iteration 3: 59.325 ops/s -# Warmup Iteration 4: 59.597 ops/s -Iteration 1: 59.362 ops/s -Iteration 2: 59.275 ops/s -Iteration 3: 59.056 ops/s -Iteration 4: 59.035 ops/s - -# Run progress: 65.00% complete, ETA 00:42:22 -# Fork: 2 of 4 -# Warmup Iteration 1: 48.934 ops/s -# Warmup Iteration 2: 54.154 ops/s -# Warmup Iteration 3: 53.964 ops/s -# Warmup Iteration 4: 54.138 ops/s -Iteration 1: 54.105 ops/s -Iteration 2: 54.120 ops/s -Iteration 3: 53.899 ops/s -Iteration 4: 53.932 ops/s - -# Run progress: 65.56% complete, ETA 00:41:41 -# Fork: 3 of 4 -# Warmup Iteration 1: 49.294 ops/s -# Warmup Iteration 2: 54.959 ops/s -# Warmup Iteration 3: 55.133 ops/s -# Warmup Iteration 4: 55.128 ops/s -Iteration 1: 55.170 ops/s -Iteration 2: 55.109 ops/s -Iteration 3: 55.021 ops/s -Iteration 4: 55.219 ops/s - -# Run progress: 66.11% complete, ETA 00:41:01 -# Fork: 4 of 4 -# Warmup Iteration 1: 53.033 ops/s -# Warmup Iteration 2: 59.217 ops/s -# Warmup Iteration 3: 59.717 ops/s -# Warmup Iteration 4: 59.485 ops/s -Iteration 1: 59.194 ops/s -Iteration 2: 59.050 ops/s -Iteration 3: 59.166 ops/s -Iteration 4: 59.690 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 56.900 ±(99.9%) 2.489 ops/s [Average] - (min, avg, max) = (53.899, 56.900, 59.690), stdev = 2.444 - CI (99.9%): [54.411, 59.389] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = java.lang.StringBuilder) - -# Run progress: 66.67% complete, ETA 00:40:21 -# Fork: 1 of 4 -# Warmup Iteration 1: 151.831 ops/s -# Warmup Iteration 2: 169.477 ops/s -# Warmup Iteration 3: 169.675 ops/s -# Warmup Iteration 4: 168.480 ops/s -Iteration 1: 169.263 ops/s -Iteration 2: 169.249 ops/s -Iteration 3: 169.207 ops/s -Iteration 4: 169.257 ops/s - -# Run progress: 67.22% complete, ETA 00:39:40 -# Fork: 2 of 4 -# Warmup Iteration 1: 150.657 ops/s -# Warmup Iteration 2: 169.184 ops/s -# Warmup Iteration 3: 169.582 ops/s -# Warmup Iteration 4: 169.254 ops/s -Iteration 1: 169.193 ops/s -Iteration 2: 168.479 ops/s -Iteration 3: 168.710 ops/s -Iteration 4: 169.086 ops/s - -# Run progress: 67.78% complete, ETA 00:39:00 -# Fork: 3 of 4 -# Warmup Iteration 1: 148.267 ops/s -# Warmup Iteration 2: 165.747 ops/s -# Warmup Iteration 3: 166.291 ops/s -# Warmup Iteration 4: 165.973 ops/s -Iteration 1: 165.828 ops/s -Iteration 2: 165.913 ops/s -Iteration 3: 165.855 ops/s -Iteration 4: 165.714 ops/s - -# Run progress: 68.33% complete, ETA 00:38:20 -# Fork: 4 of 4 -# Warmup Iteration 1: 150.371 ops/s -# Warmup Iteration 2: 168.348 ops/s -# Warmup Iteration 3: 168.258 ops/s -# Warmup Iteration 4: 167.459 ops/s -Iteration 1: 167.254 ops/s -Iteration 2: 168.210 ops/s -Iteration 3: 168.176 ops/s -Iteration 4: 168.304 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 167.981 ±(99.9%) 1.419 ops/s [Average] - (min, avg, max) = (165.714, 167.981, 169.263), stdev = 1.394 - CI (99.9%): [166.562, 169.400] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = scala.StringBuilder) - -# Run progress: 68.89% complete, ETA 00:37:39 -# Fork: 1 of 4 -# Warmup Iteration 1: 137.943 ops/s -# Warmup Iteration 2: 155.618 ops/s -# Warmup Iteration 3: 155.303 ops/s -# Warmup Iteration 4: 155.765 ops/s -Iteration 1: 155.598 ops/s -Iteration 2: 155.043 ops/s -Iteration 3: 154.985 ops/s -Iteration 4: 155.304 ops/s - -# Run progress: 69.44% complete, ETA 00:36:59 -# Fork: 2 of 4 -# Warmup Iteration 1: 137.534 ops/s -# Warmup Iteration 2: 153.173 ops/s -# Warmup Iteration 3: 153.059 ops/s -# Warmup Iteration 4: 153.505 ops/s -Iteration 1: 153.506 ops/s -Iteration 2: 153.299 ops/s -Iteration 3: 153.666 ops/s -Iteration 4: 153.798 ops/s - -# Run progress: 70.00% complete, ETA 00:36:19 -# Fork: 3 of 4 -# Warmup Iteration 1: 141.288 ops/s -# Warmup Iteration 2: 157.886 ops/s -# Warmup Iteration 3: 157.777 ops/s -# Warmup Iteration 4: 158.263 ops/s -Iteration 1: 158.414 ops/s -Iteration 2: 157.977 ops/s -Iteration 3: 158.081 ops/s -Iteration 4: 157.875 ops/s - -# Run progress: 70.56% complete, ETA 00:35:38 -# Fork: 4 of 4 -# Warmup Iteration 1: 138.485 ops/s -# Warmup Iteration 2: 155.431 ops/s -# Warmup Iteration 3: 155.335 ops/s -# Warmup Iteration 4: 154.951 ops/s -Iteration 1: 155.376 ops/s -Iteration 2: 154.701 ops/s -Iteration 3: 154.709 ops/s -Iteration 4: 154.784 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 155.445 ±(99.9%) 1.749 ops/s [Average] - (min, avg, max) = (153.299, 155.445, 158.414), stdev = 1.718 - CI (99.9%): [153.696, 157.194] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = json4s-jackson) - -# Run progress: 71.11% complete, ETA 00:34:58 -# Fork: 1 of 4 -# Warmup Iteration 1: 17.679 ops/s -# Warmup Iteration 2: 21.420 ops/s -# Warmup Iteration 3: 21.182 ops/s -# Warmup Iteration 4: 21.349 ops/s -Iteration 1: 20.976 ops/s -Iteration 2: 21.279 ops/s -Iteration 3: 21.604 ops/s -Iteration 4: 21.593 ops/s - -# Run progress: 71.67% complete, ETA 00:34:18 -# Fork: 2 of 4 -# Warmup Iteration 1: 16.779 ops/s -# Warmup Iteration 2: 19.771 ops/s -# Warmup Iteration 3: 19.563 ops/s -# Warmup Iteration 4: 19.894 ops/s -Iteration 1: 19.553 ops/s -Iteration 2: 19.894 ops/s -Iteration 3: 20.011 ops/s -Iteration 4: 20.059 ops/s - -# Run progress: 72.22% complete, ETA 00:33:38 -# Fork: 3 of 4 -# Warmup Iteration 1: 16.731 ops/s -# Warmup Iteration 2: 20.112 ops/s -# Warmup Iteration 3: 20.258 ops/s -# Warmup Iteration 4: 20.268 ops/s -Iteration 1: 20.188 ops/s -Iteration 2: 20.177 ops/s -Iteration 3: 20.283 ops/s -Iteration 4: 20.278 ops/s - -# Run progress: 72.78% complete, ETA 00:32:57 -# Fork: 4 of 4 -# Warmup Iteration 1: 16.827 ops/s -# Warmup Iteration 2: 19.995 ops/s -# Warmup Iteration 3: 19.865 ops/s -# Warmup Iteration 4: 19.519 ops/s -Iteration 1: 19.799 ops/s -Iteration 2: 19.974 ops/s -Iteration 3: 20.099 ops/s -Iteration 4: 20.220 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 20.374 ±(99.9%) 0.644 ops/s [Average] - (min, avg, max) = (19.553, 20.374, 21.604), stdev = 0.632 - CI (99.9%): [19.730, 21.018] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = json4s-native) - -# Run progress: 73.33% complete, ETA 00:32:17 -# Fork: 1 of 4 -# Warmup Iteration 1: 16.053 ops/s -# Warmup Iteration 2: 19.980 ops/s -# Warmup Iteration 3: 20.014 ops/s -# Warmup Iteration 4: 19.989 ops/s -Iteration 1: 19.963 ops/s -Iteration 2: 20.003 ops/s -Iteration 3: 20.090 ops/s -Iteration 4: 20.063 ops/s - -# Run progress: 73.89% complete, ETA 00:31:37 -# Fork: 2 of 4 -# Warmup Iteration 1: 17.510 ops/s -# Warmup Iteration 2: 22.474 ops/s -# Warmup Iteration 3: 22.481 ops/s -# Warmup Iteration 4: 22.467 ops/s -Iteration 1: 22.586 ops/s -Iteration 2: 22.580 ops/s -Iteration 3: 22.579 ops/s -Iteration 4: 22.517 ops/s - -# Run progress: 74.44% complete, ETA 00:30:56 -# Fork: 3 of 4 -# Warmup Iteration 1: 15.736 ops/s -# Warmup Iteration 2: 19.774 ops/s -# Warmup Iteration 3: 19.754 ops/s -# Warmup Iteration 4: 19.789 ops/s -Iteration 1: 19.817 ops/s -Iteration 2: 19.708 ops/s -Iteration 3: 19.759 ops/s -Iteration 4: 19.783 ops/s - -# Run progress: 75.00% complete, ETA 00:30:16 -# Fork: 4 of 4 -# Warmup Iteration 1: 17.649 ops/s -# Warmup Iteration 2: 22.542 ops/s -# Warmup Iteration 3: 22.424 ops/s -# Warmup Iteration 4: 22.490 ops/s -Iteration 1: 22.503 ops/s -Iteration 2: 22.442 ops/s -Iteration 3: 22.518 ops/s -Iteration 4: 22.547 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 21.216 ±(99.9%) 1.390 ops/s [Average] - (min, avg, max) = (19.708, 21.216, 22.586), stdev = 1.365 - CI (99.9%): [19.826, 22.606] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = play-json) - -# Run progress: 75.56% complete, ETA 00:29:36 -# Fork: 1 of 4 -# Warmup Iteration 1: 19.112 ops/s -# Warmup Iteration 2: 21.838 ops/s -# Warmup Iteration 3: 21.885 ops/s -# Warmup Iteration 4: 21.866 ops/s -Iteration 1: 21.914 ops/s -Iteration 2: 21.993 ops/s -Iteration 3: 21.855 ops/s -Iteration 4: 21.939 ops/s - -# Run progress: 76.11% complete, ETA 00:28:56 -# Fork: 2 of 4 -# Warmup Iteration 1: 19.570 ops/s -# Warmup Iteration 2: 22.381 ops/s -# Warmup Iteration 3: 22.458 ops/s -# Warmup Iteration 4: 22.460 ops/s -Iteration 1: 22.517 ops/s -Iteration 2: 22.464 ops/s -Iteration 3: 22.439 ops/s -Iteration 4: 22.520 ops/s - -# Run progress: 76.67% complete, ETA 00:28:15 -# Fork: 3 of 4 -# Warmup Iteration 1: 19.715 ops/s -# Warmup Iteration 2: 22.658 ops/s -# Warmup Iteration 3: 22.722 ops/s -# Warmup Iteration 4: 22.685 ops/s -Iteration 1: 22.633 ops/s -Iteration 2: 22.714 ops/s -Iteration 3: 22.623 ops/s -Iteration 4: 22.687 ops/s - -# Run progress: 77.22% complete, ETA 00:27:35 -# Fork: 4 of 4 -# Warmup Iteration 1: 19.659 ops/s -# Warmup Iteration 2: 22.681 ops/s -# Warmup Iteration 3: 22.635 ops/s -# Warmup Iteration 4: 22.743 ops/s -Iteration 1: 22.682 ops/s -Iteration 2: 22.526 ops/s -Iteration 3: 22.724 ops/s -Iteration 4: 22.704 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 22.433 ±(99.9%) 0.323 ops/s [Average] - (min, avg, max) = (21.855, 22.433, 22.724), stdev = 0.317 - CI (99.9%): [22.111, 22.756] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 1mb, processorName = spray-json) - -# Run progress: 77.78% complete, ETA 00:26:55 -# Fork: 1 of 4 -# Warmup Iteration 1: 35.020 ops/s -# Warmup Iteration 2: 39.873 ops/s -# Warmup Iteration 3: 39.969 ops/s -# Warmup Iteration 4: 40.181 ops/s -Iteration 1: 40.194 ops/s -Iteration 2: 40.303 ops/s -Iteration 3: 40.264 ops/s -Iteration 4: 40.277 ops/s - -# Run progress: 78.33% complete, ETA 00:26:14 -# Fork: 2 of 4 -# Warmup Iteration 1: 35.215 ops/s -# Warmup Iteration 2: 39.733 ops/s -# Warmup Iteration 3: 39.701 ops/s -# Warmup Iteration 4: 39.830 ops/s -Iteration 1: 40.019 ops/s -Iteration 2: 39.803 ops/s -Iteration 3: 39.617 ops/s -Iteration 4: 39.725 ops/s - -# Run progress: 78.89% complete, ETA 00:25:34 -# Fork: 3 of 4 -# Warmup Iteration 1: 34.536 ops/s -# Warmup Iteration 2: 38.658 ops/s -# Warmup Iteration 3: 38.731 ops/s -# Warmup Iteration 4: 38.745 ops/s -Iteration 1: 38.830 ops/s -Iteration 2: 38.823 ops/s -Iteration 3: 38.702 ops/s -Iteration 4: 38.705 ops/s - -# Run progress: 79.44% complete, ETA 00:24:54 -# Fork: 4 of 4 -# Warmup Iteration 1: 33.906 ops/s -# Warmup Iteration 2: 38.002 ops/s -# Warmup Iteration 3: 38.379 ops/s -# Warmup Iteration 4: 38.423 ops/s -Iteration 1: 38.549 ops/s -Iteration 2: 38.339 ops/s -Iteration 3: 38.425 ops/s -Iteration 4: 38.503 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 39.317 ±(99.9%) 0.779 ops/s [Average] - (min, avg, max) = (38.339, 39.317, 40.303), stdev = 0.765 - CI (99.9%): [38.538, 40.096] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = tethys-jackson) - -# Run progress: 80.00% complete, ETA 00:24:13 -# Fork: 1 of 4 -# Warmup Iteration 1: 3.089 ops/s -# Warmup Iteration 2: 3.860 ops/s -# Warmup Iteration 3: 3.711 ops/s -# Warmup Iteration 4: 3.558 ops/s -Iteration 1: 3.555 ops/s -Iteration 2: 3.560 ops/s -Iteration 3: 3.554 ops/s -Iteration 4: 3.562 ops/s - -# Run progress: 80.56% complete, ETA 00:23:33 -# Fork: 2 of 4 -# Warmup Iteration 1: 2.808 ops/s -# Warmup Iteration 2: 3.420 ops/s -# Warmup Iteration 3: 3.406 ops/s -# Warmup Iteration 4: 3.426 ops/s -Iteration 1: 3.425 ops/s -Iteration 2: 3.432 ops/s -Iteration 3: 3.419 ops/s -Iteration 4: 3.430 ops/s - -# Run progress: 81.11% complete, ETA 00:22:54 -# Fork: 3 of 4 -# Warmup Iteration 1: 2.993 ops/s -# Warmup Iteration 2: 3.521 ops/s -# Warmup Iteration 3: 3.379 ops/s -# Warmup Iteration 4: 3.525 ops/s -Iteration 1: 3.516 ops/s -Iteration 2: 3.491 ops/s -Iteration 3: 3.520 ops/s -Iteration 4: 3.518 ops/s - -# Run progress: 81.67% complete, ETA 00:22:14 -# Fork: 4 of 4 -# Warmup Iteration 1: 2.834 ops/s -# Warmup Iteration 2: 3.441 ops/s -# Warmup Iteration 3: 3.410 ops/s -# Warmup Iteration 4: 3.444 ops/s -Iteration 1: 3.451 ops/s -Iteration 2: 3.434 ops/s -Iteration 3: 3.440 ops/s -Iteration 4: 3.436 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 3.484 ±(99.9%) 0.057 ops/s [Average] - (min, avg, max) = (3.419, 3.484, 3.562), stdev = 0.056 - CI (99.9%): [3.427, 3.541] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = pure-jackson) - -# Run progress: 82.22% complete, ETA 00:21:34 -# Fork: 1 of 4 -# Warmup Iteration 1: 3.494 ops/s -# Warmup Iteration 2: 4.088 ops/s -# Warmup Iteration 3: 4.014 ops/s -# Warmup Iteration 4: 3.972 ops/s -Iteration 1: 4.006 ops/s -Iteration 2: 4.012 ops/s -Iteration 3: 4.021 ops/s -Iteration 4: 4.020 ops/s - -# Run progress: 82.78% complete, ETA 00:20:54 -# Fork: 2 of 4 -# Warmup Iteration 1: 3.603 ops/s -# Warmup Iteration 2: 4.271 ops/s -# Warmup Iteration 3: 3.956 ops/s -# Warmup Iteration 4: 3.998 ops/s -Iteration 1: 4.020 ops/s -Iteration 2: 4.025 ops/s -Iteration 3: 4.022 ops/s -Iteration 4: 4.018 ops/s - -# Run progress: 83.33% complete, ETA 00:20:14 -# Fork: 3 of 4 -# Warmup Iteration 1: 3.488 ops/s -# Warmup Iteration 2: 3.965 ops/s -# Warmup Iteration 3: 4.017 ops/s -# Warmup Iteration 4: 3.968 ops/s -Iteration 1: 4.015 ops/s -Iteration 2: 3.997 ops/s -Iteration 3: 4.006 ops/s -Iteration 4: 4.013 ops/s - -# Run progress: 83.89% complete, ETA 00:19:34 -# Fork: 4 of 4 -# Warmup Iteration 1: 3.591 ops/s -# Warmup Iteration 2: 4.097 ops/s -# Warmup Iteration 3: 4.018 ops/s -# Warmup Iteration 4: 3.992 ops/s -Iteration 1: 4.012 ops/s -Iteration 2: 4.020 ops/s -Iteration 3: 4.006 ops/s -Iteration 4: 4.015 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 4.014 ±(99.9%) 0.008 ops/s [Average] - (min, avg, max) = (3.997, 4.014, 4.025), stdev = 0.008 - CI (99.9%): [4.007, 4.022] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = circe) - -# Run progress: 84.44% complete, ETA 00:18:54 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.790 ops/s -# Warmup Iteration 2: 0.879 ops/s -# Warmup Iteration 3: 0.848 ops/s -# Warmup Iteration 4: 0.885 ops/s -Iteration 1: 0.696 ops/s -Iteration 2: 0.885 ops/s -Iteration 3: 0.862 ops/s -Iteration 4: 0.880 ops/s - -# Run progress: 85.00% complete, ETA 00:18:15 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.780 ops/s -# Warmup Iteration 2: 0.872 ops/s -# Warmup Iteration 3: 0.678 ops/s -# Warmup Iteration 4: 0.859 ops/s -Iteration 1: 0.862 ops/s -Iteration 2: 0.879 ops/s -Iteration 3: 0.675 ops/s -Iteration 4: 0.854 ops/s - -# Run progress: 85.56% complete, ETA 00:17:35 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.765 ops/s -# Warmup Iteration 2: 0.865 ops/s -# Warmup Iteration 3: 0.887 ops/s -# Warmup Iteration 4: 0.873 ops/s -Iteration 1: 0.864 ops/s -Iteration 2: 0.684 ops/s -Iteration 3: 0.857 ops/s -Iteration 4: 0.709 ops/s - -# Run progress: 86.11% complete, ETA 00:16:56 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.787 ops/s -# Warmup Iteration 2: 0.873 ops/s -# Warmup Iteration 3: 0.880 ops/s -# Warmup Iteration 4: 0.870 ops/s -Iteration 1: 0.872 ops/s -Iteration 2: 0.683 ops/s -Iteration 3: 0.872 ops/s -Iteration 4: 0.685 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 0.801 ±(99.9%) 0.092 ops/s [Average] - (min, avg, max) = (0.675, 0.801, 0.885), stdev = 0.091 - CI (99.9%): [0.709, 0.893] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = java.lang.StringBuilder) - -# Run progress: 86.67% complete, ETA 00:16:16 -# Fork: 1 of 4 -# Warmup Iteration 1: 3.587 ops/s -# Warmup Iteration 2: 4.583 ops/s -# Warmup Iteration 3: 4.384 ops/s -# Warmup Iteration 4: 4.843 ops/s -Iteration 1: 4.530 ops/s -Iteration 2: 4.585 ops/s -Iteration 3: 4.652 ops/s -Iteration 4: 4.728 ops/s - -# Run progress: 87.22% complete, ETA 00:15:36 -# Fork: 2 of 4 -# Warmup Iteration 1: 3.421 ops/s -# Warmup Iteration 2: 4.708 ops/s -# Warmup Iteration 3: 4.422 ops/s -# Warmup Iteration 4: 4.742 ops/s -Iteration 1: 4.738 ops/s -Iteration 2: 4.532 ops/s -Iteration 3: 4.715 ops/s -Iteration 4: 4.870 ops/s - -# Run progress: 87.78% complete, ETA 00:14:55 -# Fork: 3 of 4 -# Warmup Iteration 1: 3.421 ops/s -# Warmup Iteration 2: 4.598 ops/s -# Warmup Iteration 3: 4.868 ops/s -# Warmup Iteration 4: 4.390 ops/s -Iteration 1: 4.306 ops/s -Iteration 2: 4.778 ops/s -Iteration 3: 4.547 ops/s -Iteration 4: 4.563 ops/s - -# Run progress: 88.33% complete, ETA 00:14:15 -# Fork: 4 of 4 -# Warmup Iteration 1: 3.310 ops/s -# Warmup Iteration 2: 4.770 ops/s -# Warmup Iteration 3: 4.707 ops/s -# Warmup Iteration 4: 4.655 ops/s -Iteration 1: 4.640 ops/s -Iteration 2: 4.530 ops/s -Iteration 3: 4.689 ops/s -Iteration 4: 4.660 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 4.629 ±(99.9%) 0.134 ops/s [Average] - (min, avg, max) = (4.306, 4.629, 4.870), stdev = 0.132 - CI (99.9%): [4.495, 4.763] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = scala.StringBuilder) - -# Run progress: 88.89% complete, ETA 00:13:34 -# Fork: 1 of 4 -# Warmup Iteration 1: 3.394 ops/s -# Warmup Iteration 2: 4.348 ops/s -# Warmup Iteration 3: 4.851 ops/s -# Warmup Iteration 4: 4.320 ops/s -Iteration 1: 4.332 ops/s -Iteration 2: 4.810 ops/s -Iteration 3: 4.588 ops/s -Iteration 4: 4.515 ops/s - -# Run progress: 89.44% complete, ETA 00:12:54 -# Fork: 2 of 4 -# Warmup Iteration 1: 3.294 ops/s -# Warmup Iteration 2: 4.542 ops/s -# Warmup Iteration 3: 4.635 ops/s -# Warmup Iteration 4: 4.551 ops/s -Iteration 1: 4.367 ops/s -Iteration 2: 4.627 ops/s -Iteration 3: 4.296 ops/s -Iteration 4: 4.597 ops/s - -# Run progress: 90.00% complete, ETA 00:12:13 -# Fork: 3 of 4 -# Warmup Iteration 1: 3.346 ops/s -# Warmup Iteration 2: 4.644 ops/s -# Warmup Iteration 3: 4.501 ops/s -# Warmup Iteration 4: 4.547 ops/s -Iteration 1: 4.324 ops/s -Iteration 2: 4.489 ops/s -Iteration 3: 4.426 ops/s -Iteration 4: 4.668 ops/s - -# Run progress: 90.56% complete, ETA 00:11:32 -# Fork: 4 of 4 -# Warmup Iteration 1: 3.487 ops/s -# Warmup Iteration 2: 4.502 ops/s -# Warmup Iteration 3: 4.720 ops/s -# Warmup Iteration 4: 4.719 ops/s -Iteration 1: 4.802 ops/s -Iteration 2: 4.585 ops/s -Iteration 3: 4.427 ops/s -Iteration 4: 4.844 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 4.544 ±(99.9%) 0.181 ops/s [Average] - (min, avg, max) = (4.296, 4.544, 4.844), stdev = 0.178 - CI (99.9%): [4.363, 4.724] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = json4s-jackson) - -# Run progress: 91.11% complete, ETA 00:10:52 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.385 ops/s -# Warmup Iteration 2: 0.398 ops/s -# Warmup Iteration 3: 0.390 ops/s -# Warmup Iteration 4: 0.381 ops/s -Iteration 1: 0.373 ops/s -Iteration 2: 0.368 ops/s -Iteration 3: 0.397 ops/s -Iteration 4: 0.375 ops/s - -# Run progress: 91.67% complete, ETA 00:10:11 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.385 ops/s -# Warmup Iteration 2: 0.406 ops/s -# Warmup Iteration 3: 0.399 ops/s -# Warmup Iteration 4: 0.376 ops/s -Iteration 1: 0.364 ops/s -Iteration 2: 0.393 ops/s -Iteration 3: 0.395 ops/s -Iteration 4: 0.387 ops/s - -# Run progress: 92.22% complete, ETA 00:09:31 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.392 ops/s -# Warmup Iteration 2: 0.398 ops/s -# Warmup Iteration 3: 0.392 ops/s -# Warmup Iteration 4: 0.373 ops/s -Iteration 1: 0.364 ops/s -Iteration 2: 0.385 ops/s -Iteration 3: 0.365 ops/s -Iteration 4: 0.382 ops/s - -# Run progress: 92.78% complete, ETA 00:08:51 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.384 ops/s -# Warmup Iteration 2: 0.404 ops/s -# Warmup Iteration 3: 0.387 ops/s -# Warmup Iteration 4: 0.377 ops/s -Iteration 1: 0.365 ops/s -Iteration 2: 0.382 ops/s -Iteration 3: 0.350 ops/s -Iteration 4: 0.385 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 0.377 ±(99.9%) 0.014 ops/s [Average] - (min, avg, max) = (0.350, 0.377, 0.397), stdev = 0.013 - CI (99.9%): [0.363, 0.391] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = json4s-native) - -# Run progress: 93.33% complete, ETA 00:08:10 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.539 ops/s -# Warmup Iteration 2: 0.736 ops/s -# Warmup Iteration 3: 0.636 ops/s -# Warmup Iteration 4: 0.740 ops/s -Iteration 1: 0.720 ops/s -Iteration 2: 0.718 ops/s -Iteration 3: 0.734 ops/s -Iteration 4: 0.718 ops/s - -# Run progress: 93.89% complete, ETA 00:07:30 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.535 ops/s -# Warmup Iteration 2: 0.727 ops/s -# Warmup Iteration 3: 0.649 ops/s -# Warmup Iteration 4: 0.731 ops/s -Iteration 1: 0.731 ops/s -Iteration 2: 0.731 ops/s -Iteration 3: 0.732 ops/s -Iteration 4: 0.731 ops/s - -# Run progress: 94.44% complete, ETA 00:06:49 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.540 ops/s -# Warmup Iteration 2: 0.736 ops/s -# Warmup Iteration 3: 0.638 ops/s -# Warmup Iteration 4: 0.731 ops/s -Iteration 1: 0.732 ops/s -Iteration 2: 0.733 ops/s -Iteration 3: 0.732 ops/s -Iteration 4: 0.733 ops/s - -# Run progress: 95.00% complete, ETA 00:06:08 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.538 ops/s -# Warmup Iteration 2: 0.727 ops/s -# Warmup Iteration 3: 0.638 ops/s -# Warmup Iteration 4: 0.726 ops/s -Iteration 1: 0.726 ops/s -Iteration 2: 0.727 ops/s -Iteration 3: 0.725 ops/s -Iteration 4: 0.727 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 0.728 ±(99.9%) 0.005 ops/s [Average] - (min, avg, max) = (0.718, 0.728, 0.734), stdev = 0.005 - CI (99.9%): [0.723, 0.734] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = play-json) - -# Run progress: 95.56% complete, ETA 00:05:28 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.392 ops/s -# Warmup Iteration 2: 0.443 ops/s -# Warmup Iteration 3: 0.467 ops/s -# Warmup Iteration 4: 0.429 ops/s -Iteration 1: 0.469 ops/s -Iteration 2: 0.443 ops/s -Iteration 3: 0.474 ops/s -Iteration 4: 0.486 ops/s - -# Run progress: 96.11% complete, ETA 00:04:47 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.462 ops/s -# Warmup Iteration 2: 0.465 ops/s -# Warmup Iteration 3: 0.502 ops/s -# Warmup Iteration 4: 0.505 ops/s -Iteration 1: 0.503 ops/s -Iteration 2: 0.498 ops/s -Iteration 3: 0.503 ops/s -Iteration 4: 0.498 ops/s - -# Run progress: 96.67% complete, ETA 00:04:06 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.453 ops/s -# Warmup Iteration 2: 0.467 ops/s -# Warmup Iteration 3: 0.496 ops/s -# Warmup Iteration 4: 0.496 ops/s -Iteration 1: 0.496 ops/s -Iteration 2: 0.497 ops/s -Iteration 3: 0.496 ops/s -Iteration 4: 0.494 ops/s - -# Run progress: 97.22% complete, ETA 00:03:25 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.393 ops/s -# Warmup Iteration 2: 0.451 ops/s -# Warmup Iteration 3: 0.430 ops/s -# Warmup Iteration 4: 0.487 ops/s -Iteration 1: 0.486 ops/s -Iteration 2: 0.497 ops/s -Iteration 3: 0.490 ops/s -Iteration 4: 0.485 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 0.489 ±(99.9%) 0.016 ops/s [Average] - (min, avg, max) = (0.443, 0.489, 0.503), stdev = 0.015 - CI (99.9%): [0.473, 0.504] (assumes normal distribution) - - -# JMH version: 1.21 -# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 -# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java -# VM options: -Xms1G -Xmx1G -# Warmup: 4 iterations, 5 s each -# Measurement: 4 iterations, 5 s each -# Timeout: 10 min per iteration -# Threads: 1 thread, will synchronize iterations -# Benchmark mode: Throughput, ops/time -# Benchmark: json.bench.JmhWriterBench.bench -# Parameters: (jsonSize = 32mb, processorName = spray-json) - -# Run progress: 97.78% complete, ETA 00:02:45 -# Fork: 1 of 4 -# Warmup Iteration 1: 0.502 ops/s -# Warmup Iteration 2: 0.537 ops/s -# Warmup Iteration 3: 0.515 ops/s -# Warmup Iteration 4: 0.507 ops/s -Iteration 1: 0.471 ops/s -Iteration 2: 0.508 ops/s -Iteration 3: 0.509 ops/s -Iteration 4: 0.511 ops/s - -# Run progress: 98.33% complete, ETA 00:02:03 -# Fork: 2 of 4 -# Warmup Iteration 1: 0.462 ops/s -# Warmup Iteration 2: 0.514 ops/s -# Warmup Iteration 3: 0.515 ops/s -# Warmup Iteration 4: 0.515 ops/s -Iteration 1: 0.475 ops/s -Iteration 2: 0.512 ops/s -Iteration 3: 0.514 ops/s -Iteration 4: 0.515 ops/s - -# Run progress: 98.89% complete, ETA 00:01:22 -# Fork: 3 of 4 -# Warmup Iteration 1: 0.489 ops/s -# Warmup Iteration 2: 0.558 ops/s -# Warmup Iteration 3: 0.575 ops/s -# Warmup Iteration 4: 0.641 ops/s -Iteration 1: 0.649 ops/s -Iteration 2: 0.542 ops/s -Iteration 3: 0.597 ops/s -Iteration 4: 0.514 ops/s - -# Run progress: 99.44% complete, ETA 00:00:41 -# Fork: 4 of 4 -# Warmup Iteration 1: 0.481 ops/s -# Warmup Iteration 2: 0.520 ops/s -# Warmup Iteration 3: 0.635 ops/s -# Warmup Iteration 4: 0.532 ops/s -Iteration 1: 0.585 ops/s -Iteration 2: 0.580 ops/s -Iteration 3: 0.562 ops/s -Iteration 4: 0.604 ops/s - - -Result "json.bench.JmhWriterBench.bench": - 0.540 ±(99.9%) 0.051 ops/s [Average] - (min, avg, max) = (0.471, 0.540, 0.649), stdev = 0.050 - CI (99.9%): [0.489, 0.592] (assumes normal distribution) - - -# Run complete. Total time: 02:04:18 - -REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on -why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial -experiments, perform baseline and negative tests that provide experimental control, make sure -the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. -Do not assume the numbers tell you what you want them to tell. - -Benchmark (jsonSize) (processorName) Mode Cnt Score Error Units -JmhWriterBench.bench 128b tethys-jackson thrpt 16 933624.586 ± 5048.703 ops/s -JmhWriterBench.bench 128b pure-jackson thrpt 16 563304.441 ± 3482.829 ops/s -JmhWriterBench.bench 128b circe thrpt 16 621310.962 ± 16389.224 ops/s -JmhWriterBench.bench 128b java.lang.StringBuilder thrpt 16 1365829.788 ± 7485.740 ops/s -JmhWriterBench.bench 128b scala.StringBuilder thrpt 16 1288411.486 ± 8471.963 ops/s -JmhWriterBench.bench 128b json4s-jackson thrpt 16 185964.967 ± 1618.865 ops/s -JmhWriterBench.bench 128b json4s-native thrpt 16 197545.065 ± 1248.966 ops/s -JmhWriterBench.bench 128b play-json thrpt 16 197279.434 ± 1479.226 ops/s -JmhWriterBench.bench 128b spray-json thrpt 16 409063.537 ± 5338.225 ops/s -JmhWriterBench.bench 1kb tethys-jackson thrpt 16 220229.694 ± 5928.676 ops/s -JmhWriterBench.bench 1kb pure-jackson thrpt 16 179625.306 ± 426.507 ops/s -JmhWriterBench.bench 1kb circe thrpt 16 86294.080 ± 602.778 ops/s -JmhWriterBench.bench 1kb java.lang.StringBuilder thrpt 16 197955.272 ± 18303.811 ops/s -JmhWriterBench.bench 1kb scala.StringBuilder thrpt 16 196492.325 ± 12187.468 ops/s -JmhWriterBench.bench 1kb json4s-jackson thrpt 16 24597.714 ± 42.682 ops/s -JmhWriterBench.bench 1kb json4s-native thrpt 16 25536.414 ± 139.522 ops/s -JmhWriterBench.bench 1kb play-json thrpt 16 27718.526 ± 1235.370 ops/s -JmhWriterBench.bench 1kb spray-json thrpt 16 54303.176 ± 650.639 ops/s -JmhWriterBench.bench 128kb tethys-jackson thrpt 16 1641.102 ± 4.018 ops/s -JmhWriterBench.bench 128kb pure-jackson thrpt 16 1876.364 ± 12.737 ops/s -JmhWriterBench.bench 128kb circe thrpt 16 616.222 ± 9.041 ops/s -JmhWriterBench.bench 128kb java.lang.StringBuilder thrpt 16 1527.102 ± 149.609 ops/s -JmhWriterBench.bench 128kb scala.StringBuilder thrpt 16 1531.357 ± 101.644 ops/s -JmhWriterBench.bench 128kb json4s-jackson thrpt 16 178.298 ± 0.752 ops/s -JmhWriterBench.bench 128kb json4s-native thrpt 16 194.544 ± 0.850 ops/s -JmhWriterBench.bench 128kb play-json thrpt 16 208.257 ± 1.358 ops/s -JmhWriterBench.bench 128kb spray-json thrpt 16 384.963 ± 8.194 ops/s -JmhWriterBench.bench 1mb tethys-jackson thrpt 16 205.924 ± 0.728 ops/s -JmhWriterBench.bench 1mb pure-jackson thrpt 16 220.472 ± 2.354 ops/s -JmhWriterBench.bench 1mb circe thrpt 16 56.900 ± 2.489 ops/s -JmhWriterBench.bench 1mb java.lang.StringBuilder thrpt 16 167.981 ± 1.419 ops/s -JmhWriterBench.bench 1mb scala.StringBuilder thrpt 16 155.445 ± 1.749 ops/s -JmhWriterBench.bench 1mb json4s-jackson thrpt 16 20.374 ± 0.644 ops/s -JmhWriterBench.bench 1mb json4s-native thrpt 16 21.216 ± 1.390 ops/s -JmhWriterBench.bench 1mb play-json thrpt 16 22.433 ± 0.323 ops/s -JmhWriterBench.bench 1mb spray-json thrpt 16 39.317 ± 0.779 ops/s -JmhWriterBench.bench 32mb tethys-jackson thrpt 16 3.484 ± 0.057 ops/s -JmhWriterBench.bench 32mb pure-jackson thrpt 16 4.014 ± 0.008 ops/s -JmhWriterBench.bench 32mb circe thrpt 16 0.801 ± 0.092 ops/s -JmhWriterBench.bench 32mb java.lang.StringBuilder thrpt 16 4.629 ± 0.134 ops/s -JmhWriterBench.bench 32mb scala.StringBuilder thrpt 16 4.544 ± 0.181 ops/s -JmhWriterBench.bench 32mb json4s-jackson thrpt 16 0.377 ± 0.014 ops/s -JmhWriterBench.bench 32mb json4s-native thrpt 16 0.728 ± 0.005 ops/s -JmhWriterBench.bench 32mb play-json thrpt 16 0.489 ± 0.016 ops/s -JmhWriterBench.bench 32mb spray-json thrpt 16 0.540 ± 0.051 ops/s - -Benchmark result is saved to /home/alex/projects/tethys/./modules/benchmarks/jmh-writer.json diff --git a/modules/benchmarks/src/main/scala-2/json/bench/tethysjson/TethysBench.scala b/modules/benchmarks/src/main/scala-2/json/bench/tethysjson/TethysBench.scala new file mode 100644 index 00000000..ecb5e3b6 --- /dev/null +++ b/modules/benchmarks/src/main/scala-2/json/bench/tethysjson/TethysBench.scala @@ -0,0 +1,19 @@ +package json.bench.tethysjson + +import json.bench.{DataReader, DataWriter} +import json.bench.model.Data +import tethys._ +import tethys.jackson._ + +object TethysBench { + + implicit val dataWriter: JsonWriter[Data] = tethys.derivation.semiauto.jsonWriter[Data] + implicit val dataReader: JsonReader[Data] = tethys.derivation.semiauto.jsonReader[Data] + + object TethysJacksonDataProcessor extends DataWriter with DataReader { + + override def write(seq: Seq[Data]): String = seq.asJson + + override def read(json: String): Seq[Data] = json.jsonAs[Seq[Data]].toOption.get + } +} diff --git a/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala b/modules/benchmarks/src/main/scala-3/json/bench/tethysjson/TethysBench.scala similarity index 66% rename from modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala rename to modules/benchmarks/src/main/scala-3/json/bench/tethysjson/TethysBench.scala index 4f9ec9db..18a22c21 100644 --- a/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala +++ b/modules/benchmarks/src/main/scala-3/json/bench/tethysjson/TethysBench.scala @@ -1,18 +1,17 @@ package json.bench.tethysjson import json.bench.model.Data -import tethys._ -import tethys.jackson._ -import tethys.derivation.semiauto._ import json.bench.{DataReader, DataWriter} +import tethys.* +import tethys.jackson.* /** * Created by eld0727 on 21.04.17. */ object TethysBench { - implicit val dataWriter: JsonWriter[Data] = jsonWriter[Data] - implicit val dataReader: JsonReader[Data] = jsonReader[Data] + implicit val dataWriter: JsonWriter[Data] = JsonWriter.derived[Data] + implicit val dataReader: JsonReader[Data] = JsonReader.derived[Data] object TethysJacksonDataProcessor extends DataWriter with DataReader { diff --git a/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala b/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala index e8de31c7..a3ec4d3d 100644 --- a/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala +++ b/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala @@ -28,13 +28,12 @@ object BenchMarkdown { case "circe" => 3 case "circe-jawn" => 4 case "circe-jackson" => 5 - case "java.lang.StringBuilder" => 6 - case "scala.StringBuilder" => 7 case "json4s-jackson" => 8 case "json4s-native" => 9 case "play-json" => 10 case "spray-json" => 11 case "pushka" => 12 + case "zio-json" => 13 case _ => 13 } @@ -49,7 +48,6 @@ object BenchMarkdown { else Left(JsonReader.stringReader.read(it)) } } - implicit val primaryMetricsReader: JsonReader[PrimaryMetrics] = jsonReader[PrimaryMetrics] implicit val benchmarkReader: JsonReader[Benchmark] = jsonReader[Benchmark] diff --git a/modules/benchmarks/src/main/scala/json/bench/DataReader.scala b/modules/benchmarks/src/main/scala/json/bench/DataReader.scala index e8c002a8..151926a2 100644 --- a/modules/benchmarks/src/main/scala/json/bench/DataReader.scala +++ b/modules/benchmarks/src/main/scala/json/bench/DataReader.scala @@ -7,6 +7,7 @@ import json.bench.model.Data import json.bench.play.PlayBench import json.bench.spray.SprayBench import json.bench.tethysjson.TethysBench +import json.bench.ziojson.ZIOJsonBench trait DataReader { def read(json: String): Seq[Data] @@ -21,6 +22,7 @@ object DataReader { "json4s-jackson" -> Json4sBench.Json4sJacksonDataProcessor, "json4s-native" -> Json4sBench.Json4sNativeDataProcessor, "play-json" -> PlayBench.PlayDataProcessor, - "spray-json" -> SprayBench.SprayDataProcessor + "spray-json" -> SprayBench.SprayDataProcessor, + "zio-json" -> ZIOJsonBench.ZIOJsonDataProcesser ) } diff --git a/modules/benchmarks/src/main/scala/json/bench/DataWriter.scala b/modules/benchmarks/src/main/scala/json/bench/DataWriter.scala index 6b6e23d1..a54654bc 100644 --- a/modules/benchmarks/src/main/scala/json/bench/DataWriter.scala +++ b/modules/benchmarks/src/main/scala/json/bench/DataWriter.scala @@ -7,6 +7,7 @@ import json.bench.model.Data import json.bench.play.PlayBench import json.bench.spray.SprayBench import json.bench.tethysjson.TethysBench +import json.bench.ziojson.ZIOJsonBench trait DataWriter { def write(seq: Seq[Data]): String @@ -22,6 +23,7 @@ object DataWriter { "json4s-jackson" -> Json4sBench.Json4sJacksonDataProcessor, "json4s-native" -> Json4sBench.Json4sNativeDataProcessor, "play-json" -> PlayBench.PlayDataProcessor, - "spray-json" -> SprayBench.SprayDataProcessor + "spray-json" -> SprayBench.SprayDataProcessor, + "zio-json" -> ZIOJsonBench.ZIOJsonDataProcesser ) } diff --git a/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala b/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala index 72337ff9..e32e0131 100644 --- a/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala @@ -43,10 +43,9 @@ class JmhReaderBench { "pure-jackson", "circe-jawn", "circe-jackson", - "json4s-jackson", - "json4s-native", "play-json", - "spray-json" + "spray-json", + "zio-json" )) var processorName: String = _ diff --git a/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala b/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala index 0ba583e1..60bcae5c 100644 --- a/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala @@ -39,12 +39,9 @@ class JmhWriterBench { "tethys-jackson", "pure-jackson", "circe", - "java.lang.StringBuilder", - "scala.StringBuilder", - "json4s-jackson", - "json4s-native", "play-json", - "spray-json" + "spray-json", + "zio-json" )) var processorName: String = _ diff --git a/modules/benchmarks/src/main/scala/json/bench/ziojson/ZIOJsonBench.scala b/modules/benchmarks/src/main/scala/json/bench/ziojson/ZIOJsonBench.scala new file mode 100644 index 00000000..6c9f316a --- /dev/null +++ b/modules/benchmarks/src/main/scala/json/bench/ziojson/ZIOJsonBench.scala @@ -0,0 +1,19 @@ +package json.bench.ziojson + +import zio.json._ +import json.bench._ +import json.bench.model.Data + +object ZIOJsonBench { + implicit val decoder: JsonDecoder[Data] = DeriveJsonDecoder.gen[Data] + implicit val encoder: JsonEncoder[Data] = DeriveJsonEncoder.gen[Data] + + object ZIOJsonDataProcesser extends DataWriter with DataReader { + override def write(seq: Seq[Data]): String = + seq.toJson + + override def read(json: String): Seq[Data] = + json.fromJson[Seq[Data]].toOption.get + } + +} diff --git a/modules/core/src/main/scala-2.12/tethys/derivation/JsonObjectWriterDerivation.scala b/modules/core/src/main/scala-2.12/tethys/derivation/JsonObjectWriterDerivation.scala new file mode 100644 index 00000000..83887922 --- /dev/null +++ b/modules/core/src/main/scala-2.12/tethys/derivation/JsonObjectWriterDerivation.scala @@ -0,0 +1,6 @@ +package tethys.derivation + + +private [tethys] trait JsonObjectWriterDerivation { + +} \ No newline at end of file diff --git a/modules/core/src/main/scala-2.12/tethys/derivation/JsonReaderDerivation.scala b/modules/core/src/main/scala-2.12/tethys/derivation/JsonReaderDerivation.scala new file mode 100644 index 00000000..b9cd2274 --- /dev/null +++ b/modules/core/src/main/scala-2.12/tethys/derivation/JsonReaderDerivation.scala @@ -0,0 +1,6 @@ +package tethys.derivation + + +private [tethys] trait JsonReaderDerivation { + +} \ No newline at end of file diff --git a/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala b/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala index 7e9bd8e6..3907754d 100644 --- a/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala +++ b/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala @@ -20,7 +20,7 @@ object CollectionBuilder { } implicit def iterableFactoryCollectionBuilder[A, C[X] <: IterableFactoryDefaults[X, C]]: IterableFactoryCollectionBuilder[A, C] = macro CollectionBuilderMacroImpl.fromIterableFactory[A, C] - implicit def mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]]: MapFactoryCollectionBuilder[K, V, M] = macro CollectionBuilderMacroImpl.fromMapFactory[K, V, M] + implicit def mapFactoryCollectionBuilder[K, V, M[X, Y] <: scala.collection.Map[X, Y]]: CollectionBuilder[(K, V), M[K, V]] = macro CollectionBuilderMacroImpl.fromMapFactory[K, V, M] private class CollectionBuilderMacroImpl(val c: blackbox.Context) { import c.universe._ @@ -30,7 +30,7 @@ object CollectionBuilder { q"new tethys.compat.CollectionBuilder.IterableFactoryCollectionBuilder[${A.tpe}, ${C.tpe}]($ref)" } - def fromMapFactory[K, V, M[X, Y] <: Map[X, Y]](implicit + def fromMapFactory[K, V, M[X, Y] <: scala.collection.Map[X, Y]](implicit K: WeakTypeTag[K], V: WeakTypeTag[V], M: WeakTypeTag[M[K, V]]): Tree = { diff --git a/modules/core/src/main/scala-2.13+/tethys/derivation/JsonObjectWriterDerivation.scala b/modules/core/src/main/scala-2.13+/tethys/derivation/JsonObjectWriterDerivation.scala new file mode 100644 index 00000000..83887922 --- /dev/null +++ b/modules/core/src/main/scala-2.13+/tethys/derivation/JsonObjectWriterDerivation.scala @@ -0,0 +1,6 @@ +package tethys.derivation + + +private [tethys] trait JsonObjectWriterDerivation { + +} \ No newline at end of file diff --git a/modules/core/src/main/scala-2.13+/tethys/derivation/JsonReaderDerivation.scala b/modules/core/src/main/scala-2.13+/tethys/derivation/JsonReaderDerivation.scala new file mode 100644 index 00000000..b9cd2274 --- /dev/null +++ b/modules/core/src/main/scala-2.13+/tethys/derivation/JsonReaderDerivation.scala @@ -0,0 +1,6 @@ +package tethys.derivation + + +private [tethys] trait JsonReaderDerivation { + +} \ No newline at end of file diff --git a/modules/core/src/main/scala-3/tethys/FieldStyle.scala b/modules/core/src/main/scala-3/tethys/FieldStyle.scala new file mode 100644 index 00000000..b26e7e6a --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/FieldStyle.scala @@ -0,0 +1,46 @@ +package tethys + +import java.util.regex.Pattern + + +enum FieldStyle { + case Capitalize, Uncapitalize, LowerCase, UpperCase + + case KebabCase, LowerKebabCase, UpperKebabCase, CapitalizedKebabCase + + case SnakeCase, LowerSnakeCase, UpperSnakeCase, CapitalizedSnakeCase +} + +private[tethys] +object FieldStyle: + private val regexp1: Pattern = Pattern.compile("([A-Z]+)([A-Z][a-z])") + private val regexp2: Pattern = Pattern.compile("([a-z\\d])([A-Z])") + private val replacement: String = "$1_$2" + private val snakeCase: String => String = splitName(_).mkString("_") + private val kebabcase: String => String = splitName(_).mkString("-") + private val capitalize: String => String = _.capitalize + private val uncapitalize: String => String = (field: String) => field.updated(0, field.charAt(0).toLower) + private val lowercase: String => String = _.toLowerCase() + private val uppercase: String => String = _.toUpperCase() + + def applyStyle(string: String, style: FieldStyle): String = + style match + case FieldStyle.Capitalize => capitalize(string) + case FieldStyle.Uncapitalize => uncapitalize(string) + case FieldStyle.LowerCase => lowercase(string) + case FieldStyle.UpperCase => uppercase(string) + + case FieldStyle.KebabCase => kebabcase(string) + case FieldStyle.LowerKebabCase => (kebabcase andThen lowercase)(string) + case FieldStyle.UpperKebabCase => (kebabcase andThen uppercase)(string) + case FieldStyle.CapitalizedKebabCase => (kebabcase andThen capitalize)(string) + + case FieldStyle.SnakeCase => snakeCase(string) + case FieldStyle.LowerSnakeCase => (snakeCase andThen lowercase)(string) + case FieldStyle.UpperSnakeCase => (snakeCase andThen uppercase)(string) + case FieldStyle.CapitalizedSnakeCase => (snakeCase andThen capitalize)(string) + + + private def splitName(name: String): List[String] = + val first = FieldStyle.regexp1.matcher(name).replaceAll(FieldStyle.replacement) + FieldStyle.regexp2.matcher(first).replaceAll(FieldStyle.replacement).split("_").toList diff --git a/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonReader.scala b/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonReader.scala new file mode 100644 index 00000000..6b9f1488 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonReader.scala @@ -0,0 +1,20 @@ +package tethys + +import tethys.readers.{FieldName, ReaderError} +import tethys.readers.tokens.TokenIterator + +trait OrdinalEnumJsonReader[A] extends JsonReader[A] + +object OrdinalEnumJsonReader: + inline def derived[A <: scala.reflect.Enum]: OrdinalEnumJsonReader[A] = + new OrdinalEnumJsonReader[A]: + def read(it: TokenIterator)(implicit fieldName: FieldName): A = + if it.currentToken().isNumberValue then + val res = it.int() + it.next() + try derivation.EnumCompanion.getByOrdinal[A](res) + catch + case ex: NoSuchElementException => + ReaderError.wrongJson(s"Unknown enum ordinal: $res") + else + ReaderError.wrongJson(s"Expected int value but found: ${it.currentToken()}") diff --git a/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonWriter.scala b/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonWriter.scala new file mode 100644 index 00000000..08b51f08 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/OrdinalEnumJsonWriter.scala @@ -0,0 +1,15 @@ +package tethys + +import tethys.writers.tokens.TokenWriter + + +trait OrdinalEnumJsonWriter[A] extends JsonWriter[A] + +object OrdinalEnumJsonWriter: + inline def derived[A <: scala.reflect.Enum]: OrdinalEnumJsonWriter[A] = + (value: A, tokenWriter: TokenWriter) => tokenWriter.writeNumber(value.ordinal) + + inline def withLabel[A <: scala.reflect.Enum](label: String): JsonObjectWriter[A] = + (value: A, tokenWriter: writers.tokens.TokenWriter) => + tokenWriter.writeFieldName(label) + tokenWriter.writeNumber(value.ordinal) diff --git a/modules/core/src/main/scala-3/tethys/ReaderBuilder.scala b/modules/core/src/main/scala-3/tethys/ReaderBuilder.scala new file mode 100644 index 00000000..c54807f0 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/ReaderBuilder.scala @@ -0,0 +1,58 @@ +package tethys + +import tethys.{FieldStyle, JsonReader} + +sealed trait ReaderBuilder[A]: + def extract[Field](field: A => Field): ReaderBuilder.DependentFieldAs[A, Field] + + def extractReader[Field](field: A => Field): ReaderBuilder.DependentField0[A, JsonReader[_ <: Field]] + + def fieldStyle(fieldStyle: FieldStyle): ReaderBuilder[A] + + @deprecated("Use tethys.FieldStyle instead") + def fieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): ReaderBuilder[A] + + def strict: ReaderBuilder[A] + + +object ReaderBuilder: + def apply[A](using mirror: scala.deriving.Mirror.ProductOf[A]): ReaderBuilder[A] = + throw IllegalStateException("Config must be an inlined given or provided directly to 'derived'") + + + sealed trait AsSyntax[A, B, C]: + def apply(fun: B => C): ReaderBuilder[A] + + sealed trait DependentFieldAs[A, B] extends DependentField0[A, B]: + def as[C]: ReaderBuilder.AsSyntax[A, C, B] + + sealed trait DependentField0[A, Field]: + def apply(fun: () => Field): ReaderBuilder[A] + + def from[B](f1: A => B): DependentField1[A, Field, B] + + def from[B](name: String): DependentField1[A, Field, B] + + + sealed trait DependentField1[A, Field, OneCollected]: + def apply(fun: OneCollected => Field): ReaderBuilder[A] + + def and[B](f1: A => B): DependentFieldN[A, Field, OneCollected *: B *: EmptyTuple] + + def and[B](name: String): DependentFieldN[A, Field, OneCollected *: B *: EmptyTuple] + + def product + (using mirror: scala.deriving.Mirror.ProductOf[Field]) + (using ev: OneCollected *: EmptyTuple =:= mirror.MirroredElemTypes): ReaderBuilder[A] + + sealed trait DependentFieldN[A, Field, Collected <: NonEmptyTuple]: + def apply(fun: Collected => Field): ReaderBuilder[A] + + def and[B](f1: A => B): DependentFieldN[A, Field, Tuple.Append[Collected, B]] + + def and[B](name: String): DependentFieldN[A, Field, Tuple.Append[Collected, B]] + + def product + (using mirror: scala.deriving.Mirror.ProductOf[Field]) + (using ev: Collected =:= mirror.MirroredElemTypes): ReaderBuilder[A] + \ No newline at end of file diff --git a/modules/core/src/main/scala-3/tethys/StringEnumJsonReader.scala b/modules/core/src/main/scala-3/tethys/StringEnumJsonReader.scala new file mode 100644 index 00000000..3eccb416 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/StringEnumJsonReader.scala @@ -0,0 +1,21 @@ +package tethys + +import tethys.readers.{FieldName, ReaderError} +import tethys.readers.tokens.TokenIterator + +trait StringEnumJsonReader[A] extends JsonReader[A] + +object StringEnumJsonReader: + inline def derived[A <: scala.reflect.Enum]: StringEnumJsonReader[A] = + new StringEnumJsonReader[A]: + def read(it: TokenIterator)(implicit fieldName: FieldName): A = + if it.currentToken().isStringValue then + val res = it.string() + it.next() + try + derivation.EnumCompanion.getByName[A](res) + catch + case ex: NoSuchElementException => + ReaderError.wrongJson(s"Unknown enum name: $res") + else + ReaderError.wrongJson(s"Expected string value but found: ${it.currentToken()}") diff --git a/modules/core/src/main/scala-3/tethys/StringEnumJsonWriter.scala b/modules/core/src/main/scala-3/tethys/StringEnumJsonWriter.scala new file mode 100644 index 00000000..9a95e310 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/StringEnumJsonWriter.scala @@ -0,0 +1,13 @@ +package tethys +import tethys.writers.tokens.TokenWriter + +trait StringEnumJsonWriter[A] extends JsonWriter[A] + +object StringEnumJsonWriter: + inline def derived[A <: scala.reflect.Enum]: StringEnumJsonWriter[A] = + (value: A, tokenWriter: TokenWriter) => tokenWriter.writeString(value.toString) + + inline def withLabel[A <: scala.reflect.Enum](label: String): JsonObjectWriter[A] = + (value: A, tokenWriter: writers.tokens.TokenWriter) => + tokenWriter.writeFieldName(label) + tokenWriter.writeString(value.toString) diff --git a/modules/core/src/main/scala-3/tethys/WriterBuilder.scala b/modules/core/src/main/scala-3/tethys/WriterBuilder.scala new file mode 100644 index 00000000..5590e80c --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/WriterBuilder.scala @@ -0,0 +1,37 @@ +package tethys + +import tethys.FieldStyle + +sealed trait WriterBuilder[A]: + import WriterBuilder.* + + def add(name: String): FunApply0[A, A] + + def remove[B](field: A => B): WriterBuilder[A] + + def rename[B](field: A => B)(rename: String): WriterBuilder[A] + + def update[B](field: A => B): FunApply[A, B] with WithRename[FunApply[A, B]] + + @deprecated("Use 'update' instead") + def updatePartial[B](field: A => B): FunApply[A, B] with WithRename[FunApply[A, B]] + + def fieldStyle(style: FieldStyle): WriterBuilder[A] + + @deprecated("Use tethys.FieldStyle instead") + def fieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): WriterBuilder[A] + + + +object WriterBuilder: + def apply[A](using mirror: scala.deriving.Mirror.ProductOf[A]): WriterBuilder[A] = + throw IllegalStateException("Config must be an inlined given or provided directly to 'derived'") + + sealed trait WithRename[Res]: + def withRename(rename: String): Res + + sealed trait FunApply0[A, B]: + def apply[C](fun: B => C): WriterBuilder[A] + + sealed trait FunApply[A, B] extends FunApply0[A, B]: + def fromRoot[C](fun: A => C): WriterBuilder[A] \ No newline at end of file diff --git a/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala b/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala index 2352c923..39a4fa12 100644 --- a/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala +++ b/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala @@ -19,7 +19,7 @@ object CollectionBuilder { inline given iterableFactoryCollectionBuilder[A, C[X] <: Iterable[X]]: CollectionBuilder[A, C[A]] = ${CollectionBuilderMacroImpl.fromIterableFactory[A, C]} - inline given mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]]: MapFactoryCollectionBuilder[K, V, M] = + inline given mapFactoryCollectionBuilder[K, V, M[X, Y] <: scala.collection.Map[X, Y]]: CollectionBuilder[(K, V), M[K, V]] = ${CollectionBuilderMacroImpl.fromMapFactory[K, V, M]} object CollectionBuilderMacroImpl { @@ -30,11 +30,11 @@ object CollectionBuilder { '{new tethys.compat.CollectionBuilder.IterableFactoryCollectionBuilder[A, C]($factory)} } - def fromMapFactory[K: Type, V: Type, M[X, Y] <: Map[X, Y]: Type](using Quotes): Expr[MapFactoryCollectionBuilder[K, V, M]] = { + def fromMapFactory[K: Type, V: Type, M[X, Y] <: scala.collection.Map[X, Y]: Type](using Quotes): Expr[MapFactoryCollectionBuilder[K, V, M]] = { import quotes.reflect.* val factory = Ref(TypeRepr.of[M].typeSymbol.companionModule).asExprOf[MapFactory[M]] '{new tethys.compat.CollectionBuilder.MapFactoryCollectionBuilder[K, V, M]($factory)} } } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala-3/tethys/derivation/ConfigurationMacroUtils.scala b/modules/core/src/main/scala-3/tethys/derivation/ConfigurationMacroUtils.scala new file mode 100644 index 00000000..00a524d0 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/ConfigurationMacroUtils.scala @@ -0,0 +1,1115 @@ +package tethys.derivation + +import tethys.* +import tethys.readers.FieldName + +import scala.annotation.tailrec +import scala.collection.mutable +import scala.compiletime.{constValueTuple, summonInline} +import scala.deriving.Mirror +import scala.quoted.{Expr, FromExpr, Quotes, ToExpr, Type, Varargs} +import tethys.readers.tokens.{QueueIterator, TokenIterator} +import tethys.commons.TokenNode +import tethys.derivation.builder.{ReaderDerivationConfig, WriterDerivationConfig} + +trait ConfigurationMacroUtils: + given Quotes = quotes + val quotes: Quotes + import quotes.reflect.* + + def lookup[T: Type]: Expr[T] = + Implicits.search(TypeRepr.of[T]) match + case success: ImplicitSearchSuccess => + success.tree.asExprOf[T] + case failure: ImplicitSearchFailure => + // Not sees statements put in a block (e.g. derived instances) + // So we use summonInline + '{summonInline[T]} + + def lookupOpt[T: Type]: Option[Expr[T]] = + Implicits.search(TypeRepr.of[T]) match + case success: ImplicitSearchSuccess => + Some(success.tree.asExprOf[T]) + case failure: ImplicitSearchFailure => + None + + def prepareWriterProductFields[T: Type]( + config: Expr[WriterBuilder[T]] + ): List[WriterField] = + val macroConfig = parseWriterBuilderMacroConfig[T](config) + val updates = macroConfig.update.map(it => it.name -> it).toMap + val tpe = TypeRepr.of[T] + tpe.typeSymbol.caseFields.zipWithIndex + .filterNot((symbol, _) => macroConfig.delete(symbol.name)) + .collect { (symbol, idx) => + val name = macroConfig.fieldStyle.fold(symbol.name)( + FieldStyle.applyStyle(symbol.name, _) + ) + updates.get(symbol.name) match + case Some(update) => + WriterField.Basic( + symbol.name, + name, + update.fun.map(WriterField.Update(_, update.what)), + update.to, + update.newName + ) + case None => + WriterField.Basic( + symbol.name, + name, + None, + tpe = tpe.memberType(symbol), + newName = None + ) + } ::: macroConfig.add + + private def parseWriterBuilderMacroConfig[T: Type]( + config: Expr[WriterBuilder[T]] + ): WriterBuilderMacroConfig = + val fields = TypeRepr.of[T].typeSymbol.caseFields.map(_.name) + + def exitFieldAlreadyUpdated(name: String) = + report.errorAndAbort( + s"Ambigious updates found. Update for field '$name' already configured" + ) + + @tailrec + def loop( + config: Expr[WriterBuilder[T]], + acc: WriterBuilderMacroConfig = WriterBuilderMacroConfig(), + updatedFields: Set[String] = Set.empty + ): (WriterBuilderMacroConfig, Set[String]) = + config match + case '{ + WriterBuilder[T](using ${ mirror }: Mirror.ProductOf[T]) + } => + (acc, updatedFields) + + case '{ + WriterBuilder[T](using + ${ mirror }: Mirror.ProductOf[T] + ) + } => + (acc, updatedFields) + + case '{ + ($rest: WriterBuilder[T]).fieldStyle(${ + fieldStyle + }: FieldStyle) + } => + (acc.copy(fieldStyle = Some(fieldStyle.valueOrAbort)), updatedFields) + + case '{ + ($rest: WriterBuilder[T]).fieldStyle(${ style }: tethys.derivation.builder.FieldStyle) + } => + val fieldStyle = legacyFieldStyleToFieldStyle(style).getOrElse { + report.errorAndAbort(s"Can't extract fieldStyle from ${style.asTerm.show(using Printer.TreeShortCode)}") + } + (acc.copy(fieldStyle = Some(fieldStyle)), updatedFields) + + case '{ + ($rest: WriterBuilder[T]) + .add($field: String) + .apply[to]($lambda) + } => + field.value + .filter(fields.contains(_)) + .foreach(field => + report.errorAndAbort(s"Field '$field' already exists") + ) + loop( + config = rest, + acc = acc.withField( + WriterField.Added( + name = s"added$$macro$$${fields.length + acc.add.length + 1}", + update = Some( + WriterField + .Update(lambda.asTerm, WriterField.Update.What.Root) + ), + tpe = TypeRepr.of[to], + label = field + ) + ), + updatedFields = field.value.fold(updatedFields)(updatedFields + _) + ) + + case '{ + ($rest: WriterBuilder[T]).remove(${ + SelectedField(field) + }: T => Any) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withDelete(field.name), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]).rename[to](${ + SelectedField(field) + })($rename: String) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = Some(rename), + what = WriterField.Update.What.Field, + fun = None, + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .update[from](${ SelectedField(field) }) + .apply[to]($updater) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = None, + what = WriterField.Update.What.Field, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .update[from](${ SelectedField(field) }) + .withRename($rename) + .apply[to]($updater) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = Some(rename), + what = WriterField.Update.What.Field, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .update(${ SelectedField(field) }) + .fromRoot[to](${ updater }) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = None, + what = WriterField.Update.What.Root, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .update[from](${ SelectedField(field) }) + .withRename($rename) + .fromRoot[to](${ updater }) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = Some(rename), + what = WriterField.Update.What.Root, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + case '{ + ($rest: WriterBuilder[T]) + .updatePartial[from](${ SelectedField(field) }) + .apply[to]($updater) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = None, + what = WriterField.Update.What.Field, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .updatePartial[from](${ SelectedField(field) }) + .withRename($rename) + .apply[to]($updater) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = Some(rename), + what = WriterField.Update.What.Field, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .updatePartial(${ SelectedField(field) }) + .fromRoot[to](${ updater }) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = None, + what = WriterField.Update.What.Root, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case '{ + ($rest: WriterBuilder[T]) + .updatePartial[from](${ SelectedField(field) }) + .withRename($rename) + .fromRoot[to](${ updater }) + } => + if updatedFields.contains(field.name) then + exitFieldAlreadyUpdated(field.name) + + loop( + config = rest, + acc = acc.withUpdate( + WriterFieldUpdate( + name = field.name, + newName = Some(rename), + what = WriterField.Update.What.Root, + fun = Some(updater.asTerm), + to = TypeRepr.of[to] + ) + ), + updatedFields = updatedFields + field.name + ) + + case other => + other.asTerm match + case Inlined(_, _, term) => + loop(term.asExprOf[WriterBuilder[T]]) + case _ => + report.errorAndAbort( + s"Unknown tree. Config must be an inlined given.\nTree: ${other.asTerm + .show(using Printer.TreeStructure)}" + ) + + loop(traverseTree(config.asTerm).asExprOf[WriterBuilder[T]])._1 + + end parseWriterBuilderMacroConfig + + def prepareReaderProductFields[T: Type]( + config: Expr[ReaderBuilder[T]] + ): (List[ReaderField], IsStrict) = + val macroConfig = parseReaderBuilderMacroConfig[T](config) + val tpe = TypeRepr.of[T] + val defaults = collectDefaults[T] + val fields = tpe.typeSymbol.caseFields.zipWithIndex + .map { case (symbol, idx) => + val default = defaults.get(idx).map(_.asExprOf[Any]) + macroConfig.extracted.get(symbol.name) match + case Some(field: ReaderField.Basic) => + val updatedDefault = field.extractor match + case None => default + case Some((tpe, lambda)) => + Option.when(tpe.isOption)('{ None }).orElse(default) + .map(default => Apply(Select.unique(lambda, "apply"), List(default.asTerm))).map(_.asExprOf[Any]) + + field.update(idx, updatedDefault, macroConfig.fieldStyle) + + case Some(field) => + field.update(idx, default, macroConfig.fieldStyle) + + case None => + ReaderField + .Basic(symbol.name, tpe.memberType(symbol), None) + .update(idx, default, macroConfig.fieldStyle) + } + val existingFieldNames = fields.map(_.name).toSet + val additionalFields = fields.collect { + case field: ReaderField.Extracted => + field.extractors.collect { case (name, tpe) if !existingFieldNames(name) => + ReaderField.Basic(name, tpe, None, -1, Option.when(tpe.isOption)('{None})) + } + }.flatten.distinctBy(_.name) + val allFields = fields ::: additionalFields + checkLoops(allFields) + (sortDependencies(allFields), macroConfig.isStrict) + + + private def sortDependencies(fields: List[ReaderField]): List[ReaderField] = + val known = fields.map(_.name).toSet + val (basic, allExtracted) = fields.partitionMap { + case field: ReaderField.Basic => Left(field) + case field: ReaderField.Extracted => Right(field) + } + @scala.annotation.tailrec + def loop( + extracted: List[ReaderField.Extracted], + previous: List[ReaderField], + n: Int + ): List[ReaderField] = + if extracted.isEmpty || n == allExtracted.length + 1 then previous + else + val processed = previous.map(_.name).toSet + val (dependentOnPrevious, moreDependencies) = + extracted.partition( + _.extractors.forall((name, _) => processed(name) || !known(name)) + ) + loop(moreDependencies, previous ::: dependentOnPrevious, n + 1) + + loop(allExtracted, basic, n = 0) + + private def checkLoops(fields: List[ReaderField]): Unit = + val extractedFields = fields.collect { case field: ReaderField.Extracted => + field + } + + @scala.annotation.tailrec + def loop(dependencies: Map[String, Set[String]], n: Int): Unit = + if n == dependencies.size then () + else + val looped = dependencies.collect { + case (name, extractors) if extractors.contains(name) => name + } + if looped.nonEmpty then + report.errorAndAbort( + s"Found loop in your configuration, fields ${looped.mkString("[", ", ", "]")}" + ) + val nextDependencies = dependencies.map((name, deps) => + ( + name, + deps.flatMap(name => dependencies.getOrElse(name, Set.empty) + name) + ) + ) + loop(nextDependencies, n + 1) + + loop( + extractedFields + .map(field => (field.name, field.extractors.map(_._1).toSet)) + .toMap, + 0 + ) + end checkLoops + + private def collectDefaults[T: Type]: Map[Int, Term] = + val tpe = TypeRepr.of[T] + tpe.typeSymbol.primaryConstructor.paramSymss.flatten + .filter(_.isValDef) + .zipWithIndex + .flatMap { (field, idx) => + val defaultMethodName = s"$$lessinit$$greater$$default$$${idx + 1}" + tpe.typeSymbol.companionClass + .declaredMethod(defaultMethodName) + .headOption + .map { defaultMethod => + val callDefault = { + val base = Ident(tpe.typeSymbol.companionModule.termRef).select( + defaultMethod + ) + val tParams = + defaultMethod.paramSymss.headOption.filter(_.forall(_.isType)) + tParams match + case Some(tParams) => TypeApply(base, tParams.map(TypeTree.ref)) + case _ => base + } + + defaultMethod.tree match { + case tree: DefDef => tree.rhs.getOrElse(callDefault) + case _ => callDefault + } + } + .orElse( + Option.when(tpe.memberType(field) <:< TypeRepr.of[Option[Any]])('{ + None + }.asTerm) + ) + .map(idx -> _) + } + .toMap + + private def parseReaderBuilderMacroConfig[T: Type]( + config: Expr[ReaderBuilder[T]] + ): ReaderBuilderMacroConfig = + val fields = TypeRepr.of[T].typeSymbol.caseFields.map(_.name) + + def exitExtractionAlreadyDefined(name: String) = + report.errorAndAbort(s"Field '$name' is already configured") + + def exitFieldExists(name: String) = + report.errorAndAbort( + s"Field '$name' exists in your model, use selector or .extract(_.$name).as[...] instead" + ) + + def loop( + config: Expr[ReaderBuilder[T]], + acc: ReaderBuilderMacroConfig = ReaderBuilderMacroConfig(Map.empty) + ): ReaderBuilderMacroConfig = + config match + case '{ + ReaderBuilder[T](using + ${ mirror }: scala.deriving.Mirror.ProductOf[T] + ) + } => + acc + case '{ + ($rest: ReaderBuilder[T]) + .extract[t](${ SelectedField(field) }) + .as[t1] + .apply(${ fun }) + } => + if acc.extracted.contains(field.name) then + exitExtractionAlreadyDefined(field.name) + + loop( + config = rest, + acc = acc.withExtracted( + ReaderField.Basic( + name = field.name, + tpe = TypeRepr.of[t], + extractor = Some((TypeRepr.of[t1], Typed(fun.asTerm, TypeTree.of[t1 => t]))) + ) + ) + ) + case '{ + ($rest: ReaderBuilder[T]).fieldStyle(${ style }: FieldStyle) + } => + loop( + config = rest, + acc = acc.copy(fieldStyle = Some(style.valueOrAbort)) + ) + + case '{ + ($rest: ReaderBuilder[T]).fieldStyle(${ style }: tethys.derivation.builder.FieldStyle) + } => + val fieldStyle = legacyFieldStyleToFieldStyle(style).getOrElse { + report.errorAndAbort(s"Can't extract fieldStyle from ${style.asTerm.show(using Printer.TreeShortCode)}") + } + loop( + config = rest, + acc = acc.copy(fieldStyle = Some(fieldStyle)) + ) + case '{ ($rest: ReaderBuilder[T]).strict } => + loop( + config = rest, + acc = acc.copy(isStrict = true) + ) + case other => + def loopInner( + term: Term, + extractors: List[(String, TypeRepr)] = Nil, + lambda: Term = '{ identity[Any] }.asTerm + ): ReaderBuilderMacroConfig = + term match + case config @ Apply( + TypeApply(Select(term, "extract"), List(tpt)), + List(SelectedField(name, _)) + ) => + if acc.extracted.contains(name) then + exitExtractionAlreadyDefined(name) + loop( + config = term.asExprOf[ReaderBuilder[T]], + acc = acc + .withExtracted( + ReaderField.Extracted( + name, + tpt.tpe, + extractors, + lambda, + reader = false + ) + ) + ) + case config @ Apply( + TypeApply(Select(term, "extractReader"), List(tpt)), + List(SelectedField(name, _)) + ) => + if acc.extracted.contains(name) then + exitExtractionAlreadyDefined(name) + loop( + config = term.asExprOf[ReaderBuilder[T]], + acc = acc.withExtracted( + ReaderField.Extracted( + name, + tpt.tpe, + extractors, + lambda, + reader = true + ) + ) + ) + case Apply(Select(term, "apply"), List(lambda)) => + loopInner( + term = term, + extractors = Nil, + lambda = lambda + ) + case Apply(Apply(Select(term, "product"), List(mirror)), _) => + loopInner( + term = term, + extractors = Nil, + lambda = Select + .unique(mirror, "fromProduct") + .etaExpand(Symbol.spliceOwner) + ) + case Apply( + TypeApply(Select(term, "from" | "and"), List(tpt)), + List(SelectedField(name, _)) + ) => + loopInner( + term = term, + extractors = (name, tpt.tpe) :: extractors, + lambda = lambda + ) + case Apply( + TypeApply(Select(term, "from" | "and"), List(tpt)), + List(Literal(StringConstant(name))) + ) => + if fields.contains(name) then exitFieldExists(name) + loopInner( + term = term, + extractors = (name, tpt.tpe) :: extractors, + lambda = lambda + ) + case other => + report.errorAndAbort( + s"Unknown tree. Config must be an inlined given.\nTree: ${other + .show(using Printer.TreeStructure)}" + ) + + loopInner(other.asTerm) + + loop(traverseTree(config.asTerm).asExprOf[ReaderBuilder[T]]) + + def parseSumConfig[T: Type]: SumMacroConfig = + val tpe = TypeRepr.of[T] + val tpt = TypeTree.of[T] + val annotation = TypeRepr.of[selector].typeSymbol + val selectors = tpe.typeSymbol.primaryConstructor.paramSymss.flatten + .filter(_.hasAnnotation(annotation)) + + selectors match + case constructorSymbol :: Nil => + val symbol = tpe.typeSymbol.fieldMembers.find(_.name == constructorSymbol.name) + .getOrElse(report.errorAndAbort(s"Not found symbol corresponding to constructor symbol ${constructorSymbol.name}")) + + val discriminators: List[Term] = getAllChildren(tpe).map { + case tpe: TypeRef => + Select(stub(tpe), symbol) + case tpe: TermRef => + Select(Ref(tpe.termSymbol), symbol) + case tpe => + report.errorAndAbort(s"Unknown tpe: $tpe") + } + SumMacroConfig(Some(DiscriminatorConfig(symbol.name, tpe.memberType(symbol), discriminators))) + + case Nil => + SumMacroConfig(None) + + case multiple => + report.errorAndAbort(s"Only one field can be a selector. Found ${multiple.map(_.name).mkString(", ")}") + + + private def stub(tpe: TypeRepr): Term = + import quotes.reflect.* + val symbol = tpe.typeSymbol + val constructorFieldsFilledWithNulls: List[List[Term]] = + symbol.primaryConstructor.paramSymss + .filterNot(_.exists(_.isType)) + .map(_.map(_.typeRef.widen match { + case t @ AppliedType(inner, applied) => + Select + .unique('{ null }.asTerm, "asInstanceOf") + .appliedToTypes(List(inner.appliedTo(tpe.typeArgs))) + case other => + Select + .unique('{ null }.asTerm, "asInstanceOf") + .appliedToTypes(List(other)) + })) + + New(TypeTree.ref(symbol)) + .select(symbol.primaryConstructor) + .appliedToTypes(symbol.typeRef.typeArgs.map(_ => TypeRepr.of[Null])) + .appliedToArgss(constructorFieldsFilledWithNulls) + + @scala.annotation.tailrec + private def traverseTree(config: Term): Term = + config match + case Inlined(_, _, term) => traverseTree(term) + case Typed(term, _) => traverseTree(term) + case Block(List(ValDef(_, _, Some(term))), _) => traverseTree(term) + case Block(_, term) => traverseTree(term) + case term => term + + + private def typeReprsOf[Ts: Type]: List[TypeRepr] = + Type.of[Ts] match + case '[EmptyTuple] => Nil + case '[t *: ts] => TypeRepr.of[t] :: typeReprsOf[ts] + + def getAllChildren(tpe: TypeRepr): List[TypeRepr] = + tpe.asType match + case '[t] => + Expr.summon[scala.deriving.Mirror.Of[t]] match + case Some('{ $m: scala.deriving.Mirror.SumOf[t] {type MirroredElemTypes = subs} }) => + typeReprsOf[subs].flatMap(getAllChildren) + case _ => + List(tpe) + + case class SelectedField(name: String, selector: Term) + + object SelectedField: + def unapply(term: Term): Option[SelectedField] = + term match + case lambda @ Lambda(List(ValDef(_, _, _)), Select(_, name)) => + Some(SelectedField(name, lambda)) + case _ => + None + def unapply(expr: Expr[Any]): Option[SelectedField] = unapply(expr.asTerm) + + sealed trait WriterField { + def name: String + + def nameWithStyle: String + + def update: Option[WriterField.Update] + + def tpe: TypeRepr + + def value(root: Term): Term = update match + case None => + Select.unique(root, name) + + case Some(WriterField.Update(lambda, WriterField.Update.What.Root)) => + (tpe.asType, root.tpe.asType) match + case ('[t1], '[t2]) => + '{ + ${ lambda.asExprOf[t2 => t1] }.apply(${ root.asExprOf[t2] }) + }.asTerm + + case Some(WriterField.Update(lambda, WriterField.Update.What.Field)) => + val field = Select.unique(root, name) + (tpe.asType, field.tpe.asType) match + case ('[finalType], '[fieldType]) => + '{ + ${ lambda.asExprOf[fieldType => finalType] }.apply(${ + field.asExprOf[fieldType] + }) + }.asTerm + + def label: Expr[String] + } + + end WriterField + + object WriterField: + case class Basic( + name: String, + nameWithStyle: String, + update: Option[WriterField.Update], + tpe: TypeRepr, + newName: Option[Expr[String]] + ) extends WriterField: + def label: Expr[String] = newName.getOrElse(Expr(nameWithStyle)) + + case class Added( + name: String, + label: Expr[String], + update: Option[Update], + tpe: TypeRepr + ) extends WriterField: + def nameWithStyle = name + + case class Update(lambda: Term, what: Update.What) + + object Update: + enum What: + case Root, Field + + case class WriterBuilderMacroConfig( + delete: Set[String] = Set.empty, + add: List[WriterField.Added] = Nil, + update: List[WriterFieldUpdate] = Nil, + fieldStyle: Option[FieldStyle] = None + ): + def withDelete(name: String) = copy(delete = delete + name) + def withField(field: WriterField.Added) = copy(add = field :: add) + + def withUpdate(op: WriterFieldUpdate) = copy(update = op :: update) + + case class WriterFieldUpdate( + name: String, + newName: Option[Expr[String]], + what: WriterField.Update.What, + fun: Option[Term], + to: TypeRepr + ) + + sealed trait ReaderField { + def name: String + def tpe: TypeRepr + def reader: Boolean + + def initializeFieldCase( + readers: Map[TypeRepr, Ref], + it: Expr[TokenIterator], + fieldName: Expr[FieldName] + ): Option[CaseDef] = + this match + case _: ReaderField.Basic => + Some( + readerTpe.get.asType match { + case '[t] => + CaseDef( + Literal(StringConstant(name)), + None, + Block( + init { + val reader = readers.get(readerTpe.get).fold(lookup[JsonReader[t]])(_.asExprOf[JsonReader[t]]) + '{${reader}.read(${it})(${fieldName}.appendFieldName(${Expr(name)}))}.asTerm + }, + '{}.asTerm + ) + ) + } + ) + + case _: ReaderField.Extracted => + iteratorRef.map { iteratorRef => + CaseDef( + Literal(StringConstant(name)), + None, + Block( + initIterator('{ ${it}.collectExpression() }.asTerm), + '{}.asTerm + ) + ) + } + + + lazy val (initialize, ref, initRef, iteratorRef) = { + val flags = default.fold(Flags.Deferred | Flags.Mutable)(_ => Flags.Mutable) + val symbol = Symbol.newVal(Symbol.spliceOwner, s"${name}Var", tpe, flags, Symbol.noSymbol) + val initSymbol = Symbol.newVal(Symbol.spliceOwner, s"${name}Init", TypeRepr.of[Boolean], Flags.Mutable, Symbol.noSymbol) + val stat = ValDef(symbol, default.map(_.asTerm)) + val initStat = ValDef(initSymbol, Some('{false}.asTerm)) + val iteratorSymbol = Option.when(reader)(Symbol.newVal(Symbol.spliceOwner, s"${name}Iterator", TypeRepr.of[TokenIterator], Flags.Mutable | Flags.Deferred, Symbol.noSymbol)) + val iteratorStat = iteratorSymbol.map(ValDef(_, None)) + val iteratorRef = iteratorStat.map(stat => Ref(stat.symbol)) + (List(stat, initStat) ++ iteratorStat, Ref(stat.symbol), Ref(initStat.symbol), iteratorRef) + } + + def idx: Int + def default: Option[Expr[Any]] + def readerTpe: Option[TypeRepr] = this match + case ReaderField.Basic(name, tpe, extractor, idx, default) => + Some(extractor.map(_._1).getOrElse(tpe)) + case field: ReaderField.Extracted if field.reader => + None + case field: ReaderField.Extracted => + Some(field.tpe) + + + def init(value: Term): List[Statement] = this match + case ReaderField.Basic(_, _, None, _, _) => + List( + Assign(ref, value), + Assign(initRef, '{true}.asTerm) + ) + + case ReaderField.Basic(_, _, Some((_, lambda)), _, _) => + List( + Assign(ref, Apply(Select.unique(lambda, "apply") , List(value))), + Assign(initRef, '{true}.asTerm) + ) + case extracted: ReaderField.Extracted => + List( + Assign(ref, value), + Assign(initRef, '{ true }.asTerm) + ) + + def initIterator(value: Term): List[Statement] = iteratorRef.map { ref => + List( + Assign(ref, value), + Assign(initRef, '{ true }.asTerm) + ) + }.getOrElse(Nil) + + + + def update( + index: Int, + default: Option[Expr[Any]], + fieldStyle: Option[FieldStyle] + ): ReaderField = this match + case field: ReaderField.Basic => + field.copy( + idx = index, + default = default, + name = fieldStyle.fold(field.name)(FieldStyle.applyStyle(field.name, _)) + ) + case field: ReaderField.Extracted => + field.copy( + idx = index, + default = default, + name = fieldStyle.fold(field.name)(FieldStyle.applyStyle(field.name, _)) + ) + } + + object ReaderField: + case class Basic( + name: String, + tpe: TypeRepr, + extractor: Option[(TypeRepr, Term)], + idx: Int = 0, + default: Option[Expr[Any]] = None + ) extends ReaderField: + def reader = false + + case class Extracted( + name: String, + tpe: TypeRepr, + extractors: List[(String, TypeRepr)], + lambda: Term, + reader: Boolean, + idx: Int = 0, + default: Option[Expr[Any]] = None + ) extends ReaderField: + def extract(fields: Map[String, Ref], fieldName: Expr[FieldName]): List[Statement] = + val term = extractors match + case (depName, _) :: Nil => + Apply(Select.unique(lambda, "apply"), List(fields(depName))) + case _ => + val value = extractors + .map((name, _) => fields(name)) + .foldRight[Term]('{ EmptyTuple }.asTerm) { (el, acc) => + Select.unique(acc, "*:") + .appliedToTypes(List(el.tpe, acc.tpe)) + .appliedToArgs(List(el)) + } + Select.unique(lambda, "apply").appliedToArgs(List(value)) + + iteratorRef match + case Some(iteratorRef) => + val reader = Typed(term, TypeTree.of[JsonReader[Any]]).asExprOf[JsonReader[Any]] + val it = '{if ${initRef.asExprOf[Boolean]} then ${iteratorRef.asExprOf[TokenIterator]} else QueueIterator(List(TokenNode.NullValueNode))} + val value = '{${reader}.read(${it})(${fieldName}.appendFieldName(${ Expr(name) }))} + init(value.asTerm) + case None => + init(term) + + case class ReaderBuilderMacroConfig( + extracted: Map[String, ReaderField] = Map.empty, + fieldStyle: Option[FieldStyle] = None, + isStrict: IsStrict = false + ): + def withExtracted(field: ReaderField): ReaderBuilderMacroConfig = + copy(extracted = extracted.updated(field.name, field)) + + type IsStrict = Boolean + + case class SumMacroConfig( + discriminator: Option[DiscriminatorConfig] = None + ) + + case class DiscriminatorConfig( + label: String, + tpe: TypeRepr, + values: List[Term] + ) + + extension (tpe: TypeRepr) + def isOption: Boolean = tpe <:< TypeRepr.of[Option[Any]] + + given FromExpr[FieldStyle] = new FromExpr[FieldStyle]: + override def unapply(x: Expr[FieldStyle])(using + Quotes + ): Option[FieldStyle] = + x match + case '{ FieldStyle.UpperCase } => Some(FieldStyle.UpperCase) + case '{ FieldStyle.LowerCase } => Some(FieldStyle.LowerCase) + case '{ FieldStyle.Capitalize } => Some(FieldStyle.Capitalize) + case '{ FieldStyle.Uncapitalize } => Some(FieldStyle.Uncapitalize) + case '{ FieldStyle.KebabCase } => Some(FieldStyle.KebabCase) + case '{ FieldStyle.LowerKebabCase } => Some(FieldStyle.LowerKebabCase) + case '{ FieldStyle.UpperKebabCase } => Some(FieldStyle.UpperKebabCase) + case '{ FieldStyle.CapitalizedKebabCase } => + Some(FieldStyle.CapitalizedKebabCase) + case '{ FieldStyle.SnakeCase } => Some(FieldStyle.SnakeCase) + case '{ FieldStyle.LowerSnakeCase } => Some(FieldStyle.LowerSnakeCase) + case '{ FieldStyle.UpperSnakeCase } => Some(FieldStyle.UpperSnakeCase) + case '{ FieldStyle.CapitalizedSnakeCase } => + Some(FieldStyle.CapitalizedSnakeCase) + case _ => None + + @deprecated + def legacyFieldStyleToFieldStyle(x: Expr[tethys.derivation.builder.FieldStyle]): Option[FieldStyle] = + x match + case '{ tethys.derivation.builder.FieldStyle.UpperCase } => Some(FieldStyle.UpperCase) + case '{ tethys.derivation.builder.FieldStyle.uppercase } => Some(FieldStyle.UpperCase) + case '{ tethys.derivation.builder.FieldStyle.LowerCase } => Some(FieldStyle.LowerCase) + case '{ tethys.derivation.builder.FieldStyle.lowercase } => Some(FieldStyle.LowerCase) + case '{ tethys.derivation.builder.FieldStyle.Capitalize } => Some(FieldStyle.Capitalize) + case '{ tethys.derivation.builder.FieldStyle.capitalize } => Some(FieldStyle.Capitalize) + case '{ tethys.derivation.builder.FieldStyle.Uncapitalize } => Some(FieldStyle.Uncapitalize) + case '{ tethys.derivation.builder.FieldStyle.uncapitalize } => Some(FieldStyle.Uncapitalize) + case '{ tethys.derivation.builder.FieldStyle.KebabCase } => Some(FieldStyle.KebabCase) + case '{ tethys.derivation.builder.FieldStyle.kebabCase } => Some(FieldStyle.KebabCase) + case '{ tethys.derivation.builder.FieldStyle.LowerKebabCase } => Some(FieldStyle.LowerKebabCase) + case '{ tethys.derivation.builder.FieldStyle.lowerKebabCase } => Some(FieldStyle.LowerKebabCase) + case '{ tethys.derivation.builder.FieldStyle.UpperKebabCase } => Some(FieldStyle.UpperKebabCase) + case '{ tethys.derivation.builder.FieldStyle.upperKebabCase } => Some(FieldStyle.UpperKebabCase) + case '{ tethys.derivation.builder.FieldStyle.CapitalizedKebabCase } => Some(FieldStyle.CapitalizedKebabCase) + case '{ tethys.derivation.builder.FieldStyle.capitalizedKebabCase } => Some(FieldStyle.CapitalizedKebabCase) + case '{ tethys.derivation.builder.FieldStyle.SnakeCase } => Some(FieldStyle.SnakeCase) + case '{ tethys.derivation.builder.FieldStyle.snakeCase } => Some(FieldStyle.SnakeCase) + case '{ tethys.derivation.builder.FieldStyle.LowerSnakeCase } => Some(FieldStyle.LowerSnakeCase) + case '{ tethys.derivation.builder.FieldStyle.lowerSnakeCase } => Some(FieldStyle.LowerSnakeCase) + case '{ tethys.derivation.builder.FieldStyle.UpperSnakeCase } => Some(FieldStyle.UpperSnakeCase) + case '{ tethys.derivation.builder.FieldStyle.upperSnakeCase } => Some(FieldStyle.UpperSnakeCase) + case '{ tethys.derivation.builder.FieldStyle.CapitalizedSnakeCase } => Some(FieldStyle.CapitalizedSnakeCase) + case '{ tethys.derivation.builder.FieldStyle.capitalizedSnakeCase } => Some(FieldStyle.CapitalizedSnakeCase) + case _ => None + + + @deprecated + def parseLegacyReaderDerivationConfig[T: Type](config: Expr[ReaderDerivationConfig], + mirror: Expr[Mirror.ProductOf[T]]): Expr[ReaderBuilder[T]] = + config match + case '{ ReaderDerivationConfig.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict } + + case '{ ReaderDerivationConfig.empty.strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict } + + case '{ ReaderDerivationConfig.withFieldStyle(${ fieldStyle }: FieldStyle).strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle).strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.strict.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.strict.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.withFieldStyle(${ fieldStyle }: FieldStyle).strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle).strict } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.strict.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case '{ ReaderDerivationConfig.empty.strict.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ ReaderBuilder[T](using ${ mirror }).strict.fieldStyle(${ fieldStyle }) } + + case other => + report.errorAndAbort(s"Unknown tree: ${other.asTerm.show(using Printer.TreeShortCode)}") + + @deprecated + def parseLegacyWriterDerivationConfig[T: Type](config: Expr[WriterDerivationConfig], + mirror: Expr[Mirror.ProductOf[T]]): Expr[WriterBuilder[T]] = + config match + case '{ WriterDerivationConfig.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ WriterBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ WriterDerivationConfig.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ WriterBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ WriterDerivationConfig.empty.withFieldStyle(${ fieldStyle }: FieldStyle) } => + '{ WriterBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case '{ WriterDerivationConfig.empty.withFieldStyle(${ fieldStyle }: tethys.derivation.builder.FieldStyle) } => + '{ WriterBuilder[T](using ${ mirror }).fieldStyle(${ fieldStyle }) } + + case other => + report.errorAndAbort(s"Unknown tree: ${other.asTerm.show(using Printer.TreeShortCode)}") + + def parseLegacyDiscriminator[T: Type](config: Expr[WriterDerivationConfig]): DiscriminatorConfig = + val name: String = config match + case '{ WriterDerivationConfig.withDiscriminator($name: String)} => name.valueOrAbort + case '{ WriterDerivationConfig.empty.withDiscriminator($name: String)} => name.valueOrAbort + case other => + report.errorAndAbort(s"Unknown tree: ${other.asTerm.show(using Printer.TreeShortCode)}") + + DiscriminatorConfig(name, TypeRepr.of[String], Nil) diff --git a/modules/core/src/main/scala-3/tethys/derivation/Derivation.scala b/modules/core/src/main/scala-3/tethys/derivation/Derivation.scala new file mode 100644 index 00000000..37e53eae --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/Derivation.scala @@ -0,0 +1,458 @@ +package tethys.derivation + +import tethys.derivation.builder.{ReaderDerivationConfig, WriterDerivationConfig} +import tethys.writers.tokens.TokenWriter +import tethys.readers.{FieldName, ReaderError} +import tethys.readers.tokens.TokenIterator +import tethys.{JsonObjectWriter, JsonReader, JsonWriter, ReaderBuilder, WriterBuilder} +import scala.Tuple2 +import scala.annotation.tailrec +import scala.compiletime.{constValueTuple, summonInline} +import scala.quoted.* +import scala.collection.mutable +import scala.deriving.Mirror + +private[tethys] +object Derivation: + + inline def deriveJsonWriterForProduct[T](inline config: WriterBuilder[T]): JsonObjectWriter[T] = + ${ DerivationMacro.deriveJsonWriterForProduct[T]('{config})} + + inline def deriveJsonWriterForSum[T]: JsonObjectWriter[T] = + ${ DerivationMacro.deriveJsonWriterForSum[T] } + + inline def deriveJsonReaderForProduct[T](inline config: ReaderBuilder[T]): JsonReader[T] = + ${ DerivationMacro.deriveJsonReaderForProduct[T]('{config})} + + @deprecated + inline def deriveJsonReaderForProductLegacy[T](inline config: ReaderDerivationConfig)(using mirror: Mirror.ProductOf[T]): JsonReader[T] = + ${ DerivationMacro.deriveJsonReaderForProductLegacy[T]('{config}, '{mirror}) } + + @deprecated + inline def deriveJsonWriterForProductLegacy[T](inline config: WriterDerivationConfig)(using mirror: Mirror.ProductOf[T]): JsonObjectWriter[T] = + ${ DerivationMacro.deriveJsonWriterForProductLegacy[T]('{config}, '{mirror}) } + + @deprecated + inline def deriveJsonWriterForSumLegacy[T](inline config: WriterDerivationConfig): JsonObjectWriter[T] = + ${ DerivationMacro.deriveJsonWriterForSumLegacy[T]('{ config }) } + + inline def deriveJsonReaderForSum[T]: JsonReader[T] = + ${ DerivationMacro.deriveJsonReaderForSum[T] } + +object DerivationMacro: + def deriveJsonWriterForProduct[T: Type](config: Expr[WriterBuilder[T]])(using quotes: Quotes): Expr[JsonObjectWriter[T]] = + new DerivationMacro(quotes).deriveJsonWriterForProduct[T](config) + + def deriveJsonWriterForSum[T: Type](using quotes: Quotes): Expr[JsonObjectWriter[T]] = + new DerivationMacro(quotes).deriveJsonWriterForSum[T](None) + + def deriveJsonReaderForProduct[T: Type](config: Expr[ReaderBuilder[T]])(using quotes: Quotes): Expr[JsonReader[T]] = + new DerivationMacro(quotes).deriveJsonReaderForProduct[T](config) + + def deriveJsonReaderForSum[T: Type](using quotes: Quotes): Expr[JsonReader[T]] = + new DerivationMacro(quotes).deriveJsonReaderForSum[T] + + @deprecated + def deriveJsonReaderForProductLegacy[T: Type](config: Expr[ReaderDerivationConfig], mirror: Expr[Mirror.ProductOf[T]])(using quotes: Quotes): Expr[JsonReader[T]] = + new DerivationMacro(quotes).deriveJsonReaderForProductLegacy[T](config, mirror) + + @deprecated + def deriveJsonWriterForProductLegacy[T: Type](config: Expr[WriterDerivationConfig], mirror: Expr[Mirror.ProductOf[T]])(using quotes: Quotes): Expr[JsonObjectWriter[T]] = + new DerivationMacro(quotes).deriveJsonWriterForProductLegacy[T](config, mirror) + + @deprecated + def deriveJsonWriterForSumLegacy[T: Type](config: Expr[WriterDerivationConfig])(using quotes: Quotes): Expr[JsonObjectWriter[T]] = + new DerivationMacro(quotes).deriveJsonWriterForSumLegacy[T](config) + +private[derivation] +class DerivationMacro(val quotes: Quotes) extends ConfigurationMacroUtils: + import quotes.reflect.* + + def deriveJsonWriterForProduct[T: Type](config: Expr[WriterBuilder[T]]): Expr[JsonObjectWriter[T]] = + val fields = prepareWriterProductFields(config) + val (missingWriters, refs) = deriveMissingWriters(TypeRepr.of[T], fields.map(_.tpe)) + val writer = Block( + missingWriters, + '{ + new JsonObjectWriter[T]: + override def writeValues(value: T, tokenWriter: TokenWriter): Unit = + ${ + Expr.block( + fields.map { field => field.tpe.asType match + case '[f] => + val writer = refs.get(field.tpe).fold(lookup[JsonWriter[f]])(_.asExprOf[JsonWriter[f]]) + '{ ${writer}.write(${ field.label }, ${ field.value('{ value }.asTerm).asExprOf[f] }, tokenWriter) } + }, + '{} + ) + } + }.asTerm + ) + writer.asExprOf[JsonObjectWriter[T]] + + def deriveJsonWriterForSum[T: Type](legacyConfig: Option[DiscriminatorConfig]): Expr[JsonObjectWriter[T]] = + val tpe = TypeRepr.of[T] + val parsedConfig = parseSumConfig[T] + val types = getAllChildren(tpe) + val (missingWriters, refs) = deriveMissingWritersForSum(types) + val mirror = '{summonInline[Mirror.SumOf[T]]} + val writer = Block( + missingWriters, + '{ + new JsonObjectWriter[T]: + override def writeValues(value: T, tokenWriter: TokenWriter): Unit = + ${ + legacyConfig.fold('{}) { case DiscriminatorConfig(label, tpe, values) => + '{ + JsonWriter.stringWriter.write( + name = ${ Expr(label) }, + value = ${Expr.ofList(types.map(t => Expr(t.typeSymbol.name.filterNot(_ == '$'))))}.apply(${mirror}.ordinal(value)), + tokenWriter = tokenWriter + ) + } + } + } + ${ + parsedConfig.discriminator.fold('{}) { case DiscriminatorConfig(label, tpe, discriminators) => + tpe.asType match + case '[discriminatorType] => + '{ + ${lookup[JsonWriter[discriminatorType]]}.write( + name = ${ Expr(label) }, + value = ${ Select.unique('{ value }.asTerm, label).asExprOf[discriminatorType] }, + tokenWriter = tokenWriter + ) + } + } + } + ${ matchByTypeAndWrite( + term = '{ value }.asTerm, + types = types, + write = (ref, tpe) => tpe.asType match + case '[t] => + val writer = refs.get(tpe).fold(lookup[JsonObjectWriter[t]])(_.asExprOf[JsonObjectWriter[t]]) + '{ ${writer}.writeValues(${ref.asExprOf[t]}, tokenWriter) } + ) + } + }.asTerm + ) + writer.asExprOf[JsonObjectWriter[T]] + + private def deriveMissingWritersForSum(types: List[TypeRepr]): (List[ValDef], Map[TypeRepr, Ref]) = + val (stats, refs) = types.flatMap { tpe => + tpe.asType match + case '[t] => + val symbol = Symbol.newVal( + Symbol.spliceOwner, + s"given_JsonWriter_${tpe.show(using Printer.TypeReprShortCode)}", + TypeRepr.of[JsonObjectWriter[t]], + Flags.Given, + Symbol.noSymbol + ) + val valDef = Option.when(lookupOpt[JsonObjectWriter[t]].isEmpty)( + ValDef(symbol, Some('{ JsonObjectWriter.derived[t](using ${lookup[Mirror.Of[t]]}) }.asTerm)) + ) + valDef.map(valDef => (valDef, (tpe, Ref(valDef.symbol)))) + }.unzip + (stats, refs.toMap) + + + private def tpeAsString(tpe: TypeRepr) = tpe.dealias.show(using Printer.TypeReprCode) + + private def deriveMissingWriters(thisTpe: TypeRepr, tpes: List[TypeRepr]): (List[ValDef], Map[TypeRepr, Ref]) = + val (stats, refs) = distinct(tpes).filterNot(isRecursive(thisTpe, _)) + .flatMap { tpe => + tpe.asType match + case '[t] => + lookupOpt[JsonWriter[t]].map { + _.asTerm match + case ident: Ident => + Left(ident) + case other => + Right(other) + } match + case Some(Left(writer)) => + None + + case other => + val valDef = ValDef( + Symbol.newVal( + Symbol.spliceOwner, + s"given_JsonWriter_${tpe.show(using Printer.TypeReprShortCode)}", + TypeRepr.of[JsonWriter[t]], + Flags.Given, + Symbol.noSymbol + ), + Some( + other.flatMap(_.toOption) + .getOrElse { + tpe match + case or: OrType => + deriveOrTypeJsonWriter[t].asTerm + case _ => + '{ JsonObjectWriter.derived[t](using ${ lookup[scala.deriving.Mirror.Of[t]] }) }.asTerm + } + ) + ) + Some((valDef, (tpe, Ref(valDef.symbol)))) + }.unzip + (stats, refs.toMap) + + + private def deriveOrTypeJsonWriter[T: Type]: Expr[JsonWriter[T]] = + def collectTypes(tpe: TypeRepr, acc: List[TypeRepr] = Nil): List[TypeRepr] = + tpe match + case OrType(left, right) => collectTypes(left, Nil) ::: acc ::: collectTypes(right, Nil) + case other => other :: acc + + val types = collectTypes(TypeRepr.of[T]) + val (missingWriters, refs) = deriveMissingWriters(TypeRepr.of[T], types) + val term = Block( + missingWriters, + '{ + new JsonWriter[T]: + def write(value: T, tokenWriter: TokenWriter): Unit = + ${ + matchByTypeAndWrite( + term = '{ value }.asTerm, + types = types, + (ref, tpe) => tpe.asType match + case '[t] => + val writer = refs.get(tpe).fold(lookup[JsonWriter[t]])(_.asExprOf[JsonWriter[t]]) + '{ ${writer}.write(${ref.asExprOf[t]}, tokenWriter) } + ) + } + }.asTerm + ) + term.asExprOf[JsonWriter[T]] + + + + private def matchByTypeAndWrite(term: Term, + types: List[TypeRepr], + write: (Ref, TypeRepr) => Expr[Unit]): Expr[Unit] = + Match( + term, + types.map { tpe => + tpe.asType match + case '[t] => + val valDef = ValDef( + Symbol.newVal(Symbol.spliceOwner, "value", tpe, Flags.EmptyFlags, Symbol.noSymbol), + Some(Typed(term, TypeTree.of[t])) + ) + CaseDef( + pattern = Bind(valDef.symbol, Typed(Wildcard(), TypeTree.of[t])), + guard = None, + rhs = write(Ref(valDef.symbol), tpe).asTerm + ) + } + ).asExprOf[Unit] + + def deriveJsonReaderForProduct[T: Type](config: Expr[ReaderBuilder[T]]): Expr[JsonReader[T]] = + val tpe = TypeRepr.of[T] + val (fields, isStrict) = prepareReaderProductFields[T](config) + val existingLabels = fields.map(_.name).toSet + val fieldsWithoutReader = fields.collect { case field: ReaderField.Extracted if field.reader => field.name } + + val (basicFields, extractedFields) = fields.partitionMap { + case field: ReaderField.Basic => Left(field) + case field: ReaderField.Extracted => Right(field) + } + + val expectedFieldNames = basicFields.map(_.name).toSet ++ extractedFields.flatMap(_.extractors.map(_._1)) -- extractedFields.map(_.name) + + def failIfNotInitialized(fieldName: Expr[FieldName]): Expr[Unit] = + basicFields.filterNot(_.default.nonEmpty) match + case refs @ head :: tail => + val boolExpr = tail.foldLeft('{!${head.initRef.asExprOf[Boolean]}}) { (acc, el) => + '{${acc} || !${el.initRef.asExprOf[Boolean]}} + } + '{ + if {$boolExpr} then + val uninitializedFields = new scala.collection.mutable.ArrayBuffer[String](${ Expr(refs.size) }) + ${ + Expr.block( + refs.map { ref => + '{ + if !${ref.initRef.asExprOf[Boolean]} then + uninitializedFields += ${Expr(ref.name)} + } + }, + '{} + ) + } + ReaderError.wrongJson("Can not extract fields from json: " + uninitializedFields.mkString(", "))(${fieldName}) + } + + case Nil => + '{} + + if tpe.typeSymbol.flags.is(Flags.Module) then + '{JsonReader.const(${Ref(tpe.termSymbol).asExprOf[T]})} + else + val (missingReaders, refs) = deriveMissingReaders(tpe, basicFields.map(_.tpe)) + val term = Block( + missingReaders, + '{ + new JsonReader[T]: + given JsonReader[T] = this + override def read(it: TokenIterator)(using fieldName: FieldName) = + if !it.currentToken().isObjectStart then + ReaderError.wrongJson("Expected object start but found: " + it.currentToken().toString) + else + it.nextToken() + ${ + Block( + fields.flatMap(_.initialize), + '{ + while (!it.currentToken().isObjectEnd) + val jsonName = it.fieldName() + it.nextToken() + ${ + Match( + selector = '{ jsonName }.asTerm, + cases = fields.flatMap(_.initializeFieldCase(refs, '{ it }, '{ fieldName })) :+ + CaseDef( + Wildcard(), + None, + if isStrict then + '{ ReaderError.wrongJson(s"unexpected field '$jsonName', expected one of ${${ Expr(expectedFieldNames.mkString("'", "', '", "'")) }}") }.asTerm + else + '{ it.skipExpression() ; () }.asTerm + ) + ).asExprOf[Unit] + } + it.nextToken() + + ${ failIfNotInitialized('{ fieldName }) } + + ${ + val allRefs = fields.map(field => field.name -> field.ref).toMap + Expr.block(extractedFields.flatMap(_.extract(allRefs, '{fieldName})).map(_.asExprOf[Unit]), '{}) + } + + ${ + New(TypeTree.of[T]) + .select(tpe.classSymbol.get.primaryConstructor) + .appliedToTypes(tpe.typeArgs) + .appliedToArgs(fields.filterNot(_.idx == -1).sortBy(_.idx).map(_.ref)) + .asExprOf[T] + } + + }.asTerm + ).asExprOf[T] + } + }.asTerm + ) + term.asExprOf[JsonReader[T]] + + + def deriveJsonReaderForSum[T: Type]: Expr[JsonReader[T]] = + val tpe = TypeRepr.of[T] + val parsed = parseSumConfig[T] + val children = getAllChildren(tpe) + parsed.discriminator match + case Some(DiscriminatorConfig(label, tpe, discriminators)) => tpe.asType match + case '[discriminator] => + val (discriminatorStats, discriminatorRefs) = discriminators.zipWithIndex.map((term, idx) => + val stat = ValDef( + Symbol.newVal(Symbol.spliceOwner, s"Discriminator_$idx", term.tpe, Flags.Private, Symbol.noSymbol), + Some(term) + ) + (stat, Ref(stat.symbol)) + ).unzip + val (readers, refs) = deriveMissingReaders(TypeRepr.of[T], children) + val term = Block( + readers ++ discriminatorStats, + '{ + JsonReader.builder + .addField[discriminator]( + name = ${Expr(label)}, + jsonReader = ${lookup[JsonReader[discriminator]]} + ) + .selectReader[T] { discriminator => + ${ + Match( + '{discriminator}.asTerm, + children.zip(discriminatorRefs).map((tpe, branchDiscriminator) => tpe.asType match + case '[t] => + CaseDef( + branchDiscriminator, + None, + Typed(refs.getOrElse(tpe, lookup[JsonReader[t]].asTerm), TypeTree.of[JsonReader[? <: T]]) + ) + ) :+ CaseDef(Wildcard(), None, + '{ReaderError.wrongJson(s"Unexpected discriminator found: $discriminator")(using FieldName(${Expr(label)})) }.asTerm + ) + ).asExprOf[JsonReader[? <: T]] + } + } + }.asTerm + ) + term.asExprOf[JsonReader[T]] + + case None => + report.errorAndAbort("Discriminator is required to derive JsonReader for sum type. Use @selector annotation") + + private def distinct(tpes: List[TypeRepr]) = + tpes.foldLeft(List.empty[TypeRepr]) { (acc, tpe) => + if (acc.exists(_ =:= tpe)) acc + else tpe :: acc + } + + private def isRecursive(tpe: TypeRepr, childTpe: TypeRepr): Boolean = + tpe =:= childTpe || (childTpe match + case AppliedType(_, types) => types.exists(isRecursive(tpe, _)) + case _ => false) + + private def deriveMissingReaders(thisTpe: TypeRepr, tpes: List[TypeRepr]): (List[ValDef], Map[TypeRepr, Ref]) = + val (stats, refs) = distinct(tpes).filterNot(isRecursive(thisTpe, _)) + .flatMap { tpe => + tpe.asType match + case '[t] => + lookupOpt[JsonReader[t]].map { + _.asTerm match + case ident: Ident => + Left(ident) + case other => + Right(other) + } match + case Some(Left(_)) => + None + + case other => + val valDef = ValDef( + Symbol.newVal( + Symbol.spliceOwner, + s"given_JsonReader_${tpe.show(using Printer.TypeReprShortCode)}", + TypeRepr.of[JsonReader[t]], + Flags.Given, + Symbol.noSymbol + ), + Some( + other.flatMap(_.toOption) + .getOrElse { + '{ JsonReader.derived[t](using ${ lookup[scala.deriving.Mirror.Of[t]] }) }.asTerm + } + ) + ) + Some((valDef, (tpe, Ref(valDef.symbol)))) + }.unzip + (stats, refs.toMap) + + + @deprecated + def deriveJsonReaderForProductLegacy[T: Type](config: Expr[ReaderDerivationConfig], + mirror: Expr[Mirror.ProductOf[T]] + ): Expr[JsonReader[T]] = + deriveJsonReaderForProduct(parseLegacyReaderDerivationConfig(config, mirror)) + + @deprecated + def deriveJsonWriterForProductLegacy[T: Type](config: Expr[WriterDerivationConfig], + mirror: Expr[Mirror.ProductOf[T]]): Expr[JsonObjectWriter[T]] = + deriveJsonWriterForProduct(parseLegacyWriterDerivationConfig(config, mirror)) + + + @deprecated + def deriveJsonWriterForSumLegacy[T: Type](config: Expr[WriterDerivationConfig]): Expr[JsonObjectWriter[T]] = + deriveJsonWriterForSum(Some(parseLegacyDiscriminator(config))) diff --git a/modules/core/src/main/scala-3/tethys/derivation/EnumCompanion.scala b/modules/core/src/main/scala-3/tethys/derivation/EnumCompanion.scala new file mode 100644 index 00000000..8f5356fe --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/EnumCompanion.scala @@ -0,0 +1,33 @@ +package tethys.derivation + +private[tethys] +object EnumCompanion: + inline def getByName[T](name: String): T = + ${ EnumCompanionMacro.getByName[T]('{ name }) } + + inline def getByOrdinal[T](ordinal: Int): T = + ${ EnumCompanionMacro.getByOrdinal[T]('{ ordinal }) } + + inline def isEnum[T]: Boolean = + ${ EnumCompanionMacro.isEnum[T] } + + +private[derivation] +object EnumCompanionMacro: + import scala.quoted.* + def getByName[T: scala.quoted.Type](name: Expr[String])(using quotes: Quotes): Expr[T] = + import quotes.reflect.* + Select.unique(Ref(TypeRepr.of[T].typeSymbol.companionModule), "valueOf") + .appliedToArgs(List(name.asTerm)) + .asExprOf[T] + + + def getByOrdinal[T: scala.quoted.Type](ordinal: Expr[Int])(using quotes: Quotes): Expr[T] = + import quotes.reflect.* + Select.unique(Ref(TypeRepr.of[T].typeSymbol.companionModule), "fromOrdinal") + .appliedToArgs(List(ordinal.asTerm)) + .asExprOf[T] + + def isEnum[T: scala.quoted.Type](using quotes: Quotes): Expr[Boolean] = + import quotes.reflect.* + Expr(TypeRepr.of[T].typeSymbol.flags.is(Flags.Enum)) diff --git a/modules/core/src/main/scala-3/tethys/derivation/JsonObjectWriterDerivation.scala b/modules/core/src/main/scala-3/tethys/derivation/JsonObjectWriterDerivation.scala new file mode 100644 index 00000000..23d0f002 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/JsonObjectWriterDerivation.scala @@ -0,0 +1,39 @@ +package tethys.derivation + +import tethys.derivation.builder.WriterDerivationConfig + +import scala.deriving.Mirror +import tethys.{JsonObjectWriter, JsonWriter, WriterBuilder} +import tethys.writers.tokens.TokenWriter + +import scala.deriving.Mirror +import scala.compiletime.{constValueTuple, erasedValue, summonFrom, summonInline} + +private[tethys] trait JsonObjectWriterDerivation: + + inline def derived[A](inline config: WriterBuilder[A])(using mirror: Mirror.ProductOf[A]) = + Derivation.deriveJsonWriterForProduct[A](config) + + @deprecated("Use WriterBuilder instead") + inline def derived[A](inline config: WriterDerivationConfig)(using mirror: Mirror.Of[A]) = + inline mirror match + case given Mirror.ProductOf[A] => + Derivation.deriveJsonWriterForProductLegacy[A](config) + + case given Mirror.SumOf[A] => + Derivation.deriveJsonWriterForSumLegacy[A](config) + + inline def derived[A](using mirror: Mirror.Of[A]): JsonObjectWriter[A] = + inline mirror match + case given Mirror.ProductOf[A] => + Derivation.deriveJsonWriterForProduct[A]( + summonFrom[WriterBuilder[A]] { + case config: WriterBuilder[A] => + config + case _ => WriterBuilder[A] + } + ) + + case given Mirror.SumOf[A] => + Derivation.deriveJsonWriterForSum[A] + \ No newline at end of file diff --git a/modules/core/src/main/scala-3/tethys/derivation/JsonReaderDerivation.scala b/modules/core/src/main/scala-3/tethys/derivation/JsonReaderDerivation.scala new file mode 100644 index 00000000..8aa62ce1 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/JsonReaderDerivation.scala @@ -0,0 +1,45 @@ +package tethys.derivation + +import tethys.commons.TokenNode +import tethys.readers.tokens.{QueueIterator, TokenIterator} +import tethys.readers.{FieldName, ReaderError} +import tethys.JsonReader +import tethys.ReaderBuilder +import tethys.derivation.builder.ReaderDerivationConfig + +import scala.collection.mutable +import scala.deriving.Mirror +import scala.compiletime.{constValue, constValueTuple, erasedValue, summonFrom, summonInline} + + +private [tethys] +trait JsonReaderDerivation: + def const[A](value: A): JsonReader[A] = + new JsonReader[A]: + override def read(it: TokenIterator)(implicit fieldName: FieldName): A = + if !it.currentToken().isObjectStart then + ReaderError.wrongJson("Expected object start but found: " + it.currentToken().toString) + else { + it.skipExpression() + value + } + + inline def derived[A](inline config: ReaderBuilder[A])(using mirror: Mirror.ProductOf[A]): JsonReader[A] = + Derivation.deriveJsonReaderForProduct[A](config) + + @deprecated("Use ReaderBuilder instead") + inline def derived[A](inline config: ReaderDerivationConfig)(using mirror: Mirror.ProductOf[A]): JsonReader[A] = + Derivation.deriveJsonReaderForProductLegacy[A](config) + + inline def derived[A](using mirror: Mirror.Of[A]): JsonReader[A] = + inline mirror match + case given Mirror.ProductOf[A] => + Derivation.deriveJsonReaderForProduct[A]( + summonFrom[ReaderBuilder[A]] { + case config: ReaderBuilder[A] => config + case _ => ReaderBuilder[A] + } + ) + case given Mirror.SumOf[A] => + Derivation.deriveJsonReaderForSum[A] + \ No newline at end of file diff --git a/modules/core/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala b/modules/core/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala new file mode 100644 index 00000000..e1a9c1bb --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala @@ -0,0 +1,16 @@ +package tethys.derivation.builder + +import java.util.regex.Pattern + +@deprecated("use tethys.FieldStyle") +enum FieldStyle { + case Capitalize, Uncapitalize, LowerCase, UpperCase + + case KebabCase, LowerKebabCase, UpperKebabCase, CapitalizedKebabCase + + case SnakeCase, LowerSnakeCase, UpperSnakeCase, CapitalizedSnakeCase + + case capitalize, uncapitalize, lowercase, uppercase + case kebabCase, lowerKebabCase, upperKebabCase, capitalizedKebabCase + case snakeCase, lowerSnakeCase, upperSnakeCase, capitalizedSnakeCase +} diff --git a/modules/core/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala b/modules/core/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala new file mode 100644 index 00000000..fc20f702 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala @@ -0,0 +1,7 @@ +package tethys.derivation.builder + +@deprecated("use tethys.ReaderBuilder") +type ReaderBuilder[A] = tethys.ReaderBuilder[A] + +@deprecated("use tethys.ReaderBuilder") +inline def ReaderBuilder: tethys.ReaderBuilder.type = tethys.ReaderBuilder diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala b/modules/core/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala similarity index 61% rename from modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala rename to modules/core/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala index 9d3815c0..d56b131a 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala +++ b/modules/core/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala @@ -1,20 +1,23 @@ package tethys.derivation.builder -case class ReaderDerivationConfig(fieldStyle: Option[FieldStyle], - isStrict: Boolean) { - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) - def strict: ReaderDerivationConfig = this.copy(isStrict = true) +import tethys.FieldStyle + +@deprecated("Use ReaderBuilder[A] instead") +case class ReaderDerivationConfig() { + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = this + def withFieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): ReaderDerivationConfig = this + def strict: ReaderDerivationConfig = this } +@deprecated("Use ReaderBuilder[A] instead") object ReaderDerivationConfig { - def empty: ReaderDerivationConfig = ReaderDerivationConfig( - fieldStyle = None, - isStrict = false - ) - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = empty.withFieldStyle(fieldStyle) - def strict: ReaderDerivationConfig = empty.strict + def empty: ReaderDerivationConfig = ReaderDerivationConfig() + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = empty + def withFieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): ReaderDerivationConfig = empty + def strict: ReaderDerivationConfig = empty } +@deprecated("Use ReaderBuilder[A] instead") case class ReaderDescription[A](config: ReaderDerivationConfig, operations: Seq[ReaderDescription.BuilderOperation]) object ReaderDescription { diff --git a/modules/core/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala b/modules/core/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala new file mode 100644 index 00000000..ab0bbac1 --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala @@ -0,0 +1,7 @@ +package tethys.derivation.builder + +@deprecated("use tethys.WriterBuilder") +type WriterBuilder[A] = tethys.WriterBuilder[A] + +@deprecated("use tethys.WriterBuilder") +inline def WriterBuilder: tethys.WriterBuilder.type = tethys.WriterBuilder diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala b/modules/core/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala similarity index 79% rename from modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala rename to modules/core/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala index e5c95d8d..1120f6b0 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala +++ b/modules/core/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala @@ -1,18 +1,23 @@ package tethys.derivation.builder +import tethys.FieldStyle import tethys.derivation.builder.WriterDescription.BuilderOperation +@deprecated("Use WriterBuilder[A] instead") case class WriterDerivationConfig(fieldStyle: Option[FieldStyle], discriminator: Option[String] = None) { - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) - def withDiscriminator(discriminator: String): WriterDerivationConfig = this.copy(discriminator = Some(discriminator)) + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = this + def withFieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): WriterDerivationConfig = this + def withDiscriminator(discriminator: String): WriterDerivationConfig = this } object WriterDerivationConfig { def empty: WriterDerivationConfig = WriterDerivationConfig(None) - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = empty.copy(fieldStyle = Some(fieldStyle)) - def withDiscriminator(discriminator: String): WriterDerivationConfig = empty.copy(discriminator = Some(discriminator)) + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = empty + def withFieldStyle(fieldStyle: tethys.derivation.builder.FieldStyle): WriterDerivationConfig = empty + def withDiscriminator(discriminator: String): WriterDerivationConfig = empty } +@deprecated("Use WriterBuilder[A] instead") case class WriterDescription[A](config: WriterDerivationConfig, operations: Seq[BuilderOperation[A]]) object WriterDescription { @@ -26,4 +31,4 @@ object WriterDescription { case class UpdatePartialFromRoot[T, To](field: String, name: Option[String], fun: PartialFunction[T, To]) extends BuilderOperation[T] case class Add[T, To](field: String, fun: T => To) extends BuilderOperation[T] } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala-3/tethys/selector.scala b/modules/core/src/main/scala-3/tethys/selector.scala new file mode 100644 index 00000000..cb3e516b --- /dev/null +++ b/modules/core/src/main/scala-3/tethys/selector.scala @@ -0,0 +1,3 @@ +package tethys + +class selector extends scala.annotation.StaticAnnotation diff --git a/modules/core/src/main/scala/tethys/JsonObjectWriter.scala b/modules/core/src/main/scala/tethys/JsonObjectWriter.scala index ad8fbc72..f6b16565 100644 --- a/modules/core/src/main/scala/tethys/JsonObjectWriter.scala +++ b/modules/core/src/main/scala/tethys/JsonObjectWriter.scala @@ -29,7 +29,7 @@ trait JsonObjectWriter[A] extends JsonWriter[A] { } } -object JsonObjectWriter extends LowPriorityJsonObjectWriters { +object JsonObjectWriter extends LowPriorityJsonObjectWriters with derivation.JsonObjectWriterDerivation { def apply[A](implicit jsonObjectWriter: JsonObjectWriter[A]): JsonObjectWriter[A] = jsonObjectWriter } diff --git a/modules/core/src/main/scala/tethys/JsonReader.scala b/modules/core/src/main/scala/tethys/JsonReader.scala index 0fe0b174..14d99b90 100644 --- a/modules/core/src/main/scala/tethys/JsonReader.scala +++ b/modules/core/src/main/scala/tethys/JsonReader.scala @@ -20,7 +20,7 @@ trait JsonReader[@specialized(specializations) A] { } } -object JsonReader extends AllJsonReaders { +object JsonReader extends AllJsonReaders with derivation.JsonReaderDerivation { def apply[A](implicit jsonReader: JsonReader[A]): JsonReader[A] = jsonReader val builder: JsonReaderBuilder.type = JsonReaderBuilder diff --git a/modules/core/src/main/scala/tethys/JsonWriter.scala b/modules/core/src/main/scala/tethys/JsonWriter.scala index 205263a7..80a3df60 100644 --- a/modules/core/src/main/scala/tethys/JsonWriter.scala +++ b/modules/core/src/main/scala/tethys/JsonWriter.scala @@ -26,7 +26,8 @@ trait JsonWriter[@specialized(specializations) A] { } } -object JsonWriter extends AllJsonWriters { +object JsonWriter extends AllJsonWriters with derivation.JsonObjectWriterDerivation { + def apply[A](implicit jsonWriter: JsonWriter[A]): JsonWriter[A] = jsonWriter def obj[A]: SimpleJsonObjectWriter[A] = SimpleJsonObjectWriter[A] diff --git a/modules/core/src/test/scala-3/tethys/derivation/ADTWithType.scala b/modules/core/src/test/scala-3/tethys/derivation/ADTWithType.scala new file mode 100644 index 00000000..01667b2c --- /dev/null +++ b/modules/core/src/test/scala-3/tethys/derivation/ADTWithType.scala @@ -0,0 +1,8 @@ +package tethys.derivation + +sealed trait ADTWithType[A] + +object ADTWithType { + case class ADTWithTypeA[A](a: A) extends ADTWithType[A] + case class ADTWithTypeB[A](a: A, b: ADTWithType[A]) extends ADTWithType[A] +} diff --git a/modules/core/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala b/modules/core/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala new file mode 100644 index 00000000..ff242e00 --- /dev/null +++ b/modules/core/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala @@ -0,0 +1,11 @@ +package tethys.derivation + +sealed trait ADTWithWrongType[A] + +object ADTWithWrongType { + + case class ADTWithWrongTypeA[A](a: A) extends ADTWithWrongType[A] + + case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) extends ADTWithWrongType[A] + +} diff --git a/modules/core/src/test/scala-3/tethys/derivation/DerivationSpec.scala b/modules/core/src/test/scala-3/tethys/derivation/DerivationSpec.scala new file mode 100644 index 00000000..ff17fb5d --- /dev/null +++ b/modules/core/src/test/scala-3/tethys/derivation/DerivationSpec.scala @@ -0,0 +1,701 @@ +package tethys.derivation + +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers +import tethys.commons.TokenNode.{arr, obj} +import tethys.commons.{Token, TokenNode} +import tethys.readers.tokens.QueueIterator +import tethys.writers.tokens.SimpleTokenWriter.SimpleTokenWriterOps +import tethys.* +import tethys.derivation.ADTWithType.{ADTWithTypeA, ADTWithTypeB} +import tethys.readers.ReaderError +import tethys.writers.instances.SimpleJsonObjectWriter + +class DerivationSpec extends AnyFlatSpec with Matchers { + + def read[A: JsonReader](nodes: List[TokenNode]): A = { + val it = QueueIterator(nodes) + val res = it.readJson[A].fold(throw _, identity) + it.currentToken() shouldBe Token.Empty + res + } + + it should "compile and correctly write and read product" in { + case class Person(id: Int, name: String, phone: Option[String], default: String = "") derives JsonObjectWriter, JsonReader + + case class Wrapper(person: Person) derives JsonObjectWriter, JsonReader + + Person(2, "Peter", None).asTokenList shouldBe obj( + "id" -> 2, + "name" -> "Peter", + "default" -> "" + ) + + Wrapper(Person(3, "Parker", None, "abc")).asTokenList shouldBe obj( + "person" -> obj("id" -> 3, "name" -> "Parker", "default" -> "abc") + ) + + read[Person](obj("id" -> 1, "name" -> "abc")) shouldBe Person(1, "abc", None) + + read[Person]( + obj( + "abd" -> 3, + "name" -> "abc", + "id" -> 1, + "default" -> "abc" + ) + ) shouldBe Person(1, "abc", None, "abc") + + read[Wrapper]( + obj( + "abc" -> 5, + "person" -> obj("id" -> 3, "name" -> "Parker", "phone" -> "123") + ) + ) shouldBe Wrapper(Person(3, "Parker", Some("123"))) + } + + it should "compile and correctly write sum" in { + sealed trait A derives JsonObjectWriter + + case class B(b: Int, i: String) extends A derives JsonObjectWriter + + case class C(c: String) extends A derives JsonObjectWriter + + + (B(2, "abc"): A).asTokenList shouldBe obj( + "b" -> 2, + "i" -> "abc" + ) + } + + it should "compile and correctly read/write enum with StringEnumWriter" in { + enum A derives StringEnumJsonWriter, StringEnumJsonReader: + case B, C + + A.B.asTokenList shouldBe TokenNode.value("B") + A.C.asTokenList shouldBe TokenNode.value("C") + + read[A]( + TokenNode.value("B") + ) shouldBe A.B + + read[A]( + TokenNode.value("C") + ) shouldBe A.C + } + + it should "compile and correctly read/write enum with OrdinalEnumWriter" in { + enum A derives OrdinalEnumJsonWriter, OrdinalEnumJsonReader: + case B, C + + A.B.asTokenList shouldBe TokenNode.value(0) + A.C.asTokenList shouldBe TokenNode.value(1) + + read[A]( + TokenNode.value(0) + ) shouldBe A.B + + read[A]( + TokenNode.value(1) + ) shouldBe A.C + } + + it should "compile and correcly write enum obj with discriminator" in { + enum A: + case B, C + + { + given JsonWriter[A] = StringEnumJsonWriter.withLabel("__type") + A.B.asTokenList shouldBe obj("__type" -> "B") + A.C.asTokenList shouldBe obj("__type" -> "C") + } + + { + given JsonWriter[A] = OrdinalEnumJsonWriter.withLabel("__type") + + A.B.asTokenList shouldBe obj("__type" -> 0) + A.C.asTokenList shouldBe obj("__type" -> 1) + } + } + + it should "correctly read case classes with default parameters" in { + object Mod { + case class WithOpt(x: Int, y: Option[String] = Some("default")) derives JsonReader + } + + read[Mod.WithOpt](obj("x" -> 5)) shouldBe Mod.WithOpt(5) + } + + it should "correctly read case classes with default parameters and type arguments" in { + case class WithArg[A](x: Int, y: Option[A] = None) derives JsonReader + + read[WithArg[Int]](obj("x" -> 5)) shouldBe WithArg[Int](5) + read[WithArg[String]](obj("x" -> 5, "y" -> "lool")) shouldBe WithArg[String](5, Some("lool")) + } + + it should "write/read sum types with provided json discriminator" in { + enum Disc derives StringEnumJsonWriter, StringEnumJsonReader: + case A, B + + sealed trait Choose(@selector val discriminator: Disc) derives JsonObjectWriter, JsonReader + + object Choose: + case class AA() extends Choose(Disc.A) + case class BB() extends Choose(Disc.B) + + (Choose.AA(): Choose).asTokenList shouldBe obj("discriminator" -> "A") + (Choose.BB(): Choose).asTokenList shouldBe obj("discriminator" -> "B") + + read[Choose](obj("discriminator" -> "A")) shouldBe Choose.AA() + read[Choose](obj("discriminator" -> "B")) shouldBe Choose.BB() + } + + it should "write/read sum types with provided json discriminator of simple type" in { + enum Choose(@selector val discriminator: Int) derives JsonObjectWriter, JsonReader: + case AA() extends Choose(0) + case BB() extends Choose(1) + + (Choose.AA(): Choose).asTokenList shouldBe obj("discriminator" -> 0) + (Choose.BB(): Choose).asTokenList shouldBe obj("discriminator" -> 1) + + read[Choose](obj("discriminator" -> 0)) shouldBe Choose.AA() + read[Choose](obj("discriminator" -> 1)) shouldBe Choose.BB() + } + + it should "not compile derivation when discriminator override found" in { + + """ + | + | sealed trait Foo(@selector val x: Int) derives JsonReader, JsonObjectWriter + | + | object Foo: + | given JsonDiscriminator[Foo, Int] = JsonDiscriminator.by(_.x) + | + | case class Bar(override val x: Int) extends Foo(x) + | + | case class Baz() extends Foo(0) + | + |""" shouldNot compile + + + } + + it should "derive readers for simple case class hierarchy" in { + implicit val dReader: JsonReader[D] = JsonReader.derived[D] + implicit val cReader: JsonReader[C] = JsonReader.derived[C] + implicit val jsonTreeTestDataReader: JsonReader[JsonTreeTestData] = JsonReader.derived[JsonTreeTestData] + + read[JsonTreeTestData](obj( + "a" -> 1, + "b" -> true, + "c" -> obj( + "d" -> obj( + "a" -> 2 + ) + ) + )) shouldBe JsonTreeTestData( + a = 1, + b = true, + c = C(D(2)) + ) + } + + it should "derive reader for recursive type" in { + given JsonReader[RecursiveType] = JsonReader.derived[RecursiveType] + + read[RecursiveType](obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ), + obj( + "a" -> 3, + "children" -> arr() + ) + ) + )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) + + } + + it should "derive reader for A => B => A cycle" in { + implicit lazy val testReader1: JsonReader[ComplexRecursionA] = JsonReader.derived[ComplexRecursionA] + implicit lazy val testReader2: JsonReader[ComplexRecursionB] = JsonReader.derived[ComplexRecursionB] + + read[ComplexRecursionA](obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) + ) + )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) + } + + it should "derive reader for extract as description" in { + given JsonReader[SimpleType] = JsonReader.derived[SimpleType] { + ReaderBuilder[SimpleType] + .extract(_.i).as[Option[Int]](_.getOrElse(2)) + } + + + read[SimpleType](obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(1, "str", 1.0) + + read[SimpleType](obj( + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(2, "str", 1.0) + } + + + it should "work for deprecated ReaderBuilder" in { + import tethys.derivation.builder.ReaderBuilder + given JsonReader[SimpleType] = JsonReader.derived[SimpleType] { + ReaderBuilder[SimpleType] + .extract(_.i).as[Option[Int]](_.getOrElse(2)) + } + + + read[SimpleType](obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(1, "str", 1.0) + + read[SimpleType](obj( + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(2, "str", 1.0) + } + + + + it should "derive reader for extract from description" in { + given JsonReader[SimpleType] = JsonReader.derived { + ReaderBuilder[SimpleType] + .extract(_.i).from(_.s).and(_.d).apply((_, _) => 2) + } + + read[SimpleType](obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(2, "str", 1.0) + + read[SimpleType](obj( + "s" -> "str", + "d" -> 1.0 + )) shouldBe SimpleType(2, "str", 1.0) + } + + + it should "derive reader for extract from description with synthetic field" in { + given JsonReader[SimpleType] = JsonReader.derived[SimpleType] { + ReaderBuilder[SimpleType] + .extract(_.i).from(_.d).and[Double]("e")((d, e) => (d + e).toInt) + } + + read[SimpleType](obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "e" -> 2.0 + )) shouldBe SimpleType(3, "str", 1.0) + + read[SimpleType](obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 3.0 + )) shouldBe SimpleType(4, "str", 1.0) + } + + it should "extract and build product" in { + case class Person(name: String, age: Int) + case class Wrapper(person: Person) derives JsonReader + + inline given ReaderBuilder[Wrapper] = ReaderBuilder[Wrapper] + .extract(_.person).from[String]("name").and[Int]("age").product + + + read[Wrapper](obj( + "name" -> "str", + "age" -> 2 + )) shouldBe Wrapper(Person("str", 2)) + } + + + it should "derive reader for extract reader from description" in { + given JsonReader[SimpleTypeWithAny] = JsonReader.derived[SimpleTypeWithAny] { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any).from(_.d) { + case 1.0 => JsonReader[String] + case 2.0 => JsonReader[Int] + } + } + + read[SimpleTypeWithAny](obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "any" -> "anyStr" + )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + read[SimpleTypeWithAny](obj( + "i" -> 1, + "s" -> "str", + "d" -> 2.0, + "any" -> 2 + )) shouldBe SimpleTypeWithAny(1, "str", 2.0, 2) + } + + it should "derive reader for complex extraction case" in { + given JsonReader[SimpleTypeWithAny] = JsonReader.derived[SimpleTypeWithAny] { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any).from(_.i) { + case 1 => JsonReader[String] + case 2 => JsonReader[Int] + case _ => JsonReader[Option[Boolean]] + } + .extract(_.i).from(_.d).and[Int]("e")((d, e) => d.toInt + e) + .extract(_.d).as[Option[Double]](_.getOrElse(1.0)) + } + + read[SimpleTypeWithAny](obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 0, + "any" -> "anyStr" + )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + + read[SimpleTypeWithAny](obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 1, + "any" -> 3 + )) shouldBe SimpleTypeWithAny(2, "str", 1.0, 3) + + read[SimpleTypeWithAny](obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 2, + "any" -> true + )) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) + + read[SimpleTypeWithAny](obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 2 + )) shouldBe SimpleTypeWithAny(3, "str", 1.0, None) + } + + + it should "derive reader for fieldStyle from description" in { + given JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames] { + ReaderBuilder[CamelCaseNames] + .fieldStyle(FieldStyle.LowerSnakeCase) + } + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + } + + it should "derive reader for fieldStyle from function in description" in { + given JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames] { + ReaderBuilder[CamelCaseNames] + .fieldStyle(FieldStyle.Capitalize) + } + + read[CamelCaseNames](obj( + "SomeParam" -> 1, + "IDParam" -> 2, + "Simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + } + + + it should "derive reader for reader config" in { + given JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames]( + ReaderBuilder[CamelCaseNames] + .fieldStyle(FieldStyle.LowerSnakeCase) + .strict + ) + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + + (the[ReaderError] thrownBy { + read[CamelCaseNames](obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + )) + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" + } + + + it should "derive reader for reader config from builder" in { + implicit val reader: JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames]( + ReaderBuilder[CamelCaseNames] + .strict + .fieldStyle(FieldStyle.LowerSnakeCase) + ) + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + + (the[ReaderError] thrownBy { + read[CamelCaseNames](obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + )) + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" + } + + + + it should "generate proper writer from WriterDescription" in { + def freeVariable: String = "e" + + implicit val dWriter: JsonWriter[D] = JsonWriter.derived[D]( + WriterBuilder[D].fieldStyle(FieldStyle.UpperCase) + ) + + implicit val testWriter: JsonWriter[JsonTreeTestData] = JsonWriter.derived { + WriterBuilder[JsonTreeTestData] + .remove(_.b) + .update(_.a).fromRoot(d => d.a.toDouble + d.c.d.a) + .update(_.c)(_.d) + .add("d")(_.a * 2) + .add(freeVariable)(_.b) + } + JsonTreeTestData(5, b = false, C(D(1))).asTokenList shouldBe obj( + "a" -> 6.0, + "c" -> obj( + "A" -> 1 + ), + "d" -> 10, + "e" -> false + ) + } + + it should "work for deprecated WriterBuilder" in { + def freeVariable: String = "e" + import tethys.derivation.builder.WriterBuilder + + implicit val dWriter: JsonWriter[D] = JsonWriter.derived[D]( + WriterBuilder[D].fieldStyle(FieldStyle.UpperCase) + ) + + implicit val testWriter: JsonWriter[JsonTreeTestData] = JsonWriter.derived { + WriterBuilder[JsonTreeTestData] + .remove(_.b) + .update(_.a).fromRoot(d => d.a.toDouble + d.c.d.a) + .update(_.c)(_.d) + .add("d")(_.a * 2) + .add(freeVariable)(_.b) + } + JsonTreeTestData(5, b = false, C(D(1))).asTokenList shouldBe obj( + "a" -> 6.0, + "c" -> obj( + "A" -> 1 + ), + "d" -> 10, + "e" -> false + ) + } + + + it should "derive writer for update partial" in { + inline given WriterBuilder[D] = WriterBuilder[D] + .update(_.a) { + case 1 => "uno!" + case 2 => 1 + case v if v > 0 => v * 2 + case _ => throw new IllegalArgumentException("Wrong value!") + } + + given JsonWriter[D] = JsonWriter.derived + + D(1).asTokenList shouldBe obj("a" -> "uno!") + D(2).asTokenList shouldBe obj("a" -> 1) + D(3).asTokenList shouldBe obj("a" -> 6) + + intercept[IllegalArgumentException] { + D(0).asTokenList + }.getMessage shouldBe "Wrong value!" + } + + it should "derive writer for update partial from root" in { + implicit val partialWriter: JsonWriter[D] = JsonWriter.derived[D] { + WriterBuilder[D] + .update(_.a).fromRoot { + case d if d.a == 1 => "uno!" + case d if d.a == 2 => 1 + case d if d.a > 0 => d.a * 2 + case _ => throw new IllegalArgumentException("Wrong value!") + } + } + + D(1).asTokenList shouldBe obj("a" -> "uno!") + D(2).asTokenList shouldBe obj("a" -> 1) + D(3).asTokenList shouldBe obj("a" -> 6) + + intercept[IllegalArgumentException] { + D(0).asTokenList + }.getMessage shouldBe "Wrong value!" + } + + it should "not compile if called on trait for simple writer" in { + "JsonWriter.derived[JsonComplexTestData]" shouldNot compile + } + + it should "derive writer for recursive type" in { + implicit lazy val testWriter: JsonWriter[RecursiveType] = JsonWriter.derived[RecursiveType] + + RecursiveType(1, Seq(RecursiveType(2))).asTokenList shouldBe obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ) + ) + ) + } + + it should "derive writer for A => B => A cycle" in { + implicit lazy val testWriter1: JsonWriter[ComplexRecursionA] = JsonWriter.derived[ComplexRecursionA] + implicit lazy val testWriter2: JsonWriter[ComplexRecursionB] = JsonWriter.derived[ComplexRecursionB] + + ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) + ) + ) + } + + it should "derive writer for sealed cyclic trait with type parameter" in { + implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = JsonWriter.derived[ADTWithType[B]] + + implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = JsonWriter.derived[ADTWithTypeA[B]] + + implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = JsonWriter.derived[ADTWithTypeB[B]] + + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + "a" -> 1, + "b" -> obj( + "a" -> 2 + ) + ) + } + + it should "derive writer that normally concatenates with other JsonWriter.derived's" in { + implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonWriter[ADTWithType[B]] = { + val simpleJsonWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { + case _: ADTWithTypeA[B] => "ADTWithTypeA" + case _: ADTWithTypeB[B] => "ADTWithTypeB" + } + simpleJsonWriter ++ JsonWriter.derived[ADTWithType[B]] + } + + implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = JsonWriter.derived[ADTWithTypeA[B]] + + implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = JsonWriter.derived[ADTWithTypeB[B]] + + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + "clazz" -> "ADTWithTypeB", + "a" -> 1, + "b" -> obj( + "clazz" -> "ADTWithTypeA", + "a" -> 2 + ) + ) + } + + it should "not derive writer for sealed cyclic trait with type parameter if one of subclasses has additional type" in { + """ + implicit def recursionTraitWithTypeWriter[A: JsonWriter]: JsonWriter[ADTWithWrongType[A]] = JsonWriter.derived[ADTWithWrongType[A]] + implicit def recursionTraitWithTypeAWriter[A: JsonWriter]: JsonWriter[ADTWithWrongType.ADTWithWrongTypeA[A]] = JsonWriter.derived[ADTWithWrongType.ADTWithWrongTypeA[A]] + implicit def recursionTraitWithTypeAWriter[A: JsonWriter, B: JsonWriter]: JsonWriter[ADTWithWrongType.ADTWithWrongTypeB[A]] = JsonWriter.derived[ADTWithWrongType.ADTWithWrongTypeB[A]] + """ shouldNot compile + } + + it should "derive writer for simple sealed trait with hierarchy" in { + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = JsonWriter.derived[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") + implicit val subChildWriter: JsonObjectWriter[SubChild] = JsonWriter.derived[SubChild] + + implicit val sealedSubWriter: JsonObjectWriter[SimpleSealedTypeSub] = JsonWriter.derived[SimpleSealedTypeSub] + implicit val sealedWriter: JsonWriter[SimpleSealedType] = JsonWriter.derived[SimpleSealedType] + + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + + write(CaseClass(1)) shouldBe obj("__type" -> "CaseClass", "a" -> 1) + write(SimpleClass(2)) shouldBe obj("__type" -> "SimpleClass", "b" -> 2) + write(JustObject) shouldBe obj("__type" -> "JustObject", "type" -> "JustObject") + write(SubChild(3)) shouldBe obj("__type" -> "SubChild", "c" -> 3) + } + + it should "derive reader/writer for simple sealed trait with hierarchy with discriminator" in { + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = JsonWriter.derived[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj + implicit val subChildWriter: JsonObjectWriter[SubChild] = JsonWriter.derived[SubChild] + given JsonReader[SimpleSealedType] = JsonReader.derived[SimpleSealedType] + + implicit val sealedWriter: JsonWriter[SimpleSealedType] = JsonWriter.derived[SimpleSealedType] + + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + + write(CaseClass(1)) shouldBe obj("__type" -> "CaseClass", "a" -> 1) + write(SimpleClass(2)) shouldBe obj("__type" -> "SimpleClass", "b" -> 2) + write(JustObject) shouldBe obj("__type" -> "JustObject") + write(SubChild(3)) shouldBe obj("__type" -> "SubChild", "c" -> 3) + + read[SimpleSealedType](obj("__type" -> "CaseClass", "a" -> 1)) shouldBe CaseClass(1) + read[SimpleSealedType](obj("__type" -> "SimpleClass", "b" -> 2)) shouldBe SimpleClass(2) + read[SimpleSealedType](obj("__type" -> "JustObject")) shouldBe JustObject + read[SimpleSealedType](obj("__type" -> "SubChild", "c" -> 3)) shouldBe SubChild(3) + } + + + +} diff --git a/modules/core/src/test/scala-3/tethys/derivation/SimpleSealedType.scala b/modules/core/src/test/scala-3/tethys/derivation/SimpleSealedType.scala new file mode 100644 index 00000000..4294b6af --- /dev/null +++ b/modules/core/src/test/scala-3/tethys/derivation/SimpleSealedType.scala @@ -0,0 +1,11 @@ +package tethys.derivation + +import tethys.selector + +sealed abstract class SimpleSealedType(@selector val `__type`: String) +case class CaseClass(a: Int) extends SimpleSealedType("CaseClass") +case class SimpleClass(val b: Int) extends SimpleSealedType("SimpleClass") +case object JustObject extends SimpleSealedType("JustObject") + +sealed abstract class SimpleSealedTypeSub(override val `__type`: String) extends SimpleSealedType(`__type`) +case class SubChild(c: Int) extends SimpleSealedTypeSub("SubChild") diff --git a/modules/core/src/test/scala-3/tethys/derivation/package.scala b/modules/core/src/test/scala-3/tethys/derivation/package.scala new file mode 100644 index 00000000..c33d0115 --- /dev/null +++ b/modules/core/src/test/scala-3/tethys/derivation/package.scala @@ -0,0 +1,46 @@ +package tethys + +package object derivation { + case class SimpleType(i: Int, s: String, d: Double) + + case class SimpleTypeWithAny(i: Int, s: String, d: Double, any: Any) + + case class JsonTreeTestData(a: Int, b: Boolean, c: C) + + case class C(d: D) + + case class D(a: Int) + + case class UnsolvableRecursion(rec: UnsolvableRecursion) + + case class RecursiveType(a: Int, children: Seq[RecursiveType] = Seq.empty) + + case class ComplexRecursionA(a: Int, b: Option[ComplexRecursionB]) + + case class ComplexRecursionB(b: Int, a: ComplexRecursionA) + + trait JsonComplexTestData + + case class JsonComplexTestDataImpl1(a: Int) extends JsonComplexTestData + + case class JsonComplexTestDataImpl2(b: String) extends JsonComplexTestData + + case class SeqMaster1(a: Seq[SeqMaster2]) + + case class SeqMaster2(a: Seq[SeqMaster3]) + + case class SeqMaster3(a: Seq[SeqMaster4]) + + case class SeqMaster4(a: Seq[Int]) + + case class CamelCaseNames(someParam: Int, IDParam: Int, simple: Int) + + enum SimpleEnum { + case ONE, TWO + } + + enum ParametrizedEnum(val i: Int) { + case ONE extends ParametrizedEnum(1) + case TWO extends ParametrizedEnum(2) + } +} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala index 59eead6d..a648ce88 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala @@ -1,26 +1,14 @@ package tethys.derivation -import scala.quoted.* - import tethys.{JsonObjectWriter, JsonReader} import tethys.commons.LowPriorityInstance -import tethys.derivation.impl.derivation.AutoDerivationMacro -import scala.annotation.experimental +import scala.deriving.Mirror +@deprecated("Auto derivation is deprecated and will be removed in future versions. Use `derives` instead") trait AutoDerivation { - implicit inline def jsonWriterMaterializer[T]: LowPriorityInstance[JsonObjectWriter[T]] = - ${ AutoDerivation.jsonWriterMaterializer[T] } - - implicit inline def jsonReaderMaterializer[T]: LowPriorityInstance[JsonReader[T]] = - ${ AutoDerivation.jsonReaderMaterializer[T] } -} - -private[this] object AutoDerivation { - @experimental - def jsonWriterMaterializer[T: Type](using Quotes): Expr[LowPriorityInstance[JsonObjectWriter[T]]] = - new AutoDerivationMacro(quotes).simpleJsonWriter[T] + implicit inline def jsonWriterMaterializer[T: Mirror.Of]: LowPriorityInstance[JsonObjectWriter[T]] = + LowPriorityInstance[JsonObjectWriter[T]](JsonObjectWriter.derived[T]) - @experimental - def jsonReaderMaterializer[T: Type](using Quotes): Expr[LowPriorityInstance[JsonReader[T]]] = - new AutoDerivationMacro(quotes).simpleJsonReader[T] + implicit inline def jsonReaderMaterializer[T: Mirror.ProductOf]: LowPriorityInstance[JsonReader[T]] = + LowPriorityInstance[JsonReader[T]](JsonReader.derived[T]) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala index db68b630..dd97ec7a 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala @@ -1,102 +1,85 @@ package tethys.derivation -import tethys.{JsonObjectWriter, JsonReader, JsonWriter} -import tethys.derivation.builder.{ - NotDescribedException, - ReaderBuilder, - ReaderDerivationConfig, - ReaderDescription, - ReaderField, - WriterBuilder, - WriterDerivationConfig, - WriterDescription -} -import tethys.derivation.impl.builder.{ReaderDescriptionMacro, WriterDescriptionMacro} -import tethys.derivation.impl.derivation.SemiautoDerivationMacro -import scala.quoted.* -import scala.annotation.compileTimeOnly -import scala.annotation.experimental - -trait SemiautoDerivation { - inline def jsonWriter[T]: JsonObjectWriter[T] = - ${ SemiautoDerivation.jsonWriter[T] } - - inline def jsonWriter[T](inline description: WriterDescription[T]): JsonObjectWriter[T] = - ${ SemiautoDerivation.jsonWriterWithDescription[T]('description) } +import tethys.{JsonObjectWriter, JsonReader, ReaderBuilder, WriterBuilder} +import tethys.derivation.builder.{ReaderDerivationConfig, ReaderDescription, WriterDerivationConfig, WriterDescription} - inline def jsonWriter[T <: Product](inline builder: => WriterBuilder[T]): JsonObjectWriter[T] = - ${ SemiautoDerivation.jsonWriterWithBuilder[T]('builder) } +import scala.deriving.Mirror - inline def jsonWriter[T](inline config: WriterDerivationConfig): JsonObjectWriter[T] = - ${ SemiautoDerivation.jsonWriterWithConfig[T]('config) } +trait SemiautoDerivation { - inline def describe[T <: Product](inline builder: => WriterBuilder[T]): WriterDescription[T] = - ${ SemiautoDerivation.describeWriter[T]('builder) } + private inline def failWriterDerivationForEnum[T]: Unit = + inline if EnumCompanion.isEnum[T] then + scala.compiletime.error( + """ + Old Enum derivation is not supported anymore - inline def jsonReader[T]: JsonReader[T] = - ${ SemiautoDerivation.jsonReader[T] } + Use JsonObjectWriter.derived for complex enums like this: + enum ComplexEnum: + case A(x: B) + case B - inline def jsonReader[T](inline description: ReaderDescription[T]): JsonReader[T] = - ${ SemiautoDerivation.jsonReaderWithDescription[T]('description) } + Use StringEnumWriter.derived or OrdinalEnumWriter.derived for basic enums like this: + enum BasicEnum: + case A, B - inline def jsonReader[T](inline config: ReaderDerivationConfig): JsonReader[T] = - ${ SemiautoDerivation.jsonReaderWithConfig[T]('config) } + Use StringEnumWriter.withLabel("__type") or OrdinalEnumWriter.withLabel("__type") if you want write an object for BasicEnum like + { "__type": A } + """ + ) - inline def jsonReader[T <: Product](inline builder: => ReaderBuilder[T]): JsonReader[T] = - ${ SemiautoDerivation.jsonReaderWithBuilder[T]('builder) } + private inline def failReaderDerivationForEnum[T]: Unit = + inline if EnumCompanion.isEnum[T] then + scala.compiletime.error( + """ + Old Enum derivation is not supported anymore - inline def describe[T <: Product](inline builder: => ReaderBuilder[T]): ReaderDescription[T] = - ${ SemiautoDerivation.describeReader[T]('builder) } + Use StringEnumReader.derived or OrdinalEnumReader.derived for basic enums like this: + enum BasicEnum: + case A, B + """ + ) - implicit class ReaderFieldStringOps(val s: String) { - @compileTimeOnly("ReaderFieldOps.as should be defined in describe block") - def as[A]: ReaderField[A] = throw new NotDescribedException - } - implicit class ReaderFieldSymbolOps(val s: Symbol) { - @compileTimeOnly("ReaderFieldOps.as should be defined in describe block") - def as[A]: ReaderField[A] = throw new NotDescribedException - } -} -private[this] object SemiautoDerivation { - @experimental - def jsonWriter[T: Type](using Quotes): Expr[JsonObjectWriter[T]] = - new SemiautoDerivationMacro(quotes).simpleJsonWriter[T] + @deprecated("Use JsonObjectWriter.derived instead") + inline def jsonWriter[T](using mirror: Mirror.Of[T]): JsonObjectWriter[T] = + failWriterDerivationForEnum[T] + JsonObjectWriter.derived[T] - @experimental - def jsonWriterWithConfig[T: Type](config: Expr[WriterDerivationConfig])(using Quotes): Expr[JsonObjectWriter[T]] = - new SemiautoDerivationMacro(quotes).jsonWriterWithConfig[T](config) + inline def jsonWriter[T](inline description: WriterDescription[T]): JsonObjectWriter[T] = + scala.compiletime.error("Use WriterBuilder[T] directly") - @experimental - def jsonWriterWithDescription[T: Type](description: Expr[WriterDescription[T]])(using - Quotes - ): Expr[JsonObjectWriter[T]] = - new SemiautoDerivationMacro(quotes).jsonWriterWithWriterDescription[T](description) + @deprecated("Use JsonObjectWriter.derived or derives instead") + inline def jsonWriter[T](inline builder: WriterBuilder[T])(using mirror: Mirror.ProductOf[T]): JsonObjectWriter[T] = + failWriterDerivationForEnum[T] + JsonObjectWriter.derived[T](builder) - @experimental - def jsonWriterWithBuilder[T <: Product: Type](builder: Expr[WriterBuilder[T]])(using - Quotes - ): Expr[JsonObjectWriter[T]] = - new SemiautoDerivationMacro(quotes).jsonWriterWithBuilder[T](builder) + @deprecated("Use JsonObjectWriter.derived or derives instead") + inline def jsonWriter[T](inline config: WriterDerivationConfig)(using mirror: Mirror.Of[T]): JsonObjectWriter[T] = + JsonObjectWriter.derived[T](config) - @experimental - def describeWriter[T <: Product: Type](builder: Expr[WriterBuilder[T]])(using Quotes): Expr[WriterDescription[T]] = - new WriterDescriptionMacro(quotes).simpleDescription[T](builder) + @deprecated("Use WriterBuilder[T] directly") + inline def describe[T <: Product](inline builder: WriterBuilder[T]): WriterBuilder[T] = + scala.compiletime.error("Use WriterBuilder[T] directly") - @experimental - def jsonReader[T: Type](using Quotes): Expr[JsonReader[T]] = - new SemiautoDerivationMacro(quotes).simpleJsonReader[T] + @deprecated("Use JsonReader.derived instead") + inline def jsonReader[T](using mirror: Mirror.Of[T]): JsonReader[T] = + failReaderDerivationForEnum[T] + JsonReader.derived[T] - def jsonReaderWithConfig[T: Type](config: Expr[ReaderDerivationConfig])(using Quotes): Expr[JsonReader[T]] = - new SemiautoDerivationMacro(quotes).jsonReaderWithConfig[T](config) + inline def jsonReader[T](inline description: ReaderDescription[T]): JsonReader[T] = + scala.compiletime.error("Use ReaderBuilder[T] instead") - def jsonReaderWithDescription[T: Type](description: Expr[ReaderDescription[T]])(using Quotes): Expr[JsonReader[T]] = - new SemiautoDerivationMacro(quotes).jsonReaderWithReaderDescription[T](description) + @deprecated("Use JsonReader.derived or derives instead") + inline def jsonReader[T](inline config: ReaderDerivationConfig)(using mirror: Mirror.ProductOf[T]): JsonReader[T] = + JsonReader.derived[T](config) - def jsonReaderWithBuilder[T <: Product: Type](builder: Expr[ReaderBuilder[T]])(using Quotes): Expr[JsonReader[T]] = - new SemiautoDerivationMacro(quotes).jsonReaderWithBuilder[T](builder) + @deprecated("Use JsonReader.derived and derives instead") + inline def jsonReader[T](inline builder: ReaderBuilder[T])(using mirror: Mirror.ProductOf[T]): JsonReader[T] = + failReaderDerivationForEnum[T] + JsonReader.derived(builder) - def describeReader[T <: Product: Type](builder: Expr[ReaderBuilder[T]])(using Quotes): Expr[ReaderDescription[T]] = - new ReaderDescriptionMacro(quotes).simpleDescription[T](builder) + @deprecated("Use ReaderBuilder[T] directly") + inline def describe[T <: Product](inline builder: ReaderBuilder[T]): ReaderBuilder[T] = + builder } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala deleted file mode 100644 index e02f6707..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala +++ /dev/null @@ -1,737 +0,0 @@ -package tethys.derivation.builder - -sealed trait DependentFieldAs[A, B] extends DependentField0[A, B] { - def as[C]: ReaderBuilder.AsSyntax[A, C, B] -} - -sealed trait DependentField0[A, B] { - def apply(fun: () => B): ReaderBuilder[A] - - def from[T1](f1: (A) => T1): DependentField1[A, B, T1] - def from[T1, T2](f1: (A) => T1, f2: (A) => T2): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def from[T1](f1: ReaderField[T1]): DependentField1[A, B, T1] - def from[T1, T2](f1: ReaderField[T1], f2: ReaderField[T2]): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField1F[A, B, T1] { - def apply(fun: (T1) => B): ReaderBuilder[A] -} - -sealed trait DependentField1[A, B, T1] - extends DependentField1F[A, B, T1] { - def and[T2](f2: (A) => T2): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: (A) => T2, f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T2](f2: ReaderField[T2]): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField2F[A, B, T1, T2] { - def apply(fun: (T1, T2) => B): ReaderBuilder[A] -} - -sealed trait DependentField2[A, B, T1, T2] - extends DependentField2F[A, B, T1, T2] { - def and[T3](f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T3](f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField3F[A, B, T1, T2, T3] { - def apply(fun: (T1, T2, T3) => B): ReaderBuilder[A] -} - -sealed trait DependentField3[A, B, T1, T2, T3] - extends DependentField3F[A, B, T1, T2, T3] { - def and[T4](f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T4](f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField4F[A, B, T1, T2, T3, T4] { - def apply(fun: (T1, T2, T3, T4) => B): ReaderBuilder[A] -} - -sealed trait DependentField4[A, B, T1, T2, T3, T4] - extends DependentField4F[A, B, T1, T2, T3, T4] { - def and[T5](f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T5](f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField5F[A, B, T1, T2, T3, T4, T5] { - def apply(fun: (T1, T2, T3, T4, T5) => B): ReaderBuilder[A] -} - -sealed trait DependentField5[A, B, T1, T2, T3, T4, T5] - extends DependentField5F[A, B, T1, T2, T3, T4, T5] { - def and[T6](f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T6](f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { - def apply(fun: (T1, T2, T3, T4, T5, T6) => B): ReaderBuilder[A] -} - -sealed trait DependentField6[A, B, T1, T2, T3, T4, T5, T6] - extends DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { - def and[T7](f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T7](f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7) => B): ReaderBuilder[A] -} - -sealed trait DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - extends DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { - def and[T8](f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T8](f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8) => B): ReaderBuilder[A] -} - -sealed trait DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - extends DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { - def and[T9](f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T9](f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => B): ReaderBuilder[A] -} - -sealed trait DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - extends DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { - def and[T10](f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T10](f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => B): ReaderBuilder[A] -} - -sealed trait DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - extends DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def and[T11](f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T11](f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => B): ReaderBuilder[A] -} - -sealed trait DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - extends DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def and[T12](f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T12](f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => B): ReaderBuilder[A] -} - -sealed trait DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - extends DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def and[T13](f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T13](f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => B): ReaderBuilder[A] -} - -sealed trait DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - extends DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def and[T14](f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T14](f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => B): ReaderBuilder[A] -} - -sealed trait DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - extends DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def and[T15](f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T15](f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) => B): ReaderBuilder[A] -} - -sealed trait DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - extends DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def and[T16](f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T16](f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) => B): ReaderBuilder[A] -} - -sealed trait DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - extends DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def and[T17](f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T17](f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) => B): ReaderBuilder[A] -} - -sealed trait DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - extends DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def and[T18](f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T18](f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) => B): ReaderBuilder[A] -} - -sealed trait DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - extends DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def and[T19](f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T19](f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => B): ReaderBuilder[A] -} - -sealed trait DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - extends DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def and[T20](f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T20](f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => B): ReaderBuilder[A] -} - -sealed trait DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - extends DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def and[T21](f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T21](f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => B): ReaderBuilder[A] -} - -sealed trait DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - extends DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def and[T22](f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T22](f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => B): ReaderBuilder[A] -} - -sealed trait DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - extends DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { -} - diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala deleted file mode 100644 index a48535ce..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala +++ /dev/null @@ -1,40 +0,0 @@ -package tethys.derivation.builder - -enum FieldStyle { - case Capitalize - case Uncapitalize - - case LowerCase - case UpperCase - - case KebabCase - case LowerKebabCase - case UpperKebabCase - case CapitalizedKebabCase - case UncapitalizedKebabCase - - case SnakeCase - case LowerSnakeCase - case UpperSnakeCase - case CapitalizedSnakeCase - case UncapitalizedSnakeCase - - @deprecated("use FieldStyle.LowerCase") - case lowercase - @deprecated("use FieldStyle.UpperCase") - case uppercase - - @deprecated("use FieldStyle.SnakeCase") - case snakecase - @deprecated("use FieldStyle.LowerSnakeCase") - case lowerSnakecase - @deprecated("use FieldStyle.UpperSnakeCase") - case upperSnakecase - - @deprecated("use FieldStyle.KebabCase") - case kebabcase - @deprecated("use FieldStyle.LowerKebabCase") - case lowerKebabcase - @deprecated("use FieldStyle.UpperKebabCase") - case upperKebabcase -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala deleted file mode 100644 index e18f8bd2..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala +++ /dev/null @@ -1,3 +0,0 @@ -package tethys.derivation.builder - -class NotDescribedException extends Exception("Definition should be in describe block", null) \ No newline at end of file diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala deleted file mode 100644 index 7d88b3ef..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderBuilder.scala +++ /dev/null @@ -1,22 +0,0 @@ -package tethys.derivation.builder - -import tethys.JsonReader - -import scala.annotation.compileTimeOnly - -sealed trait ReaderBuilder[A] { - def extract[B](field: (A) => B): DependentFieldAs[A, B] - def extractReader[B](field: (A) => B): DependentField0[A, JsonReader[_ <: B]] - - def fieldStyle(style: FieldStyle): ReaderBuilder[A] - def strict: ReaderBuilder[A] -} - -object ReaderBuilder { - @compileTimeOnly("ReaderBuilder should be defined in describe block") - def apply[A]: ReaderBuilder[A] = throw new NotDescribedException - - sealed trait AsSyntax[A, B, C] { - def apply(fun: B => C): ReaderBuilder[A] - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala deleted file mode 100644 index f37849d7..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala +++ /dev/null @@ -1,6 +0,0 @@ -package tethys.derivation.builder - -import scala.annotation.compileTimeOnly -import scala.language.implicitConversions - -sealed trait ReaderField[A] \ No newline at end of file diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala deleted file mode 100644 index cd9667ab..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala +++ /dev/null @@ -1,47 +0,0 @@ -package tethys.derivation.builder - -import tethys.derivation.builder.WriterBuilder.* - -import scala.annotation.compileTimeOnly - - -/** - * Created by eld0727 on 22.04.17. - */ - -sealed trait WriterBuilder[A] { - def remove[B](field: A => B): WriterBuilder[A] - - def rename[B](field: A => B)(rename: String): WriterBuilder[A] - - def update[B](field: A => B): FunApply[A, B] with WithRename[FunApply[A, B]] - - def updatePartial[B](field: A => B): PartialFunApply[A, B] with WithRename[PartialFunApply[A, B]] - - def add(name: String): FunApply[A, A] - - def fieldStyle(fieldStyle: FieldStyle): WriterBuilder[A] -} - -object WriterBuilder { - - @compileTimeOnly("WriterBuilder should be defined in describe, jsonWriter of jsonReader macro") - def apply[A <: Product]: WriterBuilder[A] = throw new NotDescribedException - - sealed trait WithRename[Res] { - def withRename(rename: String): Res - } - - sealed trait FunApply[A, B] { - def apply[C](fun: B => C): WriterBuilder[A] - def fromRoot[C](fun: A => C): WriterBuilder[A] - } - - sealed trait PartialFunApply[A, B] { - def apply[C](partial: PartialFunction[B, C]): WriterBuilder[A] - def fromRoot[C](partial: PartialFunction[A, C]): WriterBuilder[A] - } -} - - - diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala deleted file mode 100644 index dd9a6f87..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala +++ /dev/null @@ -1,47 +0,0 @@ -package tethys.derivation.impl - -import java.util.regex.Pattern - -import tethys.derivation.builder.{FieldStyle => ConfigFieldStyle} - -private[impl] trait FieldStyle { self => - def applyStyle(field: String): String - - private def andThen(that: FieldStyle): FieldStyle = (field: String) => that.applyStyle(self.applyStyle(field)) - private def >>(that: FieldStyle): FieldStyle = andThen(that) -} - - -private[impl] object FieldStyle { - def apply(fun: String => String): FieldStyle = fun(_) - - // Names transformations adopted from scala enumeratum - private val regexp1: Pattern = Pattern.compile("([A-Z]+)([A-Z][a-z])") - private val regexp2: Pattern = Pattern.compile("([a-z\\d])([A-Z])") - private val replacement: String = "$1_$2" - - private def splitName(name: String): List[String] = { - val first = regexp1.matcher(name).replaceAll(replacement) - regexp2.matcher(first).replaceAll(replacement).split("_").toList - } - - val snakecase: FieldStyle = splitName(_).mkString("_") - val kebabcase: FieldStyle = splitName(_).mkString("-") - - val lowercase: FieldStyle = _.toLowerCase() - val uppercase: FieldStyle = _.toUpperCase() - - val capitalize: FieldStyle = _.capitalize - val uncapitalize: FieldStyle = (field: String) => - Character.toLowerCase(field.charAt(0)) + field.substring(1) - - val lowerSnakecase: FieldStyle = snakecase >> lowercase - val upperSnakecase: FieldStyle = snakecase >> uppercase - val capitalizedSnakecase: FieldStyle = snakecase >> capitalize - val uncapitalizedSnakecase: FieldStyle = snakecase >> uncapitalize - - val lowerKebabcase: FieldStyle = kebabcase >> lowercase - val upperKebabcase: FieldStyle = kebabcase >> uppercase - val capitalizedKebabCase: FieldStyle = kebabcase >> capitalize - val uncapitalizedKebabCase: FieldStyle = kebabcase >> uncapitalize -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala deleted file mode 100644 index ef99e168..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala +++ /dev/null @@ -1,179 +0,0 @@ -package tethys.derivation.impl - -import scala.quoted.* - -import tethys.readers.JsonReaderDefaultValue -import tethys.{JsonObjectWriter, JsonReader, JsonWriter} -import tethys.writers.EmptyWriters - -trait Reflection { - given Quotes = context - val context: Quotes - import context.reflect.* - - extension (underlying: TypeRepr) { - def searchInlineJsonReader: Term = searchInline[JsonReader] - - def searchInlineJsonWriter: Term = searchInline[JsonWriter] - - def getWrite2Method: Term = underlying.searchInlineJsonWriter.selectWrite2Method - - def getWrite3Method: Term = underlying.searchInlineJsonWriter.selectWrite3Method - - def searchInlineJsonObjectWriter: Term = searchInline[JsonObjectWriter] - - def searchJsonReaderDefaultValue: Term = searchUnsafe[JsonReaderDefaultValue] - - def getDealiasFullName: String = underlying.dealias.typeSymbol.fullName - - def wrappedTo[F[_] : Type]: TypeRepr = - underlying.asType match { - case '[t] => TypeRepr.of[F[t]] - } - - def createWriterTerm(f: TypeRepr => Term): Term = - if (underlying =:= TypeRepr.of[Nothing]) - '{ EmptyWriters.emptyWriter[Nothing] }.asTerm - else - f(underlying) - - private def searchInline[F[_]: Type]: Term = underlying.asType match { - case '[t] => '{ scala.compiletime.summonInline[F[t]] }.asTerm - } - - private def searchSafe[F[_]: Type]: Option[Term] = underlying.asType match { - case '[t] => Expr.summon[F[t]].map(_.asTerm) - } - - private def searchUnsafe[F[_]: Type]: Term = underlying.asType match { - case '[t] => Expr.summon[F[t]] - .getOrElse(report.errorAndAbort(s"Can't find implicit for ${Type.show[F[t]]}")) - .asTerm - } - } - - extension (underlying: Term) { - def selectFirstMethod(methodName: String): Select = - underlying.select(underlying.tpe.typeSymbol.getFirstMethod(methodName)) - - def selectField(fieldName: String): Term = - underlying.select(underlying.tpe.typeSymbol.fieldMember(fieldName)) - - def foldOption(ifEmpty: Term)(f: Term => Term): Term = { - underlying.tpe.asType match { - case '[Option[_]] => - val underlyingSym = underlying.tpe.typeSymbol - val isDefinedMethod = underlyingSym.getFirstMethod("isDefined") - val getMethod = underlyingSym.getFirstMethod("get") - If( - underlying.select(isDefinedMethod), - f(underlying.select(getMethod)), - ifEmpty - ) - case _ => report.errorAndAbort(s"Field ${underlying.show} is not Option[_]") - } - } - def selectWriteValuesMethod: Term = - underlying.selectFirstMethod("writeValues") - - def selectWrite2Method: Term = - selectWriteMethod(2) - - def selectWrite3Method: Term = - selectWriteMethod(3) - - private def selectWriteMethod(argsCount: Int) = - underlying.tpe.typeSymbol - .findMethod("write")(_.signature.paramSigs.length == argsCount) - .map(underlying.select) - .get - } - - extension [T: Type](underlying: Expr[Option[T]]) { - def getOrElse(ifEmpty: Expr[T]): Expr[T] = - underlying.asTerm.foldOption(ifEmpty.asTerm)(identity).asExprOf[T] - } - - extension (underlying: Symbol) { - def getFirstMethod(methodName: String): Symbol = - underlying - .methodMember(methodName) - .headOption - .getOrElse(report.errorAndAbort(s"Can't find method $methodName in ${underlying.name}")) - - def findMethod(methodName: String)(pattern: Symbol => Boolean): Option[Symbol] = - underlying.methodMember(methodName).find(pattern) - } - - case class BuilderField(name: String, tpe: TypeRepr) - - object BuilderField { - def unapply(expr: Expr[Any]): Option[BuilderField] = - unapply(expr.asTerm) - - def unapply(term: Term): Option[BuilderField] = - term match { - case Lambda(List(ValDef(name, _, _)), body @ SelectChain(b)) if b.chain.size == 2 && name == b.chain.head => - Some(BuilderField(b.chain(1), body.tpe.widen)) - case _ => None - } - } - - case class SelectChain(chain: Seq[String]) - - object SelectChain { - def unapply(term: Term): Option[SelectChain] = - term match { - case Ident(name) => Some(SelectChain(Seq(name))) - case select: Select => - def selectAllNames(s: Tree): Seq[String] = s match { - case Select(rest, name) => selectAllNames(rest) :+ name - case Ident(name) => Seq(name) - } - - Some(SelectChain(selectAllNames(select))) - case _ => None - } - } - - def collectDistinctSubtypes(baseTpe: TypeRepr): List[TypeRepr] = { - def collectSubclasses(parent: Symbol): List[Symbol] = { - parent.children.flatMap { child => - if (child.flags.is(Flags.Sealed) && (child.flags.is(Flags.Trait) || child.flags.is(Flags.Abstract))) - collectSubclasses(child) - else - List(child) - } - } - - val baseSym = baseTpe.typeSymbol - val baseArgs = baseTpe.typeArgs - val children = collectSubclasses(baseSym) - - def substituteArgs(childTpe: TypeRepr, childSym: Symbol): TypeRepr = { - val subst = childTpe.baseType(baseSym).typeArgs - - val args = childSym.typeMembers.map { param => - val paramTpe = TypeIdent(param).tpe - val index = subst.indexWhere(_ =:= paramTpe) - if (index != -1) baseArgs(index) - else - report.errorAndAbort(s"$childSym contains additional type parameter that can't be derived in compile time") - } - - childTpe.appliedTo(args) - } - - val tpes: List[TypeRepr] = children.map { childSym => - if (childSym.isType) - substituteArgs(TypeIdent(childSym).tpe, childSym) - else - Ref(childSym).tpe - } - - tpes.foldLeft(List.empty[TypeRepr]) { case (acc, t) => - if (!acc.exists(_ =:= t)) t :: acc - else acc - } - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala deleted file mode 100644 index 64d7cc73..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala +++ /dev/null @@ -1,105 +0,0 @@ -package tethys.derivation.impl.builder - -import tethys.derivation.builder.{ReaderBuilder, ReaderDerivationConfig, ReaderDescription} - -import scala.quoted.* - -trait ReaderBuilderCommons extends ReaderBuilderUtils { - import context.reflect.* - - protected def convertReaderBuilder[T <: Product : Type]( - builder: Expr[ReaderBuilder[T]] - ): Expr[ReaderDescription[T]] = { - val withoutInlining = (builder.asTerm match { - case Inlined(_, _, expansion) => expansion - case notInlined => notInlined - }).asExprOf[ReaderBuilder[T]] - - val description = extractDescription(withoutInlining) - description.lift[T] - } - - protected lazy val emptyReaderConfig: Expr[ReaderDerivationConfig] = - '{ ReaderDerivationConfig.empty } - - private def extractDescription[T <: Product: Type](expr: Expr[ReaderBuilder[T]]): MacroReaderDescription = expr match { - // ===== ROOT ===== - case '{ ReaderBuilder.apply[t] } => - MacroReaderDescription(emptyReaderConfig, Seq()) - - // ===== FieldAs ===== - case '{ ($rest: ReaderBuilder[T]).extract[tpe](${BuilderField(f)}).as[as].apply($fun) } => - val description = extractDescription(rest) - description.copy(operations = - description.operations :+ ReaderMacroOperation.ExtractFieldAs( - f.name, TypeRepr.of[tpe], TypeRepr.of[as], fun.asTerm - ) - ) - - // ===== FieldStyle ===== - case '{ ($rest: ReaderBuilder[T]).fieldStyle($style) } => - val description = extractDescription(rest) - description.copy(config = '{ (${ description.config }: ReaderDerivationConfig).withFieldStyle($style) }) - - // ===== isStrict ===== - case '{ ($rest: ReaderBuilder[T]).strict } => - val description = extractDescription(rest) - description.copy(config = '{ (${ description.config }: ReaderDerivationConfig).strict }) - - case other => other.asTerm match { - // ===== FieldValue ===== - - // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extract"), _), List(BuilderField(f))), "from"), _), fs), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fsFields, fun - )) - - // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extract"), _), List(BuilderField(f))), "from"), _), fs), "and"), _), ands), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - val andsFields = ands.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fsFields ++ andsFields, fun - )) - - // ===== FieldReader ===== - - // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extractReader"), _), List(BuilderField(f))), "from"), _), fs), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fsFields, fun - )) - - - // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extractReader"), _), List(BuilderField(f))), "from"), _), fs), "and"), _), ands), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - val andsFields = ands.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fsFields ++ andsFields, fun - )) - - // ===== NOPE ===== - case _ => report.errorAndAbort(s"unknown tree: ${expr.asTerm.show}") - } - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala deleted file mode 100644 index 223fc95a..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala +++ /dev/null @@ -1,178 +0,0 @@ -package tethys.derivation.impl.builder - -import tethys.derivation.semiauto.* -import tethys.derivation.impl.FieldStyle -import tethys.derivation.builder.{FieldStyle as ConfigFieldStyle, ReaderDerivationConfig, ReaderDescription} -import tethys.derivation.impl.Reflection -import scala.quoted.* - -import tethys.derivation.builder - -trait ReaderBuilderUtils extends Reflection { - import context.reflect.* - - case class MacroReaderDescription(config: Expr[ReaderDerivationConfig], operations: Seq[ReaderMacroOperation]) { - def lift[T: Type]: Expr[ReaderDescription[T]] = - '{ReaderDescription[T]($config, ${Expr.ofSeq(operations.map(_.lift))})} - } - object MacroReaderDescription { - def unlift[T: Type](wd: Expr[ReaderDescription[T]]): MacroReaderDescription = { - val withoutInlining = (wd.asTerm.underlying match { - case Inlined(_, _, expansion) => expansion - case notInlined => notInlined - }).asExprOf[ReaderDescription[T]] - - withoutInlining match { - case '{ ReaderDescription.apply[T] ($config, ${Varargs(operations)}) } => - MacroReaderDescription(config, operations.map(ReaderMacroOperation.unlift[T])) - } - } - } - - sealed trait Field { self => - def name: String - def tpe: TypeRepr - - def lift: Expr[ReaderDescription.Field[?]] = self match { - case Field.ClassField(name, tpe) => - tpe.asType match { case '[t] => - '{ ReaderDescription.Field.ClassField[t](${Expr(name)}) } - } - case Field.RawField(name, tpe) => - tpe.asType match { case '[t] => - '{ ReaderDescription.Field.RawField[t](${Expr(name)}) } - } - } - } - object Field { - final case class ClassField(name: String, tpe: TypeRepr) extends Field - final case class RawField(name: String, tpe: TypeRepr) extends Field - - def unlift(rdField: Term): Field = rdField.asExpr match { - case '{ ReaderDescription.Field.ClassField.apply[tpe]($name) } => - Field.ClassField(name.valueOrAbort, TypeRepr.of[tpe]) - - case '{ ReaderDescription.Field.RawField.apply[tpe]($name) } => - Field.RawField(name.valueOrAbort, TypeRepr.of[tpe]) - - case '{ ReaderFieldStringOps($name).as[tpe] } => - Field.RawField(name.valueOrAbort, TypeRepr.of[tpe]) - - case '{ ReaderFieldSymbolOps(scala.Symbol.apply($name)).as[tpe] } => - Field.RawField(name.valueOrAbort, TypeRepr.of[tpe]) - } - - def fromBuilderField(bf: BuilderField): Field = - Field.ClassField(bf.name, bf.tpe) - } - - sealed trait ReaderMacroOperation { self => - def field: String - - def lift: Expr[ReaderDescription.BuilderOperation] = self match { - case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => - (tpe.asType, as.asType) match { - case ('[tpe], '[as]) => - '{ ReaderDescription.BuilderOperation.ExtractFieldAs[as, tpe](${Expr(field)}, ${fun.asExprOf[Function[as, tpe]]}) } - } - - case ReaderMacroOperation.ExtractFieldValue(field, from, fun) => - '{ ReaderDescription.BuilderOperation.ExtractFieldValue(${Expr(field)}, ${Expr.ofSeq(from.map(_.lift))}, ${fun.asExprOf[Any]}) } - - case ReaderMacroOperation.ExtractFieldReader(field, from, fun) => - '{ ReaderDescription.BuilderOperation.ExtractFieldReader(${Expr(field)}, ${Expr.ofSeq(from.map(_.lift))}, ${fun.asExprOf[Any]}) } - } - } - object ReaderMacroOperation { - final case class ExtractFieldAs(field: String, tpe: TypeRepr, as: TypeRepr, fun: Term) extends ReaderMacroOperation - final case class ExtractFieldValue(field: String, from: Seq[Field], fun: Term) extends ReaderMacroOperation - final case class ExtractFieldReader(field: String, from: Seq[Field], fun: Term) extends ReaderMacroOperation - - def unlift[T: Type](bo: Expr[ReaderDescription.BuilderOperation]): ReaderMacroOperation = - bo match { - case '{ ReaderDescription.BuilderOperation.ExtractFieldAs.apply[as, tpe]($field, $fun) } => - ReaderMacroOperation.ExtractFieldAs(field.valueOrAbort, TypeRepr.of[tpe], TypeRepr.of[as], fun.asTerm) - case '{ ReaderDescription.BuilderOperation.ExtractFieldValue.apply($field, ${Varargs(from)}, $fun) } => - ReaderMacroOperation.ExtractFieldValue(field.valueOrAbort, from.map(f => Field.unlift(f.asTerm)), fun.asTerm) - case '{ ReaderDescription.BuilderOperation.ExtractFieldReader.apply($field, ${Varargs(from)}, $fun) } => - ReaderMacroOperation.ExtractFieldReader(field.valueOrAbort, from.map(f => Field.unlift(f.asTerm)), fun.asTerm) - } - } - - protected def evalReaderConfig(configExpr: Expr[ReaderDerivationConfig]): (Option[FieldStyle], Boolean) = { - def parseConfigExpr( - confExpr: Expr[ReaderDerivationConfig], - fieldStyleExpr: Option[Expr[ConfigFieldStyle]], - isStrictExpr: Option[Expr[Boolean]] - ): (Option[Expr[ConfigFieldStyle]], Option[Expr[Boolean]]) = - confExpr match { - case '{ ReaderDerivationConfig.empty } => - (fieldStyleExpr, isStrictExpr) - - case '{ ReaderDerivationConfig.apply(None, $isStrict) } => - (fieldStyleExpr, isStrictExpr.orElse(Some(isStrict))) - - case '{ ReaderDerivationConfig.apply(Some($fieldStyle), $isStrict) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr.orElse(Some(isStrict))) - - case '{ ReaderDerivationConfig.withFieldStyle($fieldStyle) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr) - - case '{ ReaderDerivationConfig.strict } => - (fieldStyleExpr, Some(Expr(true))) - - case '{ ($config: ReaderDerivationConfig).withFieldStyle($fieldStyle) } => - parseConfigExpr(config, fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr) - - case '{ ($config: ReaderDerivationConfig).strict } => - parseConfigExpr(config, fieldStyleExpr, Some(Expr(true))) - - case _ => report.errorAndAbort(s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}") - } - - val (fieldStyleExpr, isStrictExpr) = parseConfigExpr(configExpr, None, None) - - val fieldStyle: Option[FieldStyle] = fieldStyleExpr.map { fs => - fs.asTerm.underlying.asExprOf[ConfigFieldStyle] match { - case '{ ConfigFieldStyle.LowerCase } => FieldStyle.lowercase - case '{ ConfigFieldStyle.UpperCase } => FieldStyle.uppercase - - case '{ ConfigFieldStyle.Capitalize } => FieldStyle.capitalize - case '{ ConfigFieldStyle.Uncapitalize } => FieldStyle.uncapitalize - - case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.CapitalizedKebabCase } => FieldStyle.capitalizedKebabCase - case '{ ConfigFieldStyle.UncapitalizedKebabCase } => FieldStyle.uncapitalizedKebabCase - - case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase - case '{ ConfigFieldStyle.CapitalizedSnakeCase } => FieldStyle.capitalizedSnakecase - case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => FieldStyle.uncapitalizedSnakecase - - case '{ ConfigFieldStyle.lowercase } => FieldStyle.lowercase - case '{ ConfigFieldStyle.uppercase } => FieldStyle.uppercase - case '{ ConfigFieldStyle.kebabcase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.lowerKebabcase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.upperKebabcase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.snakecase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.lowerSnakecase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.upperSnakecase } => FieldStyle.upperSnakecase - - case _ => report.errorAndAbort("fieldStyle in reader config can not be computed in compile-time") - } - } - - val isStrict = isStrictExpr.map( - _.asTerm - .underlying - .asExprOf[Boolean] - .value - .getOrElse(report.errorAndAbort("isStrict in reader config can not be computed in compile-time")) - ).getOrElse(false) - - (fieldStyle, isStrict) - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala deleted file mode 100644 index f840740c..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala +++ /dev/null @@ -1,13 +0,0 @@ -package tethys.derivation.impl.builder - -import scala.quoted.{Expr, Quotes, Type} - -import tethys.derivation.builder.{ReaderBuilder, ReaderDescription} - -class ReaderDescriptionMacro(val quotes: Quotes) extends ReaderBuilderCommons { - implicit val context: Quotes = quotes - import context.reflect.* - - def simpleDescription[T <: Product : Type](builder: Expr[ReaderBuilder[T]]): Expr[ReaderDescription[T]] = - convertReaderBuilder[T](builder) -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala deleted file mode 100644 index 5a3907ea..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala +++ /dev/null @@ -1,174 +0,0 @@ -package tethys.derivation.impl.builder - -import scala.annotation.tailrec -import scala.quoted.* - -import tethys.derivation.builder.{WriterBuilder, WriterDerivationConfig, WriterDescription} -import tethys.derivation.impl.builder.WriterBuilderUtils - -trait WriterBuilderCommons extends WriterBuilderUtils { - import context.reflect.* - - protected def convertWriterBuilder[T <: Product: Type]( - builder: Expr[WriterBuilder[T]] - ): Expr[WriterDescription[T]] = { - val withoutInlining = (builder.asTerm match { - case Inlined(_, _, expansion) => expansion - case notInlined => notInlined - }).asExprOf[WriterBuilder[T]] - val description = extractSimpleDescription(withoutInlining) - checkOperations(description.operations) - description.lift - } - - private def extractSimpleDescription[T <: Product : Type](expr: Expr[WriterBuilder[T]]): MacroWriteDescription = { - @tailrec - def loop( - expr: Expr[WriterBuilder[T]], - config: Expr[WriterDerivationConfig], - operations: Seq[WriterMacroOperation] - ): (Expr[WriterDerivationConfig], Seq[WriterMacroOperation]) = { - expr match { - case '{ - type tpe <: T; - WriterBuilder.apply[`tpe`] - } => config -> operations - - // ===== remove ===== - case '{ ($rest: WriterBuilder[T]).remove(${ BuilderField(f) }) } => - val op: WriterMacroOperation = WriterMacroOperation.Remove(tpe = TypeRepr.of[T], field = f.name) - loop(rest, config, op +: operations) - - // ===== rename ===== - case '{ ($rest: WriterBuilder[T]).rename[from](${ BuilderField(f) })($rename) } => - val fromTpe = TypeRepr.of[from] - val op: WriterMacroOperation = WriterMacroOperation.Update( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ Some($rename) }, - fun = '{ identity[from] }.asTerm, - from = fromTpe, - to = fromTpe - ) - loop(rest, config, op +: operations) - - // ===== update ===== - case '{ ($rest: WriterBuilder[T]).update[from](${ BuilderField(f) }).apply[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.Update( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ None }, - fun = updater.asTerm, - from = TypeRepr.of[from], - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update with rename ===== - case '{ ($rest: WriterBuilder[T]).update[from](${ BuilderField(f) }).withRename($rename).apply[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.Update( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ Some($rename) }, - fun = updater.asTerm, - from = TypeRepr.of[from], - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update from root ===== - case '{ ($rest: WriterBuilder[T]).update(${ BuilderField(f) }).fromRoot[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.UpdateFromRoot( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ None }, - fun = updater.asTerm, - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update from root with rename ===== - case '{ ($rest: WriterBuilder[T]).update(${ BuilderField(f) }).withRename($rename).fromRoot[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.UpdateFromRoot( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ Some($rename) }, - fun = updater.asTerm, - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update partial ===== - case '{ ($rest: WriterBuilder[T]).updatePartial[from](${ BuilderField(f) }).apply[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.UpdatePartial( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ None }, - fun = updater.asTerm, - from = TypeRepr.of[from], - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update partial with rename ===== - case '{ ($rest: WriterBuilder[T]).updatePartial[from](${ BuilderField(f) }).withRename($rename).apply[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.UpdatePartial( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ Some($rename) }, - fun = updater.asTerm, - from = TypeRepr.of[from], - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update partial from root ===== - case '{ ($rest: WriterBuilder[T]).updatePartial(${ BuilderField(f) }).fromRoot[to]($updater) } => - val op = WriterMacroOperation.UpdatePartialFromRoot( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ None }, - fun = updater.asTerm, - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== update partial from root with rename ===== - case '{ ($rest: WriterBuilder[T]).updatePartial(${ BuilderField(f) }).withRename($rename).fromRoot[to]($updater) } => - val op = WriterMacroOperation.UpdatePartialFromRoot( - tpe = TypeRepr.of[T], - field = f.name, - name = '{ Some($rename) }, - fun = updater.asTerm, - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== add ===== - case '{ ($rest: WriterBuilder[T]).add($field).apply[to]($updater) } => - val op: WriterMacroOperation = WriterMacroOperation.Add( - tpe = TypeRepr.of[T], - field = field, - fun = updater.asTerm, - to = TypeRepr.of[to] - ) - loop(rest, config, op +: operations) - - // ===== FieldStyle ===== - case '{ ($rest: WriterBuilder[T]).fieldStyle($style) } => - val cfg: Expr[WriterDerivationConfig] = '{ (${ config }: WriterDerivationConfig).withFieldStyle($style) } - loop(rest, config = cfg, operations) - - // ===== NOPE ===== - case _ => report.errorAndAbort(s"unknown tree: ${expr.asTerm.show}") - } - } - - val (config, operations) = loop(expr, config = emptyWriterConfig, operations = Seq()) - MacroWriteDescription(TypeRepr.of[T], config, operations) - } - - private def checkOperations(operations: Seq[WriterMacroOperation]): Unit = { - // TODO - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala deleted file mode 100644 index ff80a71f..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala +++ /dev/null @@ -1,250 +0,0 @@ -package tethys.derivation.impl.builder - -import scala.annotation.tailrec -import scala.quoted.* - -import tethys.derivation.builder.{WriterDerivationConfig, WriterDescription, FieldStyle as ConfigFieldStyle} -import tethys.derivation.impl.{FieldStyle, Reflection} - -trait WriterBuilderUtils extends Reflection { - import context.reflect.* - - protected lazy val emptyWriterConfig: Expr[WriterDerivationConfig] = - '{ tethys.derivation.builder.WriterDerivationConfig.empty } - - case class MacroWriteDescription( - tpe: TypeRepr, - config: Expr[WriterDerivationConfig], - operations: Seq[WriterMacroOperation] - ) { self => - def lift[T: Type]: Expr[WriterDescription[T]] = - '{ WriterDescription[T]($config, ${ Expr.ofSeq(operations.map(_.lift[T])) }) } - } - - object MacroWriteDescription { - def empty[T: Type]: MacroWriteDescription = - MacroWriteDescription( - tpe = TypeRepr.of[T], - config = emptyWriterConfig, - operations = Seq() - ) - - def unlift[T: Type](wd: Expr[WriterDescription[T]]): MacroWriteDescription = { - val withoutInlining = (wd.asTerm.underlying match { - case Inlined(_, _, expansion) => expansion - case notInlined => notInlined - }).asExprOf[WriterDescription[T]] - - withoutInlining match { - case '{ WriterDescription.apply[T]($config, ${ Varargs(operations) }) } => - MacroWriteDescription(TypeRepr.of[T], config, operations.map(WriterMacroOperation.unlift[T])) - } - } - } - - sealed trait WriterMacroOperation { self => - def lift[T: Type]: Expr[WriterDescription.BuilderOperation[T]] = - self match { - case WriterMacroOperation.Remove(tpe, field) => - tpe.asType match { - case '[tpe] => - '{ - WriterDescription.BuilderOperation.Remove.apply[tpe]( - ${ Expr(field) } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - - case WriterMacroOperation.Update(tpe, field, name, fun, from, to) => { - (tpe.asType, from.asType, to.asType) match { - case ('[tpe], '[from], '[to]) => - '{ - WriterDescription.BuilderOperation.Update.apply[tpe, from, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[Function[from, to]] } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - } - - case WriterMacroOperation.UpdateFromRoot(tpe, field, name, fun, to) => - (tpe.asType, to.asType) match { - case ('[tpe], '[to]) => - '{ - WriterDescription.BuilderOperation.UpdateFromRoot.apply[tpe, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[Function[tpe, to]] } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - - case WriterMacroOperation.UpdatePartial(tpe, field, name, fun, from, to) => - (tpe.asType, from.asType, to.asType) match { - case ('[tpe], '[from], '[to]) => - '{ - WriterDescription.BuilderOperation.UpdatePartial.apply[tpe, from, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[PartialFunction[from, to]] } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - - case WriterMacroOperation.UpdatePartialFromRoot(tpe, field, name, fun, to) => - (tpe.asType, to.asType) match { - case ('[tpe], '[to]) => - '{ - WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[tpe, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[PartialFunction[tpe, to]] } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - - case WriterMacroOperation.Add(tpe, field, fun, to) => - (tpe.asType, to.asType) match { - case ('[tpe], '[to]) => - '{ - WriterDescription.BuilderOperation.Add.apply[tpe, to]( - $field, - ${ fun.asExprOf[Function[tpe, to]] } - ) - }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] - } - } - } - - object WriterMacroOperation { - case class Remove(tpe: TypeRepr, field: String) extends WriterMacroOperation - case class Update(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, from: TypeRepr, to: TypeRepr) - extends WriterMacroOperation - case class UpdateFromRoot(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, to: TypeRepr) - extends WriterMacroOperation - case class UpdatePartial(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, from: TypeRepr, to: TypeRepr) - extends WriterMacroOperation - case class UpdatePartialFromRoot(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, to: TypeRepr) - extends WriterMacroOperation - case class Add(tpe: TypeRepr, field: Expr[String], fun: Term, to: TypeRepr) extends WriterMacroOperation - - def unlift[T: Type](bo: Expr[WriterDescription.BuilderOperation[T]]): WriterMacroOperation = - bo match { - case '{ WriterDescription.BuilderOperation.Remove.apply[tpe]($field) } => - WriterMacroOperation.Remove(TypeRepr.of[tpe], field.valueOrAbort) - - case '{ WriterDescription.BuilderOperation.Update.apply[tpe, from, to]($field, $name, $fun) } => - WriterMacroOperation.Update( - TypeRepr.of[tpe], - field.valueOrAbort, - name, - fun.asTerm, - TypeRepr.of[from], - TypeRepr.of[to] - ) - - case '{ WriterDescription.BuilderOperation.UpdateFromRoot.apply[tpe, to]($field, $name, $fun) } => - WriterMacroOperation.UpdateFromRoot(TypeRepr.of[tpe], field.valueOrAbort, name, fun.asTerm, TypeRepr.of[to]) - - case '{ WriterDescription.BuilderOperation.UpdatePartial.apply[tpe, from, to]($field, $name, $fun) } => - WriterMacroOperation.UpdatePartial( - tpe = TypeRepr.of[tpe], - field = field.valueOrAbort, - name = name, - fun = fun.asTerm, - from = TypeRepr.of[from], - to = TypeRepr.of[to] - ) - - case '{ WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[tpe, to]($field, $name, $fun) } => - WriterMacroOperation.UpdatePartialFromRoot(TypeRepr.of[tpe], field.valueOrAbort, name, fun.asTerm, TypeRepr.of[to]) - - case '{ WriterDescription.BuilderOperation.Add.apply[tpe, to]($field, $fun) } => - WriterMacroOperation.Add(TypeRepr.of[tpe], field, fun.asTerm, TypeRepr.of[to]) - } - } - - protected def evalWriterConfig(configExpr: Expr[WriterDerivationConfig]): (Option[FieldStyle], Option[String]) = { - @tailrec - def parseConfigExpr( - confExpr: Expr[WriterDerivationConfig], - fieldStyleExpr: Option[Expr[ConfigFieldStyle]], - discriminatorExpr: Option[Expr[String]] - ): (Option[Expr[ConfigFieldStyle]], Option[Expr[String]]) = - confExpr match { - case '{ WriterDerivationConfig.empty } => - (fieldStyleExpr, discriminatorExpr) - - case '{ WriterDerivationConfig.apply(None, None) } => - (fieldStyleExpr, discriminatorExpr) - - case '{ WriterDerivationConfig.apply(None, Some($discriminator)) } => - (fieldStyleExpr, discriminatorExpr.orElse(Some(discriminator))) - - case '{ WriterDerivationConfig.apply(Some($fieldStyle), None) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) - - case '{ WriterDerivationConfig.apply(Some($fieldStyle), Some($discriminator)) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr.orElse(Some(discriminator))) - - case '{ WriterDerivationConfig.withFieldStyle($fieldStyle) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) - - case '{ WriterDerivationConfig.withDiscriminator($discriminator) } => - (fieldStyleExpr, discriminatorExpr.orElse(Some(discriminator))) - - case '{ ($config: WriterDerivationConfig).withFieldStyle($fieldStyle) } => - parseConfigExpr(config, fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) - - case '{ ($config: WriterDerivationConfig).withDiscriminator($discriminator) } => - parseConfigExpr(config, fieldStyleExpr, discriminatorExpr.orElse(Some(discriminator))) - - case _ => report.errorAndAbort(s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}") - } - - val (fieldStyleExpr, discriminatorExpr) = parseConfigExpr(configExpr, None, None) - - val fieldStyle: Option[FieldStyle] = fieldStyleExpr.map { fs => - fs.asTerm.underlying.asExprOf[ConfigFieldStyle] match { - case '{ ConfigFieldStyle.LowerCase } => FieldStyle.lowercase - case '{ ConfigFieldStyle.UpperCase } => FieldStyle.uppercase - - case '{ ConfigFieldStyle.Capitalize } => FieldStyle.capitalize - case '{ ConfigFieldStyle.Uncapitalize } => FieldStyle.uncapitalize - - case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.CapitalizedKebabCase } => FieldStyle.capitalizedKebabCase - case '{ ConfigFieldStyle.UncapitalizedKebabCase } => FieldStyle.uncapitalizedKebabCase - - case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase - case '{ ConfigFieldStyle.CapitalizedSnakeCase } => FieldStyle.capitalizedSnakecase - case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => FieldStyle.uncapitalizedSnakecase - - case '{ ConfigFieldStyle.lowercase } => FieldStyle.lowercase - case '{ ConfigFieldStyle.uppercase } => FieldStyle.uppercase - case '{ ConfigFieldStyle.kebabcase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.lowerKebabcase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.upperKebabcase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.snakecase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.lowerSnakecase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.upperSnakecase } => FieldStyle.upperSnakecase - - case _ => report.errorAndAbort("fieldStyle in writer config can not be computed in compile-time") - } - } - - val discriminator = discriminatorExpr.map( - _.asTerm.underlying - .asExprOf[String] - .value - .getOrElse(report.errorAndAbort("discriminator in writer config can not be computed in compile-time")) - ) - - (fieldStyle, discriminator) - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala deleted file mode 100644 index 70d6c5d2..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala +++ /dev/null @@ -1,13 +0,0 @@ -package tethys.derivation.impl.builder - -import tethys.derivation.builder.{WriterBuilder, WriterDescription} - -import scala.quoted.* - -class WriterDescriptionMacro(val quotes: Quotes) extends WriterBuilderCommons { - implicit val context: Quotes = quotes - import context.reflect.* - - def simpleDescription[T <: Product : Type](builder: Expr[WriterBuilder[T]]): Expr[WriterDescription[T]] = - convertWriterBuilder[T](builder) -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala deleted file mode 100644 index c729de75..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala +++ /dev/null @@ -1,62 +0,0 @@ -package tethys.derivation.impl.derivation - -import scala.quoted.* - -import tethys.{JsonObjectWriter, JsonReader, JsonWriter} -import tethys.commons.LowPriorityInstance -import tethys.writers.tokens.TokenWriter -import scala.annotation.experimental - -class AutoDerivationMacro(val quotes: Quotes) - extends WriterDerivation - with ReaderDerivation { - implicit val context: Quotes = quotes - import context.reflect.* - - // TODO: recursive A => B => A derivation check - @experimental - def simpleJsonWriter[T: Type]: Expr[LowPriorityInstance[JsonObjectWriter[T]]] = { - val tpe: TypeRepr = TypeRepr.of[T] - val tpeSym: Symbol = tpe.typeSymbol - val description: MacroWriteDescription = MacroWriteDescription.empty[T] - val jsonObjectWriterExpr: Expr[JsonObjectWriter[T]] = - if (tpe.termSymbol.isNoSymbol) { - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassWriter[T](description) - else if ( - tpeSym.flags.is(Flags.Enum) || - (tpeSym.flags.is(Flags.Sealed) && (tpeSym.flags.is(Flags.Trait) || tpeSym.flags.is(Flags.Abstract))) - ) - deriveSealedClassWriter[T](description.config) - else - report.errorAndAbort( - s"Can't auto derive json writer! '${tpe.show}' isn't a Case Class, Sealed Trait, Sealed Abstract Class or Enum." - ) - } else deriveTermWriter[T] - - '{ LowPriorityInstance[JsonObjectWriter[T]]($jsonObjectWriterExpr) } - } - - @experimental - def simpleJsonReader[T: Type]: Expr[LowPriorityInstance[JsonReader[T]]] = { - val tpe: TypeRepr = TypeRepr.of[T] - val tpeSym: Symbol = tpe.typeSymbol - val description: MacroReaderDescription = MacroReaderDescription( - config = emptyReaderConfig, - operations = Seq() - ) - val jsonReaderExpr: Expr[JsonReader[T]] = - if (tpe.termSymbol.isNoSymbol) { - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassReader[T](description) - else if (tpeSym.flags.is(Flags.Enum)) - deriveEnumReader[T] - else - report.errorAndAbort( - s"Can't auto derive json reader! '${tpe.show}' isn't a Case Class or Enum" - ) - } else deriveTermReader[T] - - '{ LowPriorityInstance[JsonReader[T]]($jsonReaderExpr) } - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala deleted file mode 100644 index 2d43337e..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala +++ /dev/null @@ -1,518 +0,0 @@ -package tethys.derivation.impl.derivation - -import scala.collection.mutable.{HashMap => MutableMap} -import scala.quoted.* - -import tethys.JsonReader -import tethys.derivation.builder.ReaderDerivationConfig -import tethys.derivation.impl.FieldStyle -import tethys.derivation.impl.builder.ReaderBuilderCommons -import tethys.readers.tokens.{QueueIterator, TokenIterator} -import tethys.readers.{FieldName, JsonReaderDefaultValue, ReaderError} - -trait ReaderDerivation extends ReaderBuilderCommons { - import context.reflect.* - - def deriveTermReader[T: Type]: Expr[JsonReader[T]] = { - val termTpr = TypeRepr.of[T] - val termSym = termTpr.termSymbol - val expectedValueExpr = Expr(termSym.name) - - '{ - new JsonReader[T] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { - val actualValue = it.string() - val expectedValue = $expectedValueExpr - - if (actualValue == expectedValue) - ${ Ref(termSym).asExprOf[T] } - else - ReaderError.wrongJson(s"expected value '$expectedValue', but actual is '$actualValue'") - } - } - } - } - - def deriveEnumReader[T: Type] = { - val parentTpr: TypeRepr = TypeRepr.of[T] - val children: List[TypeRepr] = collectDistinctSubtypes(parentTpr) - - val classesWithTheSameParams = children - .filter(_.termSymbol.isNoSymbol) - .groupBy(_.typeSymbol.caseFields.map(fieldSym => (fieldSym.name, parentTpr.memberType(fieldSym)))) - .collect { case (_, tpes) if tpes.length > 1 => tpes.map(_.show) } - - if (classesWithTheSameParams.nonEmpty) - report.errorAndAbort( - s"""Can't derive reader for enum ${parentTpr.show}. Several classes has the same parameters: - | ${ classesWithTheSameParams.zipWithIndex.map { case (clss, i) => s"${i+1}) ${clss.mkString(", ")}" }.mkString("\n ")}""".stripMargin - ) - - val childrenReadersExpr: Expr[List[JsonReader[?]]] = - Expr.ofList(children.map(_.searchInlineJsonReader.asExprOf[JsonReader[?]])) - - '{ - new JsonReader[T] { - private[this] implicit def thisReader: JsonReader[T] = this - - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { - val curIt = it.collectExpression() - val values = - $childrenReadersExpr.flatMap(childReader => scala.util.Try(childReader.read(curIt.copy())).toOption) - values match { - case Nil => ReaderError.wrongJson(s"unexpected value for enum ${${ Expr(parentTpr.show) }}") - case singleValue :: Nil => singleValue.asInstanceOf[T] - case _ => ReaderError.wrongJson(s"ambiguous value for enum ${${ Expr(parentTpr.show) }}") - } - } - } - } - } - - def deriveCaseClassReader[T: Type]( - description: MacroReaderDescription - ): Expr[JsonReader[T]] = { - val (fieldStyle, isStrict) = evalReaderConfig(description.config) - - val tpt = TypeTree.of[T] - val tpr = tpt.tpe - - val classFields = tpr.typeSymbol.caseFields - - val notSortedReaderFields = applyFieldStyle(fieldStyle) - .andThen(applyDescriptionOperations(description.operations)) - .apply( - classFields.map { fieldSym => - val fieldName = fieldSym.name - SimpleField( - name = fieldName, - tpe = tpr.memberType(fieldSym), - jsonName = fieldName - ) - } - ) - - val fieldsToReadFirstFromJson: List[String] = notSortedReaderFields.flatMap { - case SimpleField(name, _, _) => List(name) - case ExtractedField(_, _, args, _) => - args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => jsonName } - case FromExtractedReader(_, _, _, args, _) => - args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => jsonName } - }.distinct - val sortedReaderFields = sortFieldsByProcessing(fieldsToReadFirstFromJson, notSortedReaderFields) - - val typeReadersInfos = allocateTypeReadersInfos(notSortedReaderFields) - val defaultValuesExpr = allocateDefaultValuesFromDefinition[T] - val possiblyNotInitializedExpr = allocateDefaultValuesForNotInitialized(sortedReaderFields) - val (readersExpr, fieldsWithoutReadersExpr) = allocateReadersExpr(sortedReaderFields, typeReadersInfos) - - '{ - new JsonReader[T] { - private[this] implicit def thisReader: JsonReader[T] = this - - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { - if (!it.currentToken().isObjectStart) - ReaderError.wrongJson("Expected object start but found: " + it.currentToken().toString) - else { - it.nextToken() - val readFields = new MutableMap[String, MutableMap[String, Any]].empty.withDefaultValue(MutableMap.empty) - val notComputedFields = new MutableMap[String, TokenIterator].empty - val resultFields = new MutableMap[String, Any].empty - - val readers: Map[String, List[(String, String, JsonReader[?])]] = - $readersExpr // jsonName -> (name, tpeName, reader) - val fieldsWithoutReaders: Set[String] = $fieldsWithoutReadersExpr // jsonNames - - while (!it.currentToken().isObjectEnd) { - val jsonName = it.fieldName() - it.nextToken() - val currentIt = it.collectExpression() - - readers - .get(jsonName) - .fold( - if (fieldsWithoutReaders.contains(jsonName)) notComputedFields.update(jsonName, currentIt) - else if (${ Expr(isStrict) }) { - val unexpectedName = jsonName - val expectedNames = readers.keySet.union(fieldsWithoutReaders).mkString("'", "', '", "'") - ReaderError.wrongJson(s"unexpected field '$unexpectedName', expected one of $expectedNames") - } - )(_.foreach { case (name, tpeName, reader) => - val value: Any = reader.read(currentIt.copy())(fieldName.appendFieldName(jsonName)) - readFields.updateWith(name) { - case None => Some(MutableMap(tpeName -> value)) - case Some(values) => Some(values.addOne(tpeName, value)) - } - }) - } - it.nextToken() - - $defaultValuesExpr.foreach { case (name, tpeName, defaultValue) => - readFields.getOrElseUpdate(name, MutableMap(tpeName -> defaultValue)) - } - - $possiblyNotInitializedExpr.foreach { case (name, tpeName, defaultValue) => - readFields.getOrElseUpdate(name, MutableMap(tpeName -> defaultValue)) - } - - val fieldsNotReadFirstInJson: Set[String] = - Set.from(${ Varargs(fieldsToReadFirstFromJson.map(Expr(_))) }) -- readFields.keySet - if (fieldsNotReadFirstInJson.nonEmpty) - ReaderError.wrongJson("Can not extract fields from json: " + fieldsNotReadFirstInJson.mkString(", ")) - - ${ - val readFieldsTerm = 'readFields.asTerm - val resultFieldsTerm = 'resultFields.asTerm - - val res = sortedReaderFields.map { - case SimpleField(name, tpe, _) => - val nameTerm = Expr(name).asTerm - val tpeNameTerm = Expr(tpe.getDealiasFullName).asTerm - val resultField = readFieldsTerm - .selectFirstMethod("apply") - .appliedTo(nameTerm) - .selectFirstMethod("apply") - .appliedTo(tpeNameTerm) - .selectFirstMethod("asInstanceOf") - .appliedToType(tpe) - resultFieldsTerm - .selectFirstMethod("update") - .appliedTo(nameTerm, resultField) - .asExpr - - case ExtractedField(name, tpe, args, body) => - val nameTerm = Expr(name).asTerm - val tpeNameTerm = Expr(tpe.getDealiasFullName).asTerm - val extractedArgs: List[Term] = args.map(arg => - readFieldsTerm - .selectFirstMethod("apply") - .appliedTo(Expr(arg.field.name).asTerm) - .selectFirstMethod("apply") - .appliedTo(Expr(arg.field.tpe.getDealiasFullName).asTerm) - .selectFirstMethod("asInstanceOf") - .appliedToType(arg.field.tpe) - ) - val extractedFieldTerm = body.selectFirstMethod("apply").appliedToArgs(extractedArgs) - val addToReadFieldsExpr = readFieldsTerm - .selectFirstMethod("apply") - .appliedTo(nameTerm) - .selectFirstMethod("update") - .appliedTo(tpeNameTerm, extractedFieldTerm) - .asExpr - val addToResultFieldsExpr = resultFieldsTerm - .selectFirstMethod("update") - .appliedTo(nameTerm, extractedFieldTerm) - .asExpr - Expr.block(List(addToReadFieldsExpr), addToResultFieldsExpr) - - case FromExtractedReader(name, tpe, jsonName, args, body) => - val extractedArgs: List[Term] = args.map(arg => - readFieldsTerm - .selectFirstMethod("apply") - .appliedTo(Expr(arg.field.name).asTerm) - .selectFirstMethod("apply") - .appliedTo(Expr(arg.field.tpe.getDealiasFullName).asTerm) - .selectFirstMethod("asInstanceOf") - .appliedToType(arg.field.tpe) - ) - val nameExpr = Expr(name) - val jsonNameExpr = Expr(jsonName) - val tpeNameExpr = Expr(tpe.getDealiasFullName) - val extractedReaderExpr = - body.selectFirstMethod("apply").appliedToArgs(extractedArgs).asExprOf[JsonReader[?]] - '{ - notComputedFields - .get($jsonNameExpr) - .foreach { it => - val value: Any = $extractedReaderExpr.read(it)(fieldName.appendFieldName($jsonNameExpr)) - readFields.updateWith($nameExpr) { - case None => Some(MutableMap($tpeNameExpr -> value)) - case Some(values) => Some(values.addOne($tpeNameExpr, value)) - } - resultFields.update($nameExpr, value) - } - } - } - Expr.block(res, '{ () }) - } - - - val notReadAfterExtractingFields: Set[String] = - Set.from(${ Varargs(classFields.map(field => Expr(field.name))) }) -- resultFields.keySet - if (notReadAfterExtractingFields.nonEmpty) - ReaderError.wrongJson( - "Can not extract fields: " + notReadAfterExtractingFields.mkString(", ") - ) - - ${ - val paramsInfo = classFields.map(param => (param.name, tpr.memberType(param))) - - val fields: List[Term] = paramsInfo.map { case (paramName, paramType) => - 'resultFields.asTerm - .selectFirstMethod("apply") - .appliedTo(Expr(paramName).asTerm) - .selectFirstMethod("asInstanceOf") - .appliedToType(paramType) - } - - New(tpt) - .select(tpr.typeSymbol.primaryConstructor) - .appliedToTypes(tpr.typeArgs) - .appliedToArgs(fields) - .asExprOf[T] - } - } - } - } - } - } - - private def sortFieldsByProcessing( - fieldsToReadFirstFromJson: List[String], - readerFields: List[ReaderField] - ): List[ReaderField] = { - def go(notInQueue: List[ReaderField], queue: List[String]): List[String] = { - notInQueue match { - case Nil => queue - case notInQueueFields => - val extractedFieldsName = queue.toSet - val (ready, notReady) = notInQueueFields.partition { - case extField: ExtractedField => - val args = extField.args.map(_.field.name).toSet - args.isEmpty || args.subsetOf(extractedFieldsName) - case fromExtReader: FromExtractedReader => - val args = fromExtReader.args.map(_.field.name).toSet - args.isEmpty || args.subsetOf(extractedFieldsName) - case _: SimpleField => true // impossible case - } - if (notReady != notInQueue) - go(notReady, queue ::: ready.map(_.name)) - else - report.errorAndAbort( - s"Check fields in functions to extract: ${notReady.map(_.name).mkString(", ")}. There is recursive extracting or missing field possibly." - ) - } - } - - val startQueue = fieldsToReadFirstFromJson - val notInQueue = readerFields.filterNot(field => startQueue.contains(field.name)) - val fieldsQueueToProcessing = go(notInQueue, startQueue) - - fieldsQueueToProcessing.flatMap(fieldName => readerFields.find(_.name == fieldName)) - } - - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[SimpleField] => List[SimpleField] = readerFields => - fieldStyle.fold(readerFields)(style => - readerFields.map(field => field.copy(jsonName = style.applyStyle(field.jsonName))) - ) - - private def allocateDefaultValuesForNotInitialized( - readerFields: List[ReaderField] - ): Expr[List[(String, String, Any)]] = { - val fieldInfos = readerFields.flatMap { - case f: SimpleField => List(f.name -> f.tpe) - case f: ExtractedField => f.args.map(arg => arg.field.name -> arg.field.tpe) - case f: FromExtractedReader => f.args.map(arg => arg.field.name -> arg.field.tpe) - } - - val res = fieldInfos.flatMap { case (name, tpe) => - tpe.asType match { - case '[jrdvTpe] => - tpe.searchJsonReaderDefaultValue.asExprOf[JsonReaderDefaultValue[jrdvTpe]] match { - case '{ JsonReaderDefaultValue.noDefaultValue[jrdvTpe] } => None - case jrdv => - Some( - Expr.ofTuple( - ( - Expr(name), - Expr(tpe.getDealiasFullName), - jrdv.asTerm.selectFirstMethod("defaultValue").asExprOf[Any] - ) - ) - ) - } - } - } - - Expr.ofList(res) - } - - private def allocateReadersExpr( - readerFields: List[ReaderField], - readers: List[(TypeRepr, Term)] - ): (Expr[Map[String, List[(String, String, JsonReader[?])]]], Expr[Set[String]]) = { - case class FieldDef(name: String, jsonName: String, tpeFullName: String, reader: Term) - - def findReader(tpe: TypeRepr): Term = readers.find(_._1 =:= tpe.widen).get._2 - - val fieldDefs: List[FieldDef] = readerFields.flatMap { - case f: SimpleField => - List(FieldDef(f.name, f.jsonName, f.tpe.getDealiasFullName, findReader(f.tpe))) - case f: ExtractedField => - f.args.collect { case FunctionArgument(Field.RawField(jsonName, tpe)) => - FieldDef(jsonName, jsonName, tpe.getDealiasFullName, findReader(tpe)) - } - case f: FromExtractedReader => - f.args.collect { case FunctionArgument(Field.RawField(jsonName, tpe)) => - FieldDef(jsonName, jsonName, tpe.getDealiasFullName, findReader(tpe)) - } - } - - val fieldsWithoutReaders = readerFields - .filterNot(field => fieldDefs.exists(_.jsonName == field.jsonName)) - .map(field => Expr(field.jsonName)) - - val groupedDefs = fieldDefs.distinct.groupBy(_.jsonName).toList - - val res = groupedDefs.map { case (jsonName, defs) => - val readersInfoExpr: Expr[List[(String, String, JsonReader[?])]] = Expr.ofList( - defs.map { fieldDef => - Expr.ofTuple((Expr(fieldDef.name), Expr(fieldDef.tpeFullName), fieldDef.reader.asExprOf[JsonReader[?]])) - } - ) - Expr.ofTuple(Expr(jsonName) -> readersInfoExpr) - } - - val readersExpr = '{ Map(${ Varargs(res) }: _*) } - val fieldsWithoutReadersExpr = '{ Set(${ Varargs(fieldsWithoutReaders) }: _*) } - (readersExpr, fieldsWithoutReadersExpr) - } - - private def allocateDefaultValuesFromDefinition[T: Type]: Expr[List[(String, String, Any)]] = { - val tpe = TypeRepr.of[T] - - val res = tpe.typeSymbol.caseFields.collect { - case sym if sym.flags.is(Flags.HasDefault) => - val comp = sym.owner.companionClass - val mod = Ref(sym.owner.companionModule) - val indexOfDefaultValueMethod = sym.owner.caseFields.indexOf(sym) + 1 - - val defaultValueMethodSym = - comp - .declaredMethod(s"$$lessinit$$greater$$default$$$indexOfDefaultValueMethod") // $$default$1 - .headOption - .getOrElse( - report.errorAndAbort( - s"Error while extracting default value for field '${sym.name}'. Default value method in companion class doesn't exist. Check default value for this parameter." - ) - ) - - val defaultValueTerm = mod.select(defaultValueMethodSym) - val appliedTypes = if tpe.typeArgs.nonEmpty then defaultValueTerm.appliedToTypes(tpe.typeArgs) else defaultValueTerm - Expr.ofTuple( - Expr(sym.name), - Expr(tpe.memberType(sym).getDealiasFullName), - appliedTypes.asExprOf[Any] - ) - } - Expr.ofList(res) - } - - private def allocateTypeReadersInfos(readerFields: List[ReaderField]): List[(TypeRepr, Term)] = { - val jsonTypes = readerFields.flatMap { - case f: SimpleField => List(f.tpe) - case f: ExtractedField => f.args.map(_.field.tpe) - case f: FromExtractedReader => f.args.map(_.field.tpe) - } - - jsonTypes.foldLeft(List[(TypeRepr, Term)]()) { - case (acc, tpe) if !acc.exists(_._1 =:= tpe) => - (tpe, tpe.searchInlineJsonReader) :: acc - case (res, _) => res - } - } - - private def applyDescriptionOperations( - operations: Seq[ReaderMacroOperation] - ): List[ReaderField] => List[ReaderField] = readerFields => { - def mapField(fields: List[ReaderField], name: String)(f: SimpleField => ReaderField): List[ReaderField] = { - fields.map { - case field: SimpleField if field.name == name => f(field) - case field => field - } - } - - def buildArgument(field: Field, readerFields: List[ReaderField]): FunctionArgument = { - field match { - case Field.ClassField(name, _) => - readerFields.collectFirst { - case f: SimpleField if f.name == name => FunctionArgument(field) - case f: ExtractedField if f.name == name => FunctionArgument(field) - case f: FromExtractedReader if f.name == name => FunctionArgument(field) - }.head - case Field.RawField(name, tpe) => - val possibleArg = readerFields.flatMap { - case f: SimpleField if f.jsonName == name && f.tpe =:= tpe => - List(FunctionArgument(field)) - case f: ExtractedField => - f.args.collectFirst { - case arg @ FunctionArgument(rf: Field.RawField) if rf.name == name && rf.tpe =:= tpe => - arg - } - case f: FromExtractedReader => - f.args.collectFirst { - case arg @ FunctionArgument(rf: Field.RawField) if rf.name == name && rf.tpe =:= tpe => - arg - } - case _ => List.empty[FunctionArgument] - } - - possibleArg.headOption.getOrElse(FunctionArgument(field = Field.RawField(name, tpe))) - } - } - - operations.foldLeft(readerFields) { case (fields, operation) => - operation match { - case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => - mapField(fields, field)(f => - ExtractedField( - name = field, - tpe = tpe, - args = List(FunctionArgument(field = Field.RawField(f.jsonName, as))), - body = fun - ) - ) - case ReaderMacroOperation.ExtractFieldValue(field, from, fun) => - mapField(fields, field)(f => - ExtractedField( - name = field, - tpe = f.tpe, - args = from.toList.map(buildArgument(_, fields)), - body = fun - ) - ) - case ReaderMacroOperation.ExtractFieldReader(field, from, fun) => - mapField(fields, field)(f => - FromExtractedReader( - name = field, - tpe = f.tpe, - jsonName = f.jsonName, - args = from.toList.map(buildArgument(_, fields)), - body = fun - ) - ) - } - } - } - - private sealed trait ReaderField { - val name: String - val jsonName: String - } - private case class SimpleField(name: String, tpe: TypeRepr, jsonName: String) extends ReaderField - - private case class ExtractedField(name: String, tpe: TypeRepr, args: List[FunctionArgument], body: Term) - extends ReaderField { - val jsonName: String = name - } - - private case class FromExtractedReader( - name: String, - tpe: TypeRepr, - jsonName: String, - args: List[FunctionArgument], - body: Term - ) extends ReaderField - - private case class FunctionArgument(field: Field) -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala deleted file mode 100644 index a5535094..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala +++ /dev/null @@ -1,114 +0,0 @@ -package tethys.derivation.impl.derivation - -import scala.quoted.* - -import tethys.derivation.builder.* -import tethys.derivation.impl.builder.{WriterBuilderCommons, WriterBuilderUtils} -import tethys.readers.{FieldName, ReaderError} -import tethys.readers.tokens.TokenIterator -import tethys.{JsonObjectWriter, JsonReader, JsonWriter} -import tethys.writers.tokens.TokenWriter -import scala.annotation.experimental - -class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with ReaderDerivation { - implicit val context: Quotes = quotes - import context.reflect.* - - @experimental - def simpleJsonWriter[T: Type]: Expr[JsonObjectWriter[T]] = - jsonWriterWithMacroWriteDescription[T](MacroWriteDescription.empty[T]) - - @experimental - def jsonWriterWithConfig[T: Type](config: Expr[WriterDerivationConfig]): Expr[JsonObjectWriter[T]] = { - val tpe = TypeRepr.of[T] - - val description = MacroWriteDescription( - tpe = tpe, - config = config, - operations = Seq() - ) - - jsonWriterWithMacroWriteDescription[T](description) - } - - @experimental - def jsonWriterWithMacroWriteDescription[T: Type](description: MacroWriteDescription): Expr[JsonObjectWriter[T]] = { - val tpe = TypeRepr.of[T] - - if (tpe.termSymbol.isNoSymbol) { - val tpeSym = tpe.typeSymbol - - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassWriter[T](description) - else if (tpeSym.flags.is(Flags.Enum) || (tpeSym.flags.is(Flags.Sealed) && (tpeSym.flags.is(Flags.Trait) || tpeSym.flags.is(Flags.Abstract)))) - deriveSealedClassWriter[T](description.config) - else - report.errorAndAbort( - s"Can't auto derive json writer! ${tpe.show} isn't a Case Class, Sealed Trait, Sealed Abstract Class or Enum" - ) - } - else deriveTermWriter[T] - } - - @experimental - def jsonWriterWithBuilder[T <: Product: Type](builder: Expr[WriterBuilder[T]]): Expr[JsonObjectWriter[T]] = { - val description = convertWriterBuilder[T](builder) - jsonWriterWithWriterDescription[T](description) - } - - @experimental - def jsonWriterWithWriterDescription[T: Type](description: Expr[WriterDescription[T]]): Expr[JsonObjectWriter[T]] = { - val tpe = TypeRepr.of[T] - val tpeSym = tpe.typeSymbol - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassWriter[T](MacroWriteDescription.unlift(description)) - else report.errorAndAbort(s"Can't derive json writer! ${tpe.show} isn't a Case Class") - } - - @experimental - def simpleJsonReader[T: Type]: Expr[JsonReader[T]] = { - val description = MacroReaderDescription( - config = emptyReaderConfig, - operations = Seq() - ) - jsonReaderWithMacroReaderDescription[T](description) - } - - def jsonReaderWithConfig[T: Type](config: Expr[ReaderDerivationConfig]): Expr[JsonReader[T]] = { - val description = MacroReaderDescription( - config = config, - operations = Seq() - ) - - jsonReaderWithMacroReaderDescription[T](description) - } - - def jsonReaderWithMacroReaderDescription[T: Type](description: MacroReaderDescription): Expr[JsonReader[T]] = { - val tpe = TypeRepr.of[T] - val tpeSym = tpe.typeSymbol - - if (tpe.termSymbol.isNoSymbol) { - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassReader[T](description) - else if (tpeSym.flags.is(Flags.Enum | Flags.Abstract)) - deriveEnumReader[T] - else - report.errorAndAbort(s"Can't derive json reader! '${tpe.show}' isn't a Case Class") - } - else deriveTermReader[T] - } - - def jsonReaderWithBuilder[T <: Product: Type](builder: Expr[ReaderBuilder[T]]): Expr[JsonReader[T]] = { - val description = convertReaderBuilder[T](builder) - jsonReaderWithReaderDescription[T](description) - } - - def jsonReaderWithReaderDescription[T: Type](description: Expr[ReaderDescription[T]]): Expr[JsonReader[T]] = { - val tpe = TypeRepr.of[T] - val tpeSym = tpe.typeSymbol - if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) - deriveCaseClassReader[T](MacroReaderDescription.unlift(description)) - else - report.errorAndAbort(s"Can't derive json reader! '${tpe.show}' isn't a Case Class") - } -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala deleted file mode 100644 index cc3cd591..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala +++ /dev/null @@ -1,547 +0,0 @@ -package tethys.derivation.impl.derivation - -import scala.annotation.tailrec -import scala.compiletime.* -import scala.quoted.* -import tethys.commons.LowPriorityInstance -import tethys.commons.TokenNode.FieldNameNode -import tethys.derivation.builder.WriterDerivationConfig -import tethys.derivation.impl.builder.{WriterBuilderCommons, WriterBuilderUtils} -import tethys.derivation.impl.FieldStyle -import tethys.writers.tokens.{SimpleTokenWriter, TokenWriter} -import tethys.{JsonObjectWriter, JsonWriter} -import scala.annotation.experimental - -trait WriterDerivation extends WriterBuilderCommons { - import context.reflect.* - - // ---------------------------------- CASE CLASS ---------------------------------- - @experimental - def deriveCaseClassWriter[T: Type]( - description: MacroWriteDescription - ): Expr[JsonObjectWriter[T]] = { - val (fieldStyle, _) = evalWriterConfig(description.config) - val caseClassTpe: TypeRepr = TypeRepr.of[T] - - val defaultFieldsToTpesMap: Map[String, List[TypeRepr]] = Map.from { - caseClassTpe.typeSymbol.caseFields.map(sym => sym.name -> List(caseClassTpe.memberType(sym))) - } - val allTpes: List[TypeRepr] = collectAllNecessaryTypes(defaultFieldsToTpesMap, description.operations.toList) - val (nonCaseClassTpes, caseClassTpes) = allTpes.partition(_.typeSymbol.caseFields.isEmpty) - - def collectClsDecls(clsSym: Symbol): List[Symbol] = - createThisWriterSym(clsSym, caseClassTpe) +: - allTpes.zipWithIndex.map { case (tpe, i) => createInnerWriterSym(clsSym, tpe.wrappedTo[JsonWriter], i) } :+ - createWriteValuesMethodSym(clsSym, name = "writeValues", tpe = caseClassTpe) - - val clsSym: Symbol = createClsSym(caseClassTpe, collectClsDecls) - - val thisWriterValDef: ValDef = ValDef(symbol = clsSym.declaredField("thisWriter"), rhs = Some(This(clsSym))) - - val tpeTermPairs: List[(TypeRepr, Term)] = createNonCaseClassWriterTerms(nonCaseClassTpes) ++ createCaseClassWriterTerms(caseClassTpes) - val innerWriterDefs: List[ValDef] = createInnerWriterDefs(clsSym, tpeTermPairs) - - val writeValuesMethodDef: DefDef = createWriteValuesMethodDef[T]( - symbol = clsSym.declaredMethod("writeValues").head, - fieldStyle, - operations = description.operations, - writerDefs = innerWriterDefs - ) - - val derivedWriterClsParents: List[TypeTree] = List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) - val clsBody: List[Statement] = thisWriterValDef +: innerWriterDefs :+ writeValuesMethodDef - createDerivedWriterExpr[T](clsSym, derivedWriterClsParents, clsBody) - } - - private def createInnerWriterDefs(clsSym: Symbol, tpeTermPairs: List[(TypeRepr, Term)]): List[ValDef] = - tpeTermPairs.flatMap { case (tpe, writerTerm) => - clsSym.declaredFields.find(tpe.memberType(_).widen <:< tpe).fold(List.empty) { writerSym => - ValDef(symbol = writerSym, rhs = Some(writerTerm)) :: Nil - } - } - - @experimental - private def createDerivedWriterExpr[T: Type]( - clsSym: Symbol, - clsParents: List[Tree], - clsBody: List[Statement] - ): Expr[JsonObjectWriter[T]] = { - val derivedWriterClassDef: ClassDef = ClassDef(cls = clsSym, parents = clsParents, body = clsBody) - val derivedWriterInstance: Typed = Typed( - expr = Apply( - fun = Select(New(TypeIdent(clsSym)), clsSym.primaryConstructor), - args = Nil - ), - tpt = TypeTree.of[JsonObjectWriter[T]] - ) - - Block(stats = List(derivedWriterClassDef), expr = derivedWriterInstance).asExprOf[JsonObjectWriter[T]] - } - - private def collectAllNecessaryTypes( - defaultTpes: Map[String, List[TypeRepr]], - operations: List[WriterMacroOperation] - ): List[TypeRepr] = { - def searchAdditionalTypes(tpe: TypeRepr): List[TypeRepr] = { - @tailrec - def loop(acc: List[TypeRepr], unchecked: List[TypeRepr]): List[TypeRepr] = - unchecked match - case head :: tail => - head match { - case tpe: AndOrType => - loop(acc, tail ++ List(tpe.left, tpe.right)) - case _ => - loop(acc :+ head, tail) - } - case Nil => acc - - loop(acc = Nil, unchecked = tpe :: Nil) - } - - val allFieldsToTpesMap: Map[String, List[TypeRepr]] = operations.foldLeft(defaultTpes) { - case (fieldToTpesMap, operation) => - operation match - case op: WriterMacroOperation.Remove => - fieldToTpesMap - op.field - case op: WriterMacroOperation.Update => - fieldToTpesMap + (op.field -> searchAdditionalTypes(op.to)) - case op: WriterMacroOperation.UpdateFromRoot => - fieldToTpesMap + (op.field -> searchAdditionalTypes(op.to)) - case op: WriterMacroOperation.UpdatePartial => - fieldToTpesMap + (op.field -> searchAdditionalTypes(op.to)) - case op: WriterMacroOperation.UpdatePartialFromRoot => - fieldToTpesMap + (op.field -> searchAdditionalTypes(op.to)) - case op: WriterMacroOperation.Add => - fieldToTpesMap + (op.field.value.get -> searchAdditionalTypes(op.to)) - } - - allFieldsToTpesMap.values.toList.flatten.distinctBy(_.show) - } - - private def createNonCaseClassWriterTerms(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = - tpes.foldLeft(List.empty) { - case (rest, fieldTpe) if !rest.exists(_._1 <:< fieldTpe.widen) => - val writerTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val writerTerm: Term = fieldTpe.createWriterTerm(_.searchInlineJsonWriter) - rest :+ (writerTpe, writerTerm) - case (rest, _) => rest - } - - @experimental - private def createCaseClassWriterTerms(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = - tpes.map { - _.asType match { - case '[t] => - def derivedWriter: Expr[JsonWriter[t]] = deriveCaseClassWriter[t](MacroWriteDescription.empty[t]) - val writerTerm: Term = Expr.summon[JsonWriter[t]].getOrElse(derivedWriter).asTerm - TypeRepr.of[JsonWriter[t]] -> writerTerm - } - } - - private def createWriteValuesMethodDef[T: Type]( - symbol: Symbol, - fieldStyle: Option[FieldStyle], - operations: Seq[WriterMacroOperation], - writerDefs: List[ValDef] - ): DefDef = - DefDef( - symbol = symbol, - rhsFn = params => { - val term: Term = { - val (valueTerm, tokenWriterTerm) = getValueAndTokenWriterTerms(params) - - val writerFields: List[WriterField] = applyFieldStyle(fieldStyle) - .andThen(applyDescriptionOperations(valueTerm, operations)) - .apply(makeFields[T](valueTerm)) - val stats: List[Statement] = createWriterStatements(writerFields, writerDefs, tokenWriterTerm) - - Block(stats, expr = '{ () }.asTerm) - } - - Some(term.changeOwner(symbol)) - } - ) - - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[WriterField] => List[WriterField] = - writerFields => - fieldStyle.fold(writerFields) { style => - writerFields.map { - case field: SimpleWriterField => field.copy(jsonName = Expr(style.applyStyle(field.name))) - case field => field - } - } - - private def applyDescriptionOperations( - valueTerm: Term, - operations: Seq[WriterMacroOperation] - ): List[WriterField] => List[WriterField] = writerFields => { - def mapField(fields: List[WriterField], name: String)(f: SimpleWriterField => WriterField): List[WriterField] = - fields.map { - case field: SimpleWriterField if field.name == name => f(field) - case field => field - } - - operations.foldLeft(writerFields) { case (fields, operation) => - operation match { - case WriterMacroOperation.Remove(_, field) => - fields.filterNot(_.name == field) - - case WriterMacroOperation.Update(_, field, name, fun, from, to) => - mapField(fields, field)(f => - SimpleWriterField( - name = field, - jsonName = name.getOrElse(f.jsonName), - tpe = to, - extractor = FunctionExtractor( - arg = InlineExtract(valueTerm.selectField(field)), - from = from, - to = to, - body = fun - ) - ) - ) - - case WriterMacroOperation.UpdateFromRoot(tpe, field, name, fun, to) => - mapField(fields, field)(f => - SimpleWriterField( - name = field, - jsonName = name.getOrElse(f.jsonName), - tpe = to, - extractor = FunctionExtractor( - arg = InlineExtract(valueTerm), - from = tpe, - to = to, - body = fun - ) - ) - ) - - case WriterMacroOperation.UpdatePartial(_, field, name, fun, _, _) => - mapField(fields, field)(f => - PartialExtractedField( - name = field, - jsonName = name.getOrElse(f.jsonName), - argExtractor = InlineExtract(valueTerm.selectField(field)), - cases = fun match { - case Lambda(_, Match(_, cases)) => cases - } - ) - ) - - case WriterMacroOperation.UpdatePartialFromRoot(_, field, name, fun, _) => - mapField(fields, field)(f => - PartialExtractedField( - name = field, - jsonName = name.getOrElse(f.jsonName), - argExtractor = InlineExtract(valueTerm), - cases = fun match { - case Lambda(_, Match(_, cases)) => cases - } - ) - ) - - case WriterMacroOperation.Add(tpe, field, fun, to) => - fields :+ SimpleWriterField( - name = "__---nope---__", - jsonName = field, - tpe = to, - extractor = FunctionExtractor( - arg = InlineExtract(valueTerm), - from = tpe, - to = to, - body = fun - ) - ) - } - } - } - - private def makeFields[T: Type](valueTerm: Term): List[WriterField] = { - val tpr = TypeRepr.of[T] - tpr.typeSymbol.caseFields.map { fieldSym => - val fieldName = fieldSym.name - SimpleWriterField( - name = fieldName, - jsonName = Expr(fieldName), - tpe = tpr.memberType(fieldSym), - extractor = InlineExtract(valueTerm.selectField(fieldName)) - ) - } - } - - private def createWriterStatements( - writerFields: List[WriterField], - writerDefs: List[ValDef], - tokenWriterTerm: Term - ): List[Statement] = - writerFields.map { - case SimpleWriterField(_, jsonName, fieldTpe, extractor) => - getWriterDefRef(writerDefs, fieldTpe) - .selectWrite3Method - .appliedTo(jsonName.asTerm, getValueTerm(extractor), tokenWriterTerm) - - case PartialExtractedField(_, jsonName, argExtractor, cases) => - val newCases: List[CaseDef] = cases.map { case CaseDef(pattern, guard, rhs) => - val writerTerm: Term = rhs.tpe.widen.createWriterTerm(getWriterDefRef(writerDefs, _)) - val newRhs: Term = writerTerm - .selectWrite3Method - .appliedTo(jsonName.asTerm, rhs, tokenWriterTerm) - CaseDef(pattern, guard, rhs = newRhs) - } - Match(selector = getValueTerm(argExtractor), cases = newCases) - } - - private def getWriterDefRef(writerDefs: List[ValDef], fieldTpe: TypeRepr): Ref = { - val fieldWriterTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val reqWriter: ValDef = writerDefs.find(_.tpt.tpe <:< fieldWriterTpe).getOrElse { - report.errorAndAbort( - s"Writer for type ${fieldTpe.show} hasn't been found between writer definitions: ${writerDefs.map(_.show)}" - ) - } - Ref(reqWriter.symbol) - } - - private def getValueTerm(extractor: Extractor): Term = extractor match { - case InlineExtract(term) => - term - case FunctionExtractor(arg, _, _, func) => - func.selectFirstMethod("apply").appliedTo(arg.term) - } - - // -------------------- SEALED (TRAIT | ABSTRACT CLASS) OR ENUM ------------------- - @experimental - def deriveSealedClassWriter[T: Type]( - cfg: Expr[WriterDerivationConfig] - ): Expr[JsonObjectWriter[T]] = { - val parentTpe: TypeRepr = TypeRepr.of[T] - val isSameTypeWriterExists: Boolean = Expr.summon[JsonWriter[T]].nonEmpty - - val (_, discriminator) = evalWriterConfig(cfg) - val childTpes: List[TypeRepr] = collectDistinctSubtypes(parentTpe).sortBy(_.typeSymbol.fullName) - - if (childTpes.isEmpty) - report.errorAndAbort(s"${parentTpe.show} has no known direct subclasses") - - def collectClsDecls(clsSym: Symbol): List[Symbol] = - (if (isSameTypeWriterExists) Nil else List(createThisWriterSym(clsSym, parentTpe))) ::: - childTpes.zipWithIndex.map { case (tpe, i) => - createInnerWriterSym(clsSym, tpe.wrappedTo[JsonObjectWriter], i) - } ::: List( - createWriteValuesMethodSym(clsSym, name = "write", tpe = parentTpe), - createWriteValuesMethodSym(clsSym, name = "writeValues", tpe = parentTpe) - ) - - val clsSym: Symbol = createClsSym(parentTpe, collectClsDecls) - - val writeMethodDefSym: Symbol = clsSym.declaredMethod("write").head - val writeValuesMethodDefSym: Symbol = clsSym.declaredMethod("writeValues").head - - lazy val thisWriterDef: ValDef = ValDef(symbol = clsSym.declaredField("thisWriter"), rhs = Some(This(clsSym))) - - val tpeTermPairs: List[(TypeRepr, Term)] = createWriterTpeTermPairs(childTpes) - val innerWriterDefs: List[ValDef] = createInnerWriterDefs(clsSym, tpeTermPairs) - - val writeMethodDef: DefDef = createSealedWriteMethodDef[T](writeMethodDefSym, childTpes, writeValuesMethodDefSym) - val writeValuesMethodDef: DefDef = createSealedWriteValuesMethodDef[T]( - writeValuesMethodDefSym, childTpes, innerWriterDefs, discriminator - ) - - val derivedWriterClsParents: List[TypeTree] = List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) - val clsBody: List[Statement] = (if (isSameTypeWriterExists) Nil else List(thisWriterDef)) ::: - innerWriterDefs ::: List(writeMethodDef, writeValuesMethodDef) - - createDerivedWriterExpr[T](clsSym, derivedWriterClsParents, clsBody) - } - - private def createWriterTpeTermPairs(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = - tpes.foldLeft(List.empty) { - case (rest, fieldTpe) if !rest.exists(_._1 <:< fieldTpe.widen) => - val writerTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val writerTerm: Term = fieldTpe.createWriterTerm(_.searchInlineJsonObjectWriter) - rest :+ (writerTpe, writerTerm) - case (rest, _) => rest - } - - private def createSealedWriteMethodDef[T: Type]( - sym: Symbol, - childTpes: List[TypeRepr], - writeValuesMethodDefSym: Symbol - ): DefDef = - DefDef( - symbol = sym, - rhsFn = params => { - val term: Term = { - val (valueTerm, tokenWriterTerm) = getValueAndTokenWriterTerms(params) - - val cases: List[CaseDef] = childTpes.map { - case typeChildTpr if typeChildTpr.termSymbol.isNoSymbol => - val typeChildTpt: TypeTree = typeChildTpr.asType match { - case '[t] => TypeTree.of[t] - } - val typeChildBind = Symbol.newBind(Symbol.spliceOwner, "c", Flags.EmptyFlags, typeChildTpr) - val terms: List[Term] = { - val writeObjectStartTerm = tokenWriterTerm.selectFirstMethod("writeObjectStart").appliedToNone - val writeValuesTerm = Ref(writeValuesMethodDefSym).appliedTo(valueTerm, tokenWriterTerm) - val writeObjectEndTerm = tokenWriterTerm.selectFirstMethod("writeObjectEnd").appliedToNone - List(writeObjectStartTerm, writeValuesTerm, writeObjectEndTerm) - } - val rhs = Block(terms, '{ () }.asTerm) - CaseDef(Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), None, rhs) - case termChildTpr => - val termChildSym: Symbol = termChildTpr.termSymbol - val termChildRef: Ref = Ref(termChildSym) - val rhs: Term = Ref(writeValuesMethodDefSym).appliedTo(valueTerm, tokenWriterTerm) - CaseDef(termChildRef, None, rhs) - } - - Match(valueTerm, cases) - } - - Some(term.changeOwner(sym)) - } - ) - - private def createSealedWriteValuesMethodDef[T: Type]( - sym: Symbol, - childTpes: List[TypeRepr], - writerDefs: List[ValDef], - discriminator: Option[String] - ): DefDef = - DefDef( - symbol = sym, - rhsFn = params => { - val term: Term = { - val (valueTerm, tokenWriterTerm) = getValueAndTokenWriterTerms(params) - - val cases: List[CaseDef] = childTpes.map { - case typeChildTpr if typeChildTpr.termSymbol.isNoSymbol => - val typeChildTpt: TypeTree = typeChildTpr.asType match { - case '[t] => TypeTree.of[t] - } - val termChildWriter: Ref = getWriterDefRef(writerDefs, typeChildTpr) - val typeChildWriteValuesMethod = termChildWriter.selectWriteValuesMethod - val typeChildBind = Symbol.newBind(Symbol.spliceOwner, "c", Flags.EmptyFlags, typeChildTpr) - val writeValuesTerm = typeChildWriteValuesMethod.appliedTo(Ref(typeChildBind), tokenWriterTerm) - val discriminatorTerm = discriminator.fold(Literal(UnitConstant())) { discriminator => - TypeRepr - .of[String] - .getWrite3Method - .appliedTo(Expr(discriminator).asTerm, Expr(typeChildTpr.typeSymbol.name).asTerm, tokenWriterTerm) - } - val rhs = Block(List(writeValuesTerm), discriminatorTerm) - CaseDef(Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), None, rhs) - case termChildTpr => - val termChildSym = termChildTpr.termSymbol - val termChildRef = Ref(termChildSym) - val termChildNameTerm = Expr(termChildSym.name).asTerm - val termChildWriter = getWriterDefRef(writerDefs, termChildTpr) - val discriminatorTerm = discriminator.fold(Literal(UnitConstant())) { discriminator => - TypeRepr - .of[String] - .getWrite3Method - .appliedTo(Expr(discriminator).asTerm, termChildNameTerm, tokenWriterTerm) - } - val writeObjectStartTerm = tokenWriterTerm.selectFirstMethod("writeObjectStart").appliedToNone - val writeObjectEndTerm = tokenWriterTerm.selectFirstMethod("writeObjectEnd").appliedToNone - val terms: List[Term] = - if (termChildSym.flags.is(Flags.Enum)) { - if (discriminator.isEmpty) - List(termChildWriter.selectWriteValuesMethod.appliedTo(termChildRef, tokenWriterTerm)) - else - List(writeObjectStartTerm, discriminatorTerm, writeObjectEndTerm) - } else { - val writeValuesTerm = termChildWriter.selectWriteValuesMethod.appliedTo(termChildRef, tokenWriterTerm) - List(writeObjectStartTerm, writeValuesTerm, discriminatorTerm, writeObjectEndTerm) - } - val rhs = Block(terms, '{ () }.asTerm) - CaseDef(termChildRef, None, rhs) - } - - Match(valueTerm, cases) - } - - Some(term.changeOwner(sym)) - } - ) - - // ----------------------- TERM (case objects, simple enums) ---------------------- - def deriveTermWriter[T: Type]: Expr[JsonObjectWriter[T]] = { - val termNameTerm = Expr(TypeRepr.of[T].termSymbol.name).asTerm - - '{ - new JsonObjectWriter[T] { - override def write(value: T, tokenWriter: TokenWriter): Unit = - writeValues(value, tokenWriter) - - override def writeValues(value: T, tokenWriter: TokenWriter): Unit = ${ - val tokenWriterTerm = 'tokenWriter.asTerm - TypeRepr.of[String].getWrite2Method.appliedTo(termNameTerm, tokenWriterTerm).asExprOf[Unit] - } - } - } - } - - // ------------------------------------ COMMON ------------------------------------ - @experimental - private def createClsSym(tpe: TypeRepr, declsFn: Symbol => List[Symbol]): Symbol = - Symbol.newClass( - parent = Symbol.spliceOwner, - name = tpe.typeSymbol.name + "_DerivedWriter", - parents = List(TypeRepr.of[Object], tpe.wrappedTo[JsonObjectWriter]), - decls = declsFn, - selfType = None - ) - - private def createThisWriterSym(parentSymbol: Symbol, tpe: TypeRepr): Symbol = - Symbol.newVal( - parent = parentSymbol, - name = "thisWriter", - tpe = tpe.wrappedTo[JsonObjectWriter], - flags = Flags.Lazy | Flags.Implicit, - privateWithin = Symbol.noSymbol - ) - - private def createInnerWriterSym(parentSymbol: Symbol, tpe: TypeRepr, idx: Int): Symbol = - Symbol.newVal( - parent = parentSymbol, - name = s"innerWriter_$idx", - tpe = tpe, - flags = Flags.Lazy, - privateWithin = Symbol.noSymbol - ) - - private def createWriteValuesMethodSym(parentSymbol: Symbol, name: String, tpe: TypeRepr): Symbol = - Symbol.newMethod( - parent = parentSymbol, - name = name, - tpe = MethodType(paramNames = List("value", "tokenWriter"))( - paramInfosExp = _ => List(tpe, TypeRepr.of[TokenWriter]), - resultTypeExp = _ => TypeRepr.of[Unit] - ), - flags = Flags.Override, - privateWithin = Symbol.noSymbol - ) - - private def getValueAndTokenWriterTerms[T: Type](params: List[List[Tree]]): (Term, Term) = { - val value: Expr[T] = params.head.head.asExprOf[T] - val tokenWriter: Expr[TokenWriter] = params.head(1).asExprOf[TokenWriter] - - value.asTerm -> tokenWriter.asTerm - } - - private sealed trait Extractor - private case class InlineExtract(term: Term) extends Extractor - private case class FunctionExtractor(arg: InlineExtract, from: TypeRepr, to: TypeRepr, body: Term) extends Extractor - - private sealed trait WriterField { - def name: String - } - private case class SimpleWriterField(name: String, jsonName: Expr[String], tpe: TypeRepr, extractor: Extractor) - extends WriterField - private case class PartialExtractedField( - name: String, - jsonName: Expr[String], - argExtractor: Extractor, - cases: List[CaseDef] - ) extends WriterField -} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala deleted file mode 100644 index 178dd440..00000000 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala +++ /dev/null @@ -1,24 +0,0 @@ -package tethys - -import scala.deriving.Mirror - -import tethys.{JsonObjectWriter, JsonReader, JsonWriter} -import tethys.derivation.semiauto.{jsonReader, jsonWriter} -import scala.annotation.experimental - -package object derivation { - extension (underlying: JsonReader.type) { - @experimental - inline def derived[T](using Mirror.Of[T]): JsonReader[T] = jsonReader[T] - } - - extension (underlying: JsonWriter.type) { - @experimental - inline def derived[T](using Mirror.Of[T]): JsonWriter[T] = jsonWriter[T] - } - - extension (underlying: JsonObjectWriter.type) { - @experimental - inline def derived[T](using Mirror.Of[T]): JsonObjectWriter[T] = jsonWriter[T] - } -} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala index 67d306b8..01667b2c 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala @@ -5,4 +5,4 @@ sealed trait ADTWithType[A] object ADTWithType { case class ADTWithTypeA[A](a: A) extends ADTWithType[A] case class ADTWithTypeB[A](a: A, b: ADTWithType[A]) extends ADTWithType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala index ea278168..ff242e00 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala @@ -8,4 +8,4 @@ object ADTWithWrongType { case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) extends ADTWithWrongType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala index 1f2e0d7c..c9e26ebc 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala @@ -4,11 +4,9 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.JsonReader import tethys.commons.{Token, TokenNode} -import tethys.commons.TokenNode.{value => token, *} -import tethys.derivation.auto.* -import tethys.readers.ReaderError +import tethys.commons.TokenNode._ +import tethys.derivation.auto._ import tethys.readers.tokens.QueueIterator - import tethys.TokenIteratorOps class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { @@ -37,53 +35,4 @@ class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { c = C(D(2)) ) } - - it should "derive reader for recursive type" in { - read[RecursiveType](obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ), - obj( - "a" -> 3, - "children" -> arr() - ) - ) - )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) - - } - - it should "derive reader for A => B => A cycle" in { - read[ComplexRecursionA](obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 - ) - ) - )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) - } - - it should "derive reader for simple enum" in { - read[SimpleEnum]( - token(SimpleEnum.ONE.toString) - ) shouldBe SimpleEnum.ONE - - read[SimpleEnum]( - token(SimpleEnum.TWO.toString) - ) shouldBe SimpleEnum.TWO - } - - it should "derive reader for parametrized enum" in { - read[ParametrizedEnum]( - token(ParametrizedEnum.ONE.toString) - ) shouldBe ParametrizedEnum.ONE - - read[ParametrizedEnum]( - token(ParametrizedEnum.TWO.toString) - ) shouldBe ParametrizedEnum.TWO - } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala index 3cbbf3ea..83cf9225 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala @@ -3,23 +3,19 @@ package tethys.derivation import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.commons.TokenNode -import tethys.commons.TokenNode.{value => token,*} -import tethys.derivation.ADTWithType.* -import tethys.derivation.auto.* -import tethys.derivation.semiauto.* +import tethys.commons.TokenNode._ +import tethys.derivation.ADTWithType._ +import tethys.derivation.auto._ +import tethys.derivation.semiauto._ import tethys.writers.instances.SimpleJsonObjectWriter -import tethys.writers.tokens.SimpleTokenWriter.* +import tethys.writers.tokens.SimpleTokenWriter._ import tethys.{JsonObjectWriter, JsonWriter} class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { behavior of "auto derivation" it should "auto derive writer for simple classes tree" in { - JsonTreeTestData( - a = 5, - b = false, - c = C(D(1)) - ).asTokenList shouldBe obj ( + JsonTreeTestData(a = 5, b = false, c = C(D(1))).asTokenList shouldBe obj( "a" -> 5, "b" -> false, "c" -> obj( @@ -44,39 +40,6 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { ) } - it should "auto derive writer for recursive type" in { - RecursiveType(1, Seq(RecursiveType(2))).asTokenList shouldBe obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ) - ) - ) - } - - it should "auto derive writer for A => B => A cycle" in { - ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 - ) - ) - ) - } - - it should "auto derive writer for sealed cyclic trait with type parameter" in { - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( - "a" -> 1, - "b" -> obj( - "a" -> 2 - ) - ) - } - it should "auto derive writer that normally concatenates with other JsonObjectWriter's" in { implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = { val simpleJsonObjectWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { @@ -113,14 +76,4 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { write(JustObject) shouldBe obj("type" -> "JustObject") write(SubChild(3)) shouldBe obj("c" -> 3) } - - it should "derive writer for simple enum" in { - SimpleEnum.ONE.asTokenList shouldBe token("ONE") - SimpleEnum.TWO.asTokenList shouldBe token("TWO") - } - - it should "derive writer for parametrized enum" in { - ParametrizedEnum.ONE.asTokenList shouldBe token("ONE") - ParametrizedEnum.TWO.asTokenList shouldBe token("TWO") - } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala index eb36f110..89f8f657 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala @@ -2,11 +2,10 @@ package tethys.derivation import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec -import tethys.JsonReader +import tethys.* import tethys.commons.* import tethys.commons.TokenNode.* import tethys.derivation.RedundantJsonReaderTest.* -import tethys.derivation.builder.ReaderBuilder import tethys.derivation.semiauto.* import tethys.readers.tokens.QueueIterator @@ -31,7 +30,7 @@ class RedundantJsonReaderTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[BaseClass] = jsonReader[BaseClass] { describe { ReaderBuilder[BaseClass] - .extract(_.r).from("intField".as[Int])(RedundantClass.apply) + .extract(_.r).from[Int]("intField")(RedundantClass.apply) } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala index c5b2e747..f7d63ec6 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala @@ -2,16 +2,14 @@ package tethys.derivation import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec -import tethys.JsonReader -import tethys.commons.TokenNode.{value => token, *} +import tethys.* +import tethys.commons.TokenNode.{value as token, *} import tethys.commons.{Token, TokenNode} -import tethys.derivation.builder.{FieldStyle, ReaderBuilder, ReaderDerivationConfig} +import tethys.derivation.builder.ReaderDerivationConfig import tethys.derivation.semiauto.* import tethys.readers.ReaderError import tethys.readers.tokens.QueueIterator -import tethys.TokenIteratorOps - class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { def read[A: JsonReader](nodes: List[TokenNode]): A = { @@ -44,7 +42,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for recursive type" in { - implicit val recursiveReader: JsonReader[RecursiveType] = jsonReader[RecursiveType] + given JsonReader[RecursiveType] = jsonReader[RecursiveType] read[RecursiveType](obj( "a" -> 1, @@ -101,7 +99,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.s, _.d)((_, _) => 2) + .extract(_.i).from(_.s).and(_.d)((_, _) => 2) } } @@ -117,11 +115,12 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { )) shouldBe SimpleType(2, "str", 1.0) } + it should "derive reader for extract from description with synthetic field" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.d).and(Symbol("e").as[Double])((d, e) => (d + e).toInt) + .extract(_.i).from(_.d).and[Double]("e")((d, e) => (d + e).toInt) } } @@ -139,6 +138,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { )) shouldBe SimpleType(4, "str", 1.0) } + it should "derive reader for extract reader from description" in { implicit val reader: JsonReader[SimpleTypeWithAny] = jsonReader[SimpleTypeWithAny] { describe { @@ -173,7 +173,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { case 2 => JsonReader[Int] case _ => JsonReader[Option[Boolean]] } - .extract(_.i).from(_.d).and(Symbol("e").as[Int])((d, e) => d.toInt + e) + .extract(_.i).from(_.d).and[Int]("e")((d, e) => d.toInt + e) .extract(_.d).as[Option[Double]](_.getOrElse(1.0)) } @@ -204,12 +204,11 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { "any" -> true )) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) - //FIXME: figure out how to handle this case - /*read[SimpleTypeWithAny](obj( + read[SimpleTypeWithAny](obj( "s" -> "str", "d" -> 1.0, "e" -> 2 - )) shouldBe SimpleTypeWithAny(3, "str", 1.0, None)*/ + )) shouldBe SimpleTypeWithAny(3, "str", 1.0, None) } it should "derive reader for fieldStyle from description" in { @@ -248,35 +247,20 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) + .extract(_.i).as[String](_.toInt) } } read[SimpleType](obj( - "i" -> 1, + "i" -> "1", "s" -> "str", "d" -> 1.0 )) shouldBe SimpleType(1, "str", 1.0) } - it should "derive reader for extract field even it described few times" in { - implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { - describe { - ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) - .extract(_.s).from("i".as[Long])(_.toString) - .extract(_.d).from(_.i)(_.toDouble) - } - } - - read[SimpleType](obj( - "i" -> 1 - )) shouldBe SimpleType(1, "1", 1.0) - } - it should "derive reader for reader config" in { implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( - ReaderDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase).strict + ReaderBuilder[CamelCaseNames].fieldStyle(FieldStyle.LowerSnakeCase).strict ) read[CamelCaseNames](obj( @@ -295,7 +279,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { "not_id_param" -> 2, "simple" -> 3 )) - }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'simple', 'id_param', 'some_param'" + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" } it should "derive reader for reader config from builder" in { @@ -321,14 +305,12 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { "not_id_param" -> 2, "simple" -> 3 )) - }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'simple', 'id_param', 'some_param'" + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" } it should "derive reader for simple enum" in { - implicit val oneReader: JsonReader[SimpleEnum.ONE.type] = jsonReader[SimpleEnum.ONE.type] - implicit val twoReader: JsonReader[SimpleEnum.TWO.type] = jsonReader[SimpleEnum.TWO.type] - implicit val simpleEnumReader: JsonReader[SimpleEnum] = jsonReader[SimpleEnum] + implicit val simpleEnumReader: JsonReader[SimpleEnum] = StringEnumJsonReader.derived read[SimpleEnum]( token(SimpleEnum.ONE.toString) @@ -340,9 +322,7 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for parametrized enum" in { - implicit val oneReader: JsonReader[ParametrizedEnum.ONE.type] = jsonReader[ParametrizedEnum.ONE.type] - implicit val twoReader: JsonReader[ParametrizedEnum.TWO.type] = jsonReader[ParametrizedEnum.TWO.type] - implicit val parametrizedEnumReader: JsonReader[ParametrizedEnum] = jsonReader[ParametrizedEnum] + implicit val parametrizedEnumReader: JsonReader[ParametrizedEnum] = StringEnumJsonReader.derived read[ParametrizedEnum]( token(ParametrizedEnum.ONE.toString) @@ -353,22 +333,85 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { ) shouldBe ParametrizedEnum.TWO } - it should "derive reader for class with default params" in { - implicit val reader: JsonReader[DefaultField[Int]] = jsonReader[DefaultField[Int]] + it should "derive reader for fieldStyle from description 1" in { + given JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames] { + ReaderDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase) + } - read[DefaultField[Int]](obj( - "value" -> 1, - "default" -> false - )) shouldBe DefaultField[Int]( - value = 1, - default = false + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 ) + } - read[DefaultField[Int]](obj( - "value" -> 1 - )) shouldBe DefaultField[Int]( - value = 1, - default = true + it should "derive reader for fieldStyle from description 2" in { + given JsonReader[CamelCaseNames] = JsonReader.derived[CamelCaseNames] { + ReaderDerivationConfig.empty.withFieldStyle(FieldStyle.LowerSnakeCase) + } + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 ) } + + it should "derive strict reader" in { + implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( + ReaderDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase).strict + ) + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + + (the[ReaderError] thrownBy { + read[CamelCaseNames](obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + )) + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" + } + + it should "derive strict reader with legacy field style" in { + import tethys.derivation.builder.FieldStyle + implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( + ReaderDerivationConfig.withFieldStyle(FieldStyle.lowerSnakeCase).strict + ) + + read[CamelCaseNames](obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + )) shouldBe CamelCaseNames( + someParam = 1, + IDParam = 2, + simple = 3 + ) + + (the[ReaderError] thrownBy { + read[CamelCaseNames](obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + )) + }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" + } + } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala index f092517e..bbe39f57 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala @@ -3,11 +3,11 @@ package tethys.derivation import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.commons.TokenNode -import tethys.{JsonObjectWriter, JsonWriter} -import tethys.derivation.builder.{FieldStyle, WriterBuilder, WriterDerivationConfig} +import tethys.* import tethys.writers.tokens.SimpleTokenWriter.* import tethys.commons.TokenNode.{value as token, *} import tethys.derivation.ADTWithType.{ADTWithTypeA, ADTWithTypeB} +import tethys.derivation.builder.WriterDerivationConfig import tethys.derivation.semiauto.* import tethys.writers.instances.SimpleJsonObjectWriter import tethys.writers.tokens.SimpleTokenWriter @@ -15,9 +15,9 @@ import tethys.writers.tokens.SimpleTokenWriter class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { behavior of "semiauto derivation" - it should "generate proper writer from WriterDescription" in { + it should "generate proper writer from WriterBuilder" in { def freeVariable: String = "e" - implicit val dWriter: JsonWriter[D] = jsonWriter[D](WriterDerivationConfig.withFieldStyle(FieldStyle.UpperCase)) + implicit val dWriter: JsonWriter[D] = jsonWriter[D](WriterBuilder[D].fieldStyle(FieldStyle.UpperCase)) implicit val testWriter: JsonWriter[JsonTreeTestData] = jsonWriter { WriterBuilder[JsonTreeTestData] @@ -37,17 +37,36 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { ) } + it should "generate proper writer from WriterDerivationConfig" in { + def freeVariable: String = "e" + + implicit val dWriter: JsonWriter[D] = jsonWriter[D]( + WriterDerivationConfig.withFieldStyle(tethys.derivation.builder.FieldStyle.uppercase) + ) + + implicit val testWriter: JsonWriter[JsonTreeTestData] = jsonWriter { + WriterDerivationConfig.withFieldStyle(FieldStyle.UpperCase) + } + JsonTreeTestData(5, b = false, C(D(1))).asTokenList shouldBe obj( + "A" -> 5, + "B" -> false, + "C" -> obj( + "d" -> obj( + "A" -> 1 + ) + ) + ) + } + it should "derive writer for update partial" in { implicit val partialWriter: JsonWriter[D] = jsonWriter { - describe { - WriterBuilder[D] - .updatePartial(_.a) { - case 1 => "uno!" - case 2 => 1 - case v if v > 0 => v * 2 - case _ => throw new IllegalArgumentException("Wrong value!") - } - } + WriterBuilder[D] + .updatePartial(_.a) { + case 1 => "uno!" + case 2 => 1 + case v if v > 0 => v * 2 + case _ => throw new IllegalArgumentException("Wrong value!") + } } D(1).asTokenList shouldBe obj("a" -> "uno!") @@ -61,15 +80,13 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { it should "derive writer for update partial from root" in { implicit val partialWriter: JsonWriter[D] = jsonWriter { - describe { - WriterBuilder[D] - .updatePartial(_.a).fromRoot { - case d if d.a == 1 => "uno!" - case d if d.a == 2 => 1 - case d if d.a > 0 => d.a * 2 - case _ => throw new IllegalArgumentException("Wrong value!") - } - } + WriterBuilder[D] + .updatePartial(_.a).fromRoot { + case d if d.a == 1 => "uno!" + case d if d.a == 2 => 1 + case d if d.a > 0 => d.a * 2 + case _ => throw new IllegalArgumentException("Wrong value!") + } } D(1).asTokenList shouldBe obj("a" -> "uno!") @@ -164,12 +181,13 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] + implicit val sealedSubWriter: JsonObjectWriter[SimpleSealedTypeSub] = jsonWriter[SimpleSealedTypeSub] implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1) - write(new SimpleClass(2)) shouldBe obj("b" -> 2) + write(SimpleClass(2)) shouldBe obj( "b" -> 2) write(JustObject) shouldBe obj("type" -> "JustObject") write(SubChild(3)) shouldBe obj("c" -> 3) } @@ -180,53 +198,41 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] { + WriterDerivationConfig.withDiscriminator("__type") + } def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList - write(CaseClass(1)) shouldBe obj("a" -> 1, "__type" -> "CaseClass") - write(new SimpleClass(2)) shouldBe obj("b" -> 2, "__type" -> "SimpleClass") + write(CaseClass(1)) shouldBe obj("__type" -> "CaseClass", "a" -> 1) + write(new SimpleClass(2)) shouldBe obj("__type" -> "SimpleClass", "b" -> 2) write(JustObject) shouldBe obj("__type" -> "JustObject") - write(SubChild(3)) shouldBe obj("c" -> 3, "__type" -> "SubChild") + write(SubChild(3)) shouldBe obj("__type" -> "SubChild", "c" -> 3) } it should "derive writer for simple enum" in { - implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = jsonWriter[SimpleEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = jsonWriter[SimpleEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = jsonWriter[SimpleEnum] + implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = StringEnumJsonWriter.derived SimpleEnum.ONE.asTokenList shouldBe token("ONE") SimpleEnum.TWO.asTokenList shouldBe token("TWO") } it should "derive writer for parametrized enum" in { - implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = jsonWriter[ParametrizedEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = jsonWriter[ParametrizedEnum.TWO.type] - implicit val parametrizedEnumWriter: JsonWriter[ParametrizedEnum] = jsonWriter[ParametrizedEnum] + implicit val parametrizedEnumWriter: JsonWriter[ParametrizedEnum] = StringEnumJsonWriter.derived ParametrizedEnum.ONE.asTokenList shouldBe token("ONE") ParametrizedEnum.TWO.asTokenList shouldBe token("TWO") } it should "derive writer with discriminator for simple enum" in { - implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = jsonWriter[SimpleEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = jsonWriter[SimpleEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = jsonWriter[SimpleEnum]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = StringEnumJsonWriter.withLabel("__type") SimpleEnum.ONE.asTokenList shouldBe obj("__type" -> "ONE") SimpleEnum.TWO.asTokenList shouldBe obj("__type" -> "TWO") } it should "derive writer with discriminator for parametrized enum" in { - implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = jsonWriter[ParametrizedEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = jsonWriter[ParametrizedEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[ParametrizedEnum] = jsonWriter[ParametrizedEnum]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val simpleEnumWriter: JsonWriter[ParametrizedEnum] = StringEnumJsonWriter.withLabel("__type") ParametrizedEnum.ONE.asTokenList shouldBe obj ("__type" -> "ONE") ParametrizedEnum.TWO.asTokenList shouldBe obj ("__type" -> "TWO") diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SimpleSealedType.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SimpleSealedType.scala index 2a5d6d76..6e05311c 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SimpleSealedType.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SimpleSealedType.scala @@ -1,9 +1,11 @@ package tethys.derivation +import tethys.selector + sealed abstract class SimpleSealedType case class CaseClass(a: Int) extends SimpleSealedType -class SimpleClass(val b: Int) extends SimpleSealedType -object JustObject extends SimpleSealedType +case class SimpleClass(val b: Int) extends SimpleSealedType +case object JustObject extends SimpleSealedType sealed abstract class SimpleSealedTypeSub extends SimpleSealedType case class SubChild(c: Int) extends SimpleSealedTypeSub diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/WriterRenamingSyntaxTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/WriterRenamingSyntaxTest.scala index 2a327949..b9d17ef0 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/WriterRenamingSyntaxTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/WriterRenamingSyntaxTest.scala @@ -5,16 +5,13 @@ import org.scalatest.flatspec.AnyFlatSpec import tethys.* import tethys.writers.tokens.SimpleTokenWriter.* import tethys.commons.TokenNode.* -import tethys.derivation.builder.WriterBuilder import tethys.derivation.semiauto.* class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { behavior of "renaming syntax" it should "rename field on 'rename'" in { implicit val writer: JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].rename(_.a)("b") - } + WriterBuilder[D].rename(_.a)("b") } D(1).asTokenList shouldBe obj( @@ -24,9 +21,7 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { it should "rename field on update" in { implicit val writer: JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].update(_.a).withRename("b")(_.toString) - } + WriterBuilder[D].update(_.a).withRename("b")(_.toString) } D(1).asTokenList shouldBe obj( @@ -36,9 +31,7 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { it should "rename field on update with free variable" in { def freeVariableRenaming(name: String): JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].update(_.a).withRename(name)(_.toString) - } + WriterBuilder[D].update(_.a).withRename(name)(_.toString) } D(a = 1).asTokenList(freeVariableRenaming("b")) shouldBe obj( @@ -52,9 +45,8 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { it should "rename field on update from root" in { implicit val writer: JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].update(_.a).withRename("b").fromRoot(_.a * 2) - } + WriterBuilder[D].update(_.a).withRename("b").fromRoot(_.a * 2) + } D(1).asTokenList shouldBe obj( @@ -64,11 +56,9 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { it should "rename field on updatePartial" in { implicit val writer: JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].updatePartial(_.a).withRename("b") { - case 1 => "uno" - case i => i - } + WriterBuilder[D].updatePartial(_.a).withRename("b") { + case 1 => "uno" + case i => i } } @@ -83,11 +73,9 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { it should "rename field on updatePartial from root" in { implicit val writer: JsonWriter[D] = jsonWriter[D] { - describe { - WriterBuilder[D].updatePartial(_.a).withRename("b").fromRoot { - case D(1) => "uno" - case D(i) => i * 2 - } + WriterBuilder[D].updatePartial(_.a).withRename("b").fromRoot { + case D(1) => "uno" + case D(i) => i * 2 } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala deleted file mode 100644 index b9fbfea8..00000000 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala +++ /dev/null @@ -1,284 +0,0 @@ -package tethys.derivation.builder - -import org.scalatest.matchers.should.Matchers -import org.scalatest.flatspec.AnyFlatSpec -import tethys.JsonReader -import tethys.derivation.builder.ReaderDescription.BuilderOperation -import tethys.derivation.builder.{FieldStyle, ReaderDerivationConfig, ReaderDescription} -import tethys.derivation.builder.ReaderDescriptionTest.Foo -import tethys.derivation.semiauto.* - -class ReaderDescriptionTest extends AnyFlatSpec with Matchers { - - behavior of "describe" - - it should "build empty description from empty builder" in { - describe(ReaderBuilder[Foo]) shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq()) - } - - it should "build description with config" in { - describe(ReaderBuilder[Foo].fieldStyle(FieldStyle.UpperCase).strict) shouldBe ReaderDescription[Foo]( - ReaderDerivationConfig.withFieldStyle(FieldStyle.UpperCase).strict, - Seq() - ) - } - - it should "build description for ExtractFieldAs operation" in { - val fun: Option[Int] => Int = _.getOrElse(1) - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).as[Option[Int]](fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - BuilderOperation.ExtractFieldAs("a", fun) - )) - } - - it should "build description for ExtractFieldValue operation from lambdas" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(_.b, _.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldValue operation from ReaderField's" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldValue operation from lambdas and lambdas" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(_.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldValue operation from lambdas and ReaderField's" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(Symbol("c").as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldValue operation from ReaderField's and lambdas" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(_.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldValue operation from ReaderField's and ReaderField's" in { - val fun: (String, Any) => Int = (_, _) => 1 - - val description = describe { - ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from lambdas" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(_.b, _.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from ReaderField's" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from lambdas and lambdas" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(_.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from lambdas and ReaderField's" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(Symbol("c").as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from ReaderField's and lambdas" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(_.c)(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun - ) - )) - } - - it should "build description for ExtractFieldReader operation from ReaderField's and ReaderField's" in { - val fun: (String, Any) => JsonReader[Int] = (_, _) => JsonReader.intReader - - val description = describe { - ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) - } - - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun - ) - )) - } - - -} - -object ReaderDescriptionTest { - case class Foo(a: Int, b: String, c: Any) -} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala deleted file mode 100644 index 864b2ef9..00000000 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala +++ /dev/null @@ -1,182 +0,0 @@ -package tethys.derivation.builder - -import org.scalatest.matchers.should.Matchers -import org.scalatest.flatspec.AnyFlatSpec -import tethys.derivation.builder.{FieldStyle, WriterDerivationConfig} -import tethys.derivation.builder.WriterDescriptionTest.* -import tethys.derivation.builder.WriterDescription.* -import tethys.derivation.semiauto.* - -class WriterDescriptionTest extends AnyFlatSpec with Matchers { - - behavior of "Json.describe" - it should "extract derivation config" in { - describe { - WriterBuilder[BuilderTestData] - .fieldStyle(FieldStyle.LowerSnakeCase) - } shouldBe WriterDescription( - WriterDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase), - Seq() - ) - } - - it should "extract remove operations" in { - describe { - WriterBuilder[BuilderTestData] - .remove(_.a) - .remove(_.inner) - } shouldBe WriterDescription( - WriterDerivationConfig.empty, - Seq( - BuilderOperation.Remove[BuilderTestData]("a"), - BuilderOperation.Remove[BuilderTestData]("inner") - ) - ) - } - - it should "not compile if we try to remove field from inner class" in { - """ - | extract { - | new JsonWriterBuilder[ - | .remove(_.a) - | .remove(_.inner.a) - | } - """.stripMargin shouldNot compile - } - - it should "extract update operations" in { - val description = describe { - WriterBuilder[BuilderTestData] - .update(_.a)(_.toString) - } - - val Seq(u: BuilderOperation.Update[BuilderTestData, Int, String]) = description.operations: @unchecked - - u.field shouldBe "a" - u.fun(1) shouldBe "1" - } - - it should "extract update from root operations" in { - val description = describe { - WriterBuilder[BuilderTestData] - .update(_.a) - .fromRoot(_.a.toString) - } - - val Seq(u: BuilderOperation.UpdateFromRoot[BuilderTestData, String]) = - description.operations: @unchecked - - u.field shouldBe "a" - u.fun(BuilderTestData(1, "s", c = true, 1L, InnerCls(2))) shouldBe "1" - } - - it should "extract update partial operations" in { - val description = describe { - WriterBuilder[BuilderTestData] - .updatePartial(_.a) { - case 1 => "uno!" - case 2 => 4 - case v => v * 3 - } - } - - val Seq( - up: BuilderOperation.UpdatePartial[BuilderTestData, Int, String | Int] - ) = description.operations: @unchecked - - up.field shouldBe "a" - up.fun(1) shouldBe "uno!" - up.fun(2) shouldBe 4 - up.fun(3) shouldBe 9 - } - - it should "extract update partial from root operations" in { - val description = describe { - WriterBuilder[BuilderTestData] - .updatePartial(_.a) - .fromRoot { - case d if d.a == 1 => "uno!" - case d if d.a == 2 => 4 - case d => d.a * 3 - } - } - - val Seq( - up: BuilderOperation.UpdatePartialFromRoot[BuilderTestData, String | Int] - ) = description.operations: @unchecked - - up.field shouldBe "a" - - val data = BuilderTestData(1, "s", c = true, 1L, InnerCls(2)) - up.fun(data) shouldBe "uno!" - up.fun(data.copy(a = 2)) shouldBe 4 - up.fun(data.copy(a = 3)) shouldBe 9 - } - - it should "extract complex case" in { - - val testData = BuilderTestData(1, "a", c = true, 4L, InnerCls(2)) - - val WriterDescription(_, operations) = describe { - WriterBuilder[BuilderTestData] - .remove(_.a) - .update(_.c)(c => !c) - .add("e")(_.a * 2) - } - - operations.size shouldBe 3 - operations.head shouldBe BuilderOperation.Remove[BuilderTestData]("a") - - operations(1) shouldBe a[BuilderOperation.Update[_, _, _]] - - val u = operations(1) - .asInstanceOf[BuilderOperation.Update[BuilderTestData, Boolean, Boolean]] - u.field shouldBe "c" - u.fun(true) shouldBe false - - operations(2) shouldBe a[BuilderOperation.Add[_, _]] - - val add = - operations(2).asInstanceOf[BuilderOperation.Add[BuilderTestData, Int]] - add.field shouldBe "e" - add.fun(testData) shouldBe 2 - } - - it should "extract rename" in { - val WriterDescription(_, Seq(op: BuilderOperation.Update[BuilderTestData, Int, Int])) = describe { - WriterBuilder[BuilderTestData].rename(_.a)("aa") - }: @unchecked - - op.field shouldBe "a" - op.name shouldBe Some("aa") - op.fun(1) shouldBe 1 - } - - it should "extract update with rename" in { - val fun: Int => Int = _ + 1 - - describe { - WriterBuilder[BuilderTestData].update(_.a).withRename("aa")(fun) - }.operations shouldBe Seq( - BuilderOperation.Update("a", Some("aa"), fun) - ) - } - - it should "extract update from root with rename" in { - val fun: PartialFunction[BuilderTestData, Int] = { case d => - d.a - } - - describe { - WriterBuilder[BuilderTestData].update(_.a).withRename("aa").fromRoot(fun) - }.operations shouldBe Seq( - BuilderOperation.UpdateFromRoot("a", Some("aa"), fun) - ) - } -} - -object WriterDescriptionTest { - case class BuilderTestData(a: Int, b: String, c: Boolean, d: Long, inner: InnerCls) - - case class InnerCls(a: Int) -}