diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-04-24 13:54:40 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-04-24 13:54:40 +0200 |
commit | 4d828e1a3195e55365c865aa3a78af9668742643 (patch) | |
tree | 07fff2683933c96297a8ba577bbdc89888da16e1 /kamon-bench/src/main/scala/kamon/bench | |
parent | 469c11dc1ddb140f407a33f48033e533bf60611c (diff) | |
download | Kamon-4d828e1a3195e55365c865aa3a78af9668742643.tar.gz Kamon-4d828e1a3195e55365c865aa3a78af9668742643.tar.bz2 Kamon-4d828e1a3195e55365c865aa3a78af9668742643.zip |
Prepare for the major cleanup
Moved all the original files from src/main to src/legacy-main, same with test files. Also
removed the autoweave module, examples and bench as I'm planning to have them in separate
repositories.
Diffstat (limited to 'kamon-bench/src/main/scala/kamon/bench')
-rw-r--r-- | kamon-bench/src/main/scala/kamon/bench/instruments/KamonCounterBench.scala | 34 | ||||
-rw-r--r-- | kamon-bench/src/main/scala/kamon/bench/instruments/KamonMinMaxCounterBench.scala | 35 |
2 files changed, 0 insertions, 69 deletions
diff --git a/kamon-bench/src/main/scala/kamon/bench/instruments/KamonCounterBench.scala b/kamon-bench/src/main/scala/kamon/bench/instruments/KamonCounterBench.scala deleted file mode 100644 index 01162d53..00000000 --- a/kamon-bench/src/main/scala/kamon/bench/instruments/KamonCounterBench.scala +++ /dev/null @@ -1,34 +0,0 @@ -package kamon.bench.instruments - -import java.nio.LongBuffer -import java.util.concurrent.TimeUnit - -import kamon.metric.instrument.{CollectionContext, LongAdderCounter} -import org.openjdk.jmh.annotations._ - -@State(Scope.Group) -@BenchmarkMode(Array(Mode.AverageTime)) -@OutputTimeUnit(TimeUnit.NANOSECONDS) -@Fork(2) -@Warmup(iterations = 10) -@Measurement(iterations = 10) -class KamonCounterBench { - - val counter: LongAdderCounter = new LongAdderCounter - - val collectionContext = new CollectionContext { - val buffer: LongBuffer = LongBuffer.allocate(33792) - } - - @Benchmark - @Group("rw") - def increment(): Unit = { - counter.increment() - } - - @Benchmark - @Group("rw") - def get(): Long = { - counter.collect(collectionContext).count - } -} diff --git a/kamon-bench/src/main/scala/kamon/bench/instruments/KamonMinMaxCounterBench.scala b/kamon-bench/src/main/scala/kamon/bench/instruments/KamonMinMaxCounterBench.scala deleted file mode 100644 index 5b9de062..00000000 --- a/kamon-bench/src/main/scala/kamon/bench/instruments/KamonMinMaxCounterBench.scala +++ /dev/null @@ -1,35 +0,0 @@ -package kamon.bench.instruments - -import java.nio.LongBuffer -import java.util.concurrent.TimeUnit - -import kamon.metric.instrument.Histogram.DynamicRange -import kamon.metric.instrument.{CollectionContext, Histogram, PaddedMinMaxCounter} -import org.openjdk.jmh.annotations._ - -@State(Scope.Group) -@BenchmarkMode(Array(Mode.AverageTime)) -@OutputTimeUnit(TimeUnit.NANOSECONDS) -@Fork(2) -@Warmup(iterations = 10) -@Measurement(iterations = 10) -class KamonMinMaxCounterBench { - - val counter: PaddedMinMaxCounter = new PaddedMinMaxCounter(Histogram(DynamicRange(1L, 999999999L, 2))) - - val collectionContext = new CollectionContext { - val buffer: LongBuffer = LongBuffer.allocate(33792) - } - - @Benchmark - @Group("rw") - def increment(): Unit = { - counter.increment() - } - - @Benchmark - @Group("rw") - def get(): Long = { - counter.collect(collectionContext).min - } -} |