Skip to content

Commit

Permalink
Add jmh
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszwawrzyk committed Aug 2, 2018
1 parent c7b5c80 commit 01fb475
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ scalaVersion := "2.12.5"
resolvers += Resolver.sonatypeRepo("snapshots")
resolvers += Resolver.sonatypeRepo("releases")

libraryDependencies += "net.lingala.zip4j" % "zip4j" % "1.3.2"
libraryDependencies ++= Seq(
"net.lingala.zip4j" % "zip4j" % "1.3.2",
"org.openjdk.jmh" % "jmh-core" % "1.21",
"org.openjdk.jmh" % "jmh-generator-annprocess" % "1.21"
)

enablePlugins(JmhPlugin)
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.4")
13 changes: 13 additions & 0 deletions src/main/scala/org/virtuslab/zipops/bench/Bench.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.virtuslab.zipops.bench

import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.infra.Blackhole

object Bench {

@Benchmark
def benchmark(hole: Blackhole): Unit = {
hole.consume(5 * 7)
}

}

0 comments on commit 01fb475

Please sign in to comment.