I’ve seen Caliper mentioned many times here, but how is anyone actually running it?
I tried the beta1 on Maven, but that plain doesn’t work. E.g. it doesn’t contain a @Benchmark
annotation, but instead has a Benchmark
class. I tried extending that, but it did nothing.
Then I checked out the latest source from their git repo and built it. But it throws ClassCastException
s at startup, because an ImmutableMap<String, String>
contains a Boolean
, specifically the property "trackAllocations"
.
This is using the most basic of code, with nothing else set.
So how are you guys using it?
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tried that and immediately ran into this:
Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList
at org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:97)
at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:104)
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:242)
at org.openjdk.jmh.runner.Runner.run(Runner.java:196)
Is that file supposed to be generated or supplied. I’m using Scala with the gradle build, so maybe it’s a problem there?
I can't tell what you tried--JMH generally takes a little fiddling, and I always write the test in Java (calling the Scala methods I want to test).
The reason to use it is because it's good, not because it's easy.