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 JavaModule
trait RunModule
trait RunModuleApi
trait BspModule
trait BspModuleApi
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all