metriks 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Metriks
3
- VERSION = '0.9.4'
3
+ VERSION = '0.9.5'
4
4
 
5
5
  def self.get(name)
6
6
  Metriks::Registry.default.get(name)
@@ -40,6 +40,12 @@ module Metriks
40
40
  @mutex.synchronize do
41
41
  priority = weight(timestamp - @start_time) / rand
42
42
  new_count = @count.update { |v| v + 1 }
43
+
44
+ if priority.nan?
45
+ warn "ExponentiallyDecayingSample found priority of NaN. timestamp: #{timestamp.to_f} start_time: #{@start_time.to_f}"
46
+ return
47
+ end
48
+
43
49
  if new_count <= @reservoir_size
44
50
  @values[priority] = value
45
51
  else
@@ -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.4'
17
- s.date = '2012-03-12'
16
+ s.version = '0.9.5'
17
+ s.date = '2012-03-14'
18
18
 
19
19
  ## Make sure your summary is short. The description may be as long
20
20
  ## as you like.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 4
9
- version: 0.9.4
8
+ - 5
9
+ version: 0.9.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Lindvall
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-12 00:00:00 -07:00
17
+ date: 2012-03-14 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency