All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.concurrent.OnceBenchmark.scala Maven / Gradle / Ivy

The newest version!
package com.twitter.concurrent

import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Array(Mode.SampleTime))
class OnceBenchmark {
  import OnceBenchmark._

  @Benchmark
  def timeApply(state: OnceState): Unit = {
    state.once()
  }
}

object OnceBenchmark {
  @State(Scope.Benchmark)
  class OnceState {
    val once = Once(())
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy