Skip to content

Commit c43a01e

Browse files
committed
Uncomment a couple of json4s benchmarks
1 parent fa51a47 commit c43a01e

File tree

6 files changed

+19
-32
lines changed

6 files changed

+19
-32
lines changed

jsoniter-scala-benchmark/jvm/src/test/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/GeoJSONReadingSpec.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ class GeoJSONReadingSpec extends BenchmarkSpecBase {
1313
benchmark.circe() shouldBe benchmark.obj
1414
benchmark.circeJsoniter() shouldBe benchmark.obj
1515
benchmark.jacksonScala() shouldBe benchmark.obj
16-
// FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
17-
// benchmark.json4sJackson() shouldBe benchmark.obj
18-
// FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
19-
// benchmark.json4sNative() shouldBe benchmark.obj
16+
benchmark.json4sJackson() shouldBe benchmark.obj
17+
benchmark.json4sNative() shouldBe benchmark.obj
2018
benchmark.jsoniterScala() shouldBe benchmark.obj
2119
benchmark.playJson() shouldBe benchmark.obj
2220
benchmark.playJsonJsoniter() shouldBe benchmark.obj
@@ -35,10 +33,8 @@ class GeoJSONReadingSpec extends BenchmarkSpecBase {
3533
intercept[Throwable](b.circe())
3634
intercept[Throwable](b.circeJsoniter())
3735
intercept[Throwable](b.jacksonScala())
38-
// FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
39-
// intercept[Throwable](b.json4sJackson())
40-
// FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
41-
// intercept[Throwable](b.json4sNative())
36+
intercept[Throwable](b.json4sJackson())
37+
intercept[Throwable](b.json4sNative())
4238
intercept[Throwable](b.jsoniterScala())
4339
intercept[Throwable](b.playJson())
4440
intercept[Throwable](b.playJsonJsoniter())

jsoniter-scala-benchmark/jvm/src/test/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/GeoJSONWritingSpec.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ class GeoJSONWritingSpec extends BenchmarkSpecBase {
1212
toString(b.circe()) shouldBe b.jsonString1
1313
toString(b.circeJsoniter()) shouldBe b.jsonString1
1414
toString(b.jacksonScala()) shouldBe b.jsonString1
15-
// FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
16-
//toString(b.json4sJackson()) shouldBe b.jsonString1
17-
// FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
18-
//toString(b.json4sNative()) shouldBe b.jsonString1
15+
toString(b.json4sJackson()) shouldBe b.jsonString1
16+
toString(b.json4sNative()) shouldBe b.jsonString1
1917
toString(b.jsoniterScala()) shouldBe b.jsonString1
2018
toString(b.preallocatedBuf, 64, b.jsoniterScalaPrealloc()) shouldBe b.jsonString1
2119
toString(b.playJson()) shouldBe b.jsonString1

jsoniter-scala-benchmark/jvm/src/test/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/TwitterAPIReadingSpec.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ class TwitterAPIReadingSpec extends BenchmarkSpecBase {
1313
benchmark.circe() shouldBe benchmark.obj
1414
benchmark.circeJsoniter() shouldBe benchmark.obj
1515
benchmark.jacksonScala() shouldBe benchmark.obj
16-
// FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
17-
// benchmark.json4sJackson() shouldBe benchmark.obj
18-
// FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
19-
// benchmark.json4sNative() shouldBe benchmark.obj
16+
benchmark.json4sJackson() shouldBe benchmark.obj
17+
benchmark.json4sNative() shouldBe benchmark.obj
2018
benchmark.jsoniterScala() shouldBe benchmark.obj
2119
benchmark.playJson() shouldBe benchmark.obj
2220
benchmark.playJsonJsoniter() shouldBe benchmark.obj
@@ -34,10 +32,8 @@ class TwitterAPIReadingSpec extends BenchmarkSpecBase {
3432
intercept[Throwable](b.circe())
3533
intercept[Throwable](b.circeJsoniter())
3634
intercept[Throwable](b.jacksonScala())
37-
// FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
38-
// intercept[Throwable](b.json4sJackson())
39-
// FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
40-
// intercept[Throwable](b.json4sNative())
35+
intercept[Throwable](b.json4sJackson())
36+
intercept[Throwable](b.json4sNative())
4137
intercept[Throwable](b.jsoniterScala())
4238
intercept[Throwable](b.playJson())
4339
intercept[Throwable](b.playJsonJsoniter())

jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/GeoJSONReading.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class GeoJSONReading extends GeoJSONBenchmark {
3434
import com.github.plokhotnyuk.jsoniter_scala.benchmark.JacksonSerDesers._
3535
jacksonMapper.readValue[GeoJSON](jsonBytes)
3636
}
37-
/* FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
37+
3838
@Benchmark
3939
@annotation.nowarn
4040
def json4sJackson(): GeoJSON = {
@@ -44,8 +44,7 @@ class GeoJSONReading extends GeoJSONBenchmark {
4444

4545
mapper.readValue[JValue](jsonBytes, jValueType).extract[GeoJSON]
4646
}
47-
*/
48-
/* FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
47+
4948
@Benchmark
5049
@annotation.nowarn
5150
def json4sNative(): GeoJSON = {
@@ -56,7 +55,7 @@ class GeoJSONReading extends GeoJSONBenchmark {
5655

5756
parse(new String(jsonBytes, UTF_8)).extract[GeoJSON]
5857
}
59-
*/
58+
6059
@Benchmark
6160
def jsoniterScala(): GeoJSON = {
6261
import com.github.plokhotnyuk.jsoniter_scala.benchmark.JsoniterScalaCodecs._

jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/GeoJSONWriting.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class GeoJSONWriting extends GeoJSONBenchmark {
3535

3636
jacksonMapper.writeValueAsBytes(obj)
3737
}
38-
/* FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
38+
3939
@Benchmark
4040
def json4sJackson(): Array[Byte] = {
4141
import com.github.plokhotnyuk.jsoniter_scala.benchmark.GeoJsonJson4sFormats._
@@ -44,8 +44,7 @@ class GeoJSONWriting extends GeoJSONBenchmark {
4444

4545
mapper.writeValueAsBytes(Extraction.decompose(obj))
4646
}
47-
*/
48-
/* FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
47+
4948
@Benchmark
5049
def json4sNative(): Array[Byte] = {
5150
import com.github.plokhotnyuk.jsoniter_scala.benchmark.GeoJsonJson4sFormats._
@@ -54,7 +53,7 @@ class GeoJSONWriting extends GeoJSONBenchmark {
5453

5554
write(obj).getBytes(UTF_8)
5655
}
57-
*/
56+
5857
@Benchmark
5958
def jsoniterScala(): Array[Byte] = {
6059
import com.github.plokhotnyuk.jsoniter_scala.benchmark.JsoniterScalaCodecs._

jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/TwitterAPIReading.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TwitterAPIReading extends TwitterAPIBenchmark {
3535

3636
jacksonMapper.readValue[Seq[Tweet]](jsonBytes)
3737
}
38-
/* FIXME: json4s.jackson throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
38+
3939
@Benchmark
4040
@annotation.nowarn
4141
def json4sJackson(): Seq[Tweet] = {
@@ -45,8 +45,7 @@ class TwitterAPIReading extends TwitterAPIBenchmark {
4545

4646
mapper.readValue[JValue](jsonBytes, jValueType).extract[Seq[Tweet]]
4747
}
48-
*/
49-
/* FIXME: json4s.native throws java.lang.NoClassDefFoundError: scala/quoted/staging/package$
48+
5049
@Benchmark
5150
@annotation.nowarn
5251
def json4sNative(): Seq[Tweet] = {
@@ -57,7 +56,7 @@ class TwitterAPIReading extends TwitterAPIBenchmark {
5756

5857
parse(new String(jsonBytes, UTF_8)).extract[Seq[Tweet]]
5958
}
60-
*/
59+
6160
@Benchmark
6261
def jsoniterScala(): Seq[Tweet] = {
6362
import com.github.plokhotnyuk.jsoniter_scala.benchmark.JsoniterScalaCodecs._

0 commit comments

Comments
 (0)