I'm working on writing some benchmarks in Okio for...
# squarelibraries
k
I'm working on writing some benchmarks in Okio for a PR. Any idea why
./gradlew jmh
is only running writeHex benchmarks? This is my first time dipping my toes in JMH so any help is appreciated 😬
Commenting out the writeHex benchmark results in the following error.
Copy code
> Task :okio:jvm:jmh:jmh FAILED
Caching disabled for task ':okio:jvm:jmh:jmh' because:
  Build cache is disabled
Task ':okio:jvm:jmh:jmh' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
:okio:jvm:jmh:jmh (Thread[Execution worker for ':',5,main]) completed. Took 0.53 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':okio:jvm:jmh:jmh'.
> A failure occurred while executing me.champeau.gradle.IsolatedRunner
   > Error during execution of benchmarks
After some research, looks like this is the culprit
Copy code
jmh {
  jvmArgs = ['-Djmh.separateClasspathJAR=true']
  include = ['com\\.squareup\\.okio\\.benchmarks\\.WriteHexadecimalBenchmark.*']
  duplicateClassesStrategy = 'warn'
}
yup, changing it did the job.