mill.contrib.jmh
package mill.contrib.jmh
Members list
Type members
Classlikes
trait JmhModule extends JavaModule
This module provides an easy way to integrate JMH benchmarking with Mill.
This module provides an easy way to integrate JMH benchmarking with Mill.
Example configuration:
//| mvnDeps: ["com.lihaoyi::mill-contrib-jmh:$MILL_VERSION"]
import mill._, scalalib._
import contrib.jmh.JmhModule
object foo extends ScalaModule with JmhModule {
def scalaVersion = "2.13.16"
def jmhCoreVersion = "1.35"
}
Here are some sample commands:
- mill foo.runJmh # Runs all detected jmh benchmarks
- mill foo.listJmhBenchmarks # List detected jmh benchmarks
- mill foo.runJmh -h # List available arguments to runJmh
- mill foo.runJmh regexp # Run all benchmarks matching
regexp
For Scala JMH samples see: https://github.com/sbt/sbt-jmh/tree/main/plugin/src/sbt-test/sbt-jmh/run/src/main/scala/org/openjdk/jmh/samples.
Attributes
- Source
- JmhModule.scala
- Supertypes
-
trait JavaModuletrait JavaModuleApitrait AssemblyModuletrait SemanticDbJavaModuletrait SemanticDbJavaModuleApitrait OfflineSupportModuletrait GenIdeaModuletrait GenIdeaModuleApitrait RunModuletrait RunModuleApitrait DefaultTaskModuletrait JavaModuleBasetrait BspModuletrait BspModuleApitrait WithJvmWorkerModuletrait JavaHomeModuletrait CoursierModuletrait Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all
In this article