Benchmarks fail with "No enum constant ...ObjectType.zBQYA0GAwBAbAUGA"

10 views
Skip to first unread message

Jo Durchholz

unread,
Apr 11, 2024, 5:52:55 PM4/11/24
to kryo-...@googlegroups.com
Hi all,

Running things with Maven from the command line, so the Eclipse setup in
eclipse/ from the Github Repo does not work for me, I get
java.lang.IllegalArgumentException: No enum constant
com.esotericsoftware.kryo.benchmarks.FieldSerializerBenchmark.BenchmarkState.ObjectType.zBQYA0GAwBAbAUGA

The zBQYA0GAwBAbAUGA comes from a JMH parameter
(is says objectType = zBQYA0GAwBAbAUGA).

There's a single .class file for an ObjectType class,

benchmarks/target/classes/com/esotericsoftware/kryo/benchmarks/FieldSerializerBenchmark$BenchmarkState$ObjectType.class
but the enum contains no "zBQYA0GAwBAbAUGA", just "sample" and "media",
so this indeed cannot work.

What's wrong?

Regards,
Jo

P.S.: Here's the output from run.sh:

--
# JMH version: 1.21
# VM version: JDK 17.0.10, OpenJDK 64-Bit Server VM,
17.0.10+7-Debian-1deb12u1
# VM invoker: /usr/lib/jvm/java-17-openjdk-amd64/bin/java
# VM options: <none>
# Warmup: 5 iterations, 2 s each
# Measurement: 3 iterations, 2 s each
# Timeout: 10 min per iteration
# Threads: 2 threads, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark:
com.esotericsoftware.kryo.benchmarks.FieldSerializerBenchmark.compatible
# Parameters: (chunked = 0BgcAUHAlBA=====, objectType =
zBQYA0GAwBAbAUGA, references = 0BgcAUHAlBA=====)

# Run progress: 0,00% complete, ETA 00:29:52
# Fork: 1 of 4
# Warmup Iteration 1: <failure>

java.lang.IllegalArgumentException: No enum constant
com.esotericsoftware.kryo.benchmarks.FieldSerializerBenchmark.BenchmarkState.ObjectType.zBQYA0GAwBAbAUGA
at java.base/java.lang.Enum.valueOf(Enum.java:273)
at
com.esotericsoftware.kryo.benchmarks.FieldSerializerBenchmark$BenchmarkState$ObjectType.valueOf(FieldSerializerBenchmark.java:122)
at
com.esotericsoftware.kryo.benchmarks.jmh_generated.FieldSerializerBenchmark_compatible_jmhTest._jmh_tryInit_f_compatiblestate1_1(FieldSerializerBenchmark_compatible_jmhTest.java:355)
at
com.esotericsoftware.kryo.benchmarks.jmh_generated.FieldSerializerBenchmark_compatible_jmhTest.compatible_Throughput(FieldSerializerBenchmark_compatible_jmhTest.java:73)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at
org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
at
org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
--

The part from "# Run progress" repeats, a lot.

Thomas Heigl

unread,
Apr 13, 2024, 10:13:20 AM4/13/24
to kryo-...@googlegroups.com
Hi Jo,

I've always run the benchmarks using IntelliJ by starting the main class in KryoBenchmarks.

The bundled jars in the lib folder are probably out of date.

Can you please create an issue on Github?

Best,

Thomas

--
You received this message because you are subscribed to the "kryo-users" group.
http://groups.google.com/group/kryo-users
---
You received this message because you are subscribed to the Google Groups "kryo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kryo-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kryo-users/b061b0df-a786-4669-904d-24dccd3cd7b6%40durchholz.org.

j...@durchholz.org

unread,
Apr 13, 2024, 12:31:04 PM4/13/24
to kryo-...@googlegroups.com
On 13.04.24 16:13, Thomas Heigl wrote:
> Hi Jo,
>
> I've always run the benchmarks using IntelliJ by starting the main class
> in KryoBenchmarks.

I guess I should try that, too.

> The bundled jars in the lib folder are probably out of date.

Oh. Somebody please remove them then :-)

I was surprised to find bundled libs, anyway.

I was going to suggest removing manual instructions since just using
Maven is fine, but then I recalled that some corporate environments
block Maven downloads but allow browser downloads.
So manual instructions are probably needed, just don't include the
libraries but tell users where to download the stuff. The instructions
could be created from a `mvn dependency` output, possibly as a shell script.

> Can you please create an issue on Github?

Done:
https://github.com/EsotericSoftware/kryo/issues/1065

I didn't add the zBQYA0GAwBAbAUGA observation, as it might be a
follow-up error from the classpath problem.

Regards,
Jo

j...@durchholz.org

unread,
Apr 13, 2024, 5:40:28 PM4/13/24
to kryo-...@googlegroups.com
Hi Thomas,

On 13.04.24 16:13, Thomas Heigl wrote:
> I've always run the benchmarks using IntelliJ by starting the main class
> in KryoBenchmarks.

This worked.
I had to change Settings though:
Build, Execution, Deployment
-> Compiler
-> Java Compiler
-> Use --release option for cross-compilation (Java 9 or later)
needs to be OFF, otherwise IntelliJ will believe that the sun.misc
package does not exist.
Maybe my Java setup plays a role, I had set the JDK to Temurin 11.
It's a bit weird, I'm seeing JDK 11 and JDK 17 directories so I was
expecting module system issues have been dealt with, but ah well.

It's a bit unfortunate since this setting affects all projects on my
disk, but since my plans for hacking on Kryo are limited, I guess I'll
stick with that unless somebody has a better idea.
Haven't tried JDK 8 yet. Maybe I can switch the setting back.
It would have been nice to benchmark with more than one JDK though.

Regards,
Jo
Reply all
Reply to author
Forward
0 new messages