-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Greg Zoller
committed
Nov 15, 2023
1 parent
ee5da35
commit caaa5e3
Showing
42 changed files
with
1,956 additions
and
2,593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package co.blocke | ||
|
||
import org.openjdk.jmh.annotations._ | ||
|
||
object FabricZ: | ||
import fabric.* | ||
import fabric.io.* | ||
import fabric.rw.* | ||
|
||
implicit val rw: RW[Record] = RW.gen | ||
|
||
trait FabricReadingBenchmark{ | ||
@Benchmark | ||
def readRecordFabric = rw.write(JsonParser(jsData, Format.Json)) | ||
//JsonParser(jsData, Format.Json) | ||
} | ||
|
||
trait FabricWritingBenchmark{ | ||
@Benchmark | ||
def writeRecordFabric = rw.read(record) | ||
} | ||
|
||
// No Fabric write test. Fabric has a different model... not simple serialization. | ||
// Kinda like a query captured and compiled. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package co.blocke | ||
|
||
import org.openjdk.jmh.annotations._ | ||
|
||
object JawnZ: | ||
|
||
import org.typelevel.jawn.ast.* | ||
|
||
trait JawnReadingBenchmark{ | ||
@Benchmark | ||
def readRecordJawn = JParser.parseFromString(jsData) | ||
} | ||
|
||
trait JawnWritingBenchmark { | ||
@Benchmark | ||
def writeRecordJawn = record.asJson | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package co.blocke | ||
|
||
import org.openjdk.jmh.annotations._ | ||
|
||
object JsoniterZ: | ||
|
||
import com.github.plokhotnyuk.jsoniter_scala.core._ | ||
import com.github.plokhotnyuk.jsoniter_scala.macros._ | ||
|
||
given codec: JsonValueCodec[Record] = JsonCodecMaker.make | ||
trait JsoniterReadingBenchmark{ | ||
@Benchmark | ||
def readRecordJsoniter = readFromString[Record](jsData) | ||
} | ||
|
||
trait JsoniterWritingBenchmark{ | ||
@Benchmark | ||
def writeRecordJsoniter = writeToString(record) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
package co.blocke | ||
|
||
import com.github.plokhotnyuk.jsoniter_scala.core._ | ||
import com.github.plokhotnyuk.jsoniter_scala.macros._ | ||
|
||
object RunMe extends App: | ||
|
||
import ZIOZ.* | ||
import zio.json._ | ||
import co.blocke.scalajack.* | ||
given codec: JsonValueCodec[Record] = JsonCodecMaker.make | ||
println(readFromString[Record](jsData)) | ||
|
||
val f = jsData.fromJson[Record] | ||
println(f) | ||
println(writeToString(record)) | ||
|
||
println("\n---------") | ||
println(ScalaJack.write(f)) | ||
|
||
println("ZIO Decoder (Address): "+DeriveJsonDecoder.gen[Address]) | ||
println("\nDone") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.