diff options
author | Eugene Platonov <jozic@live.com> | 2015-12-01 13:26:50 -0500 |
---|---|---|
committer | Eugene Platonov <jozic@live.com> | 2015-12-01 14:15:06 -0500 |
commit | 4a918ce6570129d3d4fd2d3e98d43f8078bb2d99 (patch) | |
tree | 9885a814379a7cc918607c7aa75ab8f8a3f8e6c5 /kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala | |
parent | db5d0293dac1715bf585af42c0b86e668eba6803 (diff) | |
download | Kamon-4a918ce6570129d3d4fd2d3e98d43f8078bb2d99.tar.gz Kamon-4a918ce6570129d3d4fd2d3e98d43f8078bb2d99.tar.bz2 Kamon-4a918ce6570129d3d4fd2d3e98d43f8078bb2d99.zip |
+ core: provide generic way to scale time and memory metrics
Diffstat (limited to 'kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala')
-rw-r--r-- | kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala b/kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala index 094baf4c..850200d4 100644 --- a/kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala +++ b/kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala @@ -56,6 +56,15 @@ class CounterSpec extends WordSpec with Matchers { counterBSnapshot.merge(counterASnapshot, collectionContext).count should be(300) } + "produce a snapshot that can be scaled" in new CounterFixture { + counter.increment(100) + + val counterSnapshot = takeSnapshotFrom(counter) + + val scaledSnapshot = counterSnapshot.scale(Time.Milliseconds, Time.Microseconds) + scaledSnapshot.count should be(100000) + } + } trait CounterFixture { |