Released ScalaMeter 0.17 for Scala 2.11, 2.12 and 2.13
ScalaMeter 0.17 for Scala 2.11, 2.12 and 2.13 has just been released!
New features include:
- Fabulous new JLine-based output formatter for nicer output and progress reporting.
- The
@disabled
annotation used to quickly disable specific benchmarks. ForkedStableTime
andForkedPreciseTime
benchmark templates.- Various small improvements.
Released ScalaMeter 0.7 for Scala 2.10 and 2.11
ScalaMeter 0.7 for Scala 2.10 and Scala 2.11 has just been released!
This ScalaMeter release is due to a hugely successful Google Summer of Code 2015 project – the star of the release is Krzysztof Janosz, whose valiant efforts brought ScalaMeter to a new level.
Also, thanks to all the committers and people who contributed in any way, including submitting valuable feedback. We were able to follow up on some of the suggestions in the 0.7 release, and we plan to continue to do so in the future. Still, we invite you to help by contributing patches, bugfixes, new features, and extensions!
New Features
- Standalone SBT examples projects.
- Backwards-compatible JSON-based persistors:
JSONSerializationPersistor
andGZIPJSONSerializationPersistor
. - Add
Measurer.BoxingCount
that can measure (auto)boxing of Scala primitives. - Add
Measurer.MethodInvocationCount
that can count invocation of arbitrary methods. - Add
JBench
and entire new annotation-based Java API. - Add
include(new BenchTrait {})
statement used to include benchmark templates that are themselves not standalone tests, but can be used only withinclude
. These newinclude
statements can only be invoked fromBench.Group
benchmark type. See example here. For rationale, see mailing list discussion.
Changes
- Make
GZIPJSONSerializationPersistor
default for regression testing. - Rename
PerformanceTest
toBench
. - The
Bench
class (formerlyPerformanceTest
) now takes a type parameter that describes the type of the results it produces. For most benchmark types, this is justDouble
, but some benchmark types measure running time profiles or method invocation counts and have different results. TheReporter
andMeasurer
must have the same type as the benchmark itself. - Change default directory for the benchmark results to
target/benchmarks
.
Deprecated
- Move and mark as deprecated
JavaPerformanceTest
and its components toorg.scalameter.deprecatedjapi
. - Add compatibility type alias
PerformanceTest
fororg.scalameter.Bench
in api package. - Deprecate
include[BenchClass]
statement in favor ofinclude(new BenchTrait {})
(theBenchTrait
is a normal benchmark, but must be implemented in a Scala trait).
Fixed
- Fix lack of default
reportDir
when running benchmarks usingmain
method. - Improve release process.
You can add ScalaMeter 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.7</version>
</dependency>
Or, for Scala 2.11 projects:
<dependency>
<groupId>com.storm-enroute</groupId>
<artifactId>scalameter_2.11</artifactId>
<version>0.7</version>
</dependency>
Or, in SBT, just:
resolvers += "Sonatype OSS Snapshots" at
"https://oss.sonatype.org/content/repositories/releases"
libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.7"
To only use the inline benchmarking features, use the scalameter-core
module:
libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.7"
Released ScalaMeter 0.6 for Scala 2.10 and 2.11
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"
Released ScalaMeter 0.5-M2 for Scala 2.10 and 2.11
ScalaMeter 0.5-M2 for Scala 2.10 and Scala 2.11 has just been released!
New features and fixes:
-
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.
You can add it as an SBT dependency at Sonatype OSS for Scala 2.10 projects:
<dependency>
<groupId>com.github.axel22</groupId>
<artifactId>scalameter_2.10</artifactId>
<version>0.5-M2</version>
</dependency>
Or, for Scala 2.11 projects:
<dependency>
<groupId>com.github.axel22</groupId>
<artifactId>scalameter_2.11</artifactId>
<version>0.5-M2</version>
</dependency>
Or, in SBT, just:
resolvers += "Sonatype OSS Snapshots" at
"https://oss.sonatype.org/content/repositories/snapshots"
libraryDependencies += "com.github.axel22" %% "scalameter" % "0.5-M2"
Skills Matter Podcast
ScalaMeter was presented on Scala eXchange 2012 – to learn more about why do we do performance testing, why is it hard and how ScalaMeter can help, you can see the podcast on the Skills Matter website.
Released ScalaMeter 0.2 for Scala 2.10.0-RC2
ScalaMeter 0.2 for Scala 2.10.0-RC2 has just been released!
You can add it as an SBT dependency at Sonatype OSS.
<dependency>
<groupId>com.github.axel22</groupId>
<artifactId>scalameter_2.10</artifactId>
<version>0.2</version>
</dependency>
Or, in SBT:
resolvers += "Sonatype OSS Snapshots" at
"https://oss.sonatype.org/content/repositories/snapshots"
libraryDependencies += "com.github.axel22" %% "scalameter" % "0.2"