metriks 0.9.9 → 0.9.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +7 -4
- data/lib/metriks.rb +1 -1
- data/lib/metriks/exponentially_decaying_sample.rb +1 -0
- data/metriks.gemspec +2 -2
- data/test/histogram_test.rb +11 -0
- metadata +3 -2
data/README.md
CHANGED
@@ -348,13 +348,16 @@ An incomplete list of things I would like to see added:
|
|
348
348
|
|
349
349
|
# Credits
|
350
350
|
|
351
|
-
Most of the inspiration for this project comes from
|
352
|
-
|
353
|
-
[Metrics]
|
351
|
+
Most of the inspiration for this project comes from Coda Hale's amazing
|
352
|
+
[Metrics, Metrics Everywhere][metrics-talk] talk at CodeConf and his sweet
|
353
|
+
[Metrics][metrics] Java Library.
|
354
|
+
|
355
|
+
[metrics-talk]: http://pivotallabs.com/talks/139-metrics-metrics-everywhere
|
356
|
+
[metrics]: https://github.com/codahale/metrics
|
354
357
|
|
355
358
|
|
356
359
|
# License
|
357
360
|
|
358
361
|
Copyright (c) 2012 Eric Lindvall
|
359
362
|
|
360
|
-
Published under the MIT License, see LICENSE
|
363
|
+
Published under the MIT License, see LICENSE
|
data/lib/metriks.rb
CHANGED
data/metriks.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'metriks'
|
16
|
-
s.version = '0.9.9'
|
17
|
-
s.date = '2012-
|
16
|
+
s.version = '0.9.9.1'
|
17
|
+
s.date = '2012-07-02'
|
18
18
|
|
19
19
|
## Make sure your summary is short. The description may be as long
|
20
20
|
## as you like.
|
data/test/histogram_test.rb
CHANGED
@@ -185,4 +185,15 @@ class HistogramTest < Test::Unit::TestCase
|
|
185
185
|
|
186
186
|
assert_equal 49.5, snapshot.median
|
187
187
|
end
|
188
|
+
|
189
|
+
def test_long_idle_sample
|
190
|
+
Time.stubs(:now).returns(Time.at(2000))
|
191
|
+
sample = Metriks::ExponentiallyDecayingSample.new(Metriks::Histogram::DEFAULT_SAMPLE_SIZE, Metriks::Histogram::DEFAULT_ALPHA)
|
192
|
+
Time.unstub(:now)
|
193
|
+
@histogram = Metriks::Histogram.new(sample)
|
194
|
+
|
195
|
+
@histogram.update(5)
|
196
|
+
|
197
|
+
assert_equal 5, @histogram.min
|
198
|
+
end
|
188
199
|
end
|
metadata
CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 9
|
8
8
|
- 9
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.9.9.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Eric Lindvall
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2012-
|
18
|
+
date: 2012-07-02 00:00:00 -07:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|