ScalaMeter 0.6 for Scala 2.10 and Scala 2.11 has just been released!

New features and fixes:

  • the core module introduces inline benchmarking to test performance or memory footprint in a running app – more information

      import org.scalameter._
      val time = measure {
        for (i <- 0 until 100000) yield i
      }
      println(s"Total time: $time")
    
  • you can now use the Context constructor to factor out any configurations that you use repeatedly:

      val opts = Context(
        exec.benchRuns -> 40
      )
    
      measure method "map" config(opts) in {
        // ...
      }
    

You can reuse the same opts in different configuration groups or using blocks.

  • typed keys for the config block - now you can’t specify an incorrect configuration value for a specific key – thanks, Alexey Romanov!
  • verbose mode is now on by default
  • new predefined test configurations
  • the Scala binding for the JFreeChart is now used – thanks, Christian Krause!
  • a lot of bug fixes and better error messages

Thanks to all the committers and people who contributed in any way.

Note: the organization name has changed, see below.

You can add it as an SBT dependency at Sonatype OSS for Scala 2.10 projects:

<dependency>
  <groupId>com.storm-enroute</groupId>
  <artifactId>scalameter_2.10</artifactId>
  <version>0.6</version>
</dependency>

Or, for Scala 2.11 projects:

<dependency>
  <groupId>com.storm-enroute</groupId>
  <artifactId>scalameter_2.11</artifactId>
  <version>0.6</version>
</dependency>

Or, in SBT, just:

resolvers += "Sonatype OSS Snapshots" at
  "https://oss.sonatype.org/content/repositories/releases"

libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.6"

To only use the inline benchmarking features, use the scalameter-core module:

libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.6"