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 | da316898d4fd99407b250ac9abb4de1de3b88dc2 (patch) | |
tree | c87d8fddb56deac1d106777daf8d824fefbf9406 /kamon-core/src/test/scala/kamon/metric/instrument/CounterSpec.scala | |
parent | 4eb8acb1983618378cddf42d6ddf0fb09a69563c (diff) | |
download | Kamon-da316898d4fd99407b250ac9abb4de1de3b88dc2.tar.gz Kamon-da316898d4fd99407b250ac9abb4de1de3b88dc2.tar.bz2 Kamon-da316898d4fd99407b250ac9abb4de1de3b88dc2.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 { |