drone 1.0.7 → 1.0.8

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.
@@ -1,2 +1,3 @@
1
1
  rvm:
2
2
  - 1.9.2
3
+ - 1.9.3
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec
6
6
  group(:test) do
7
7
  gem 'rake'
8
8
  gem 'mocha'
9
- gem 'schmurfy-bacon', :path => '/Users/schmurfy/Dev/personal/bacon'
9
+ gem 'schmurfy-bacon'
10
10
  gem 'schmurfy-em-spec'
11
11
  gem 'delorean'
12
12
  gem 'simplecov'
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ [![Build Status](https://secure.travis-ci.org/schmurfy/drone.png)](https://secure.travis-ci.org/schmurfy/drone.png)
3
+
2
4
  # What is this ?
3
5
 
4
6
  Drone is a monitoring library designed to collect data from your application and export them
@@ -17,7 +19,6 @@ The example will output the collected statistics directly on the console every s
17
19
  # Supported Runtimes
18
20
 
19
21
  - MRI 1.9.2+
20
- - Rubinius 1.2.2+
21
22
 
22
23
 
23
24
  # Status
@@ -20,6 +20,4 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_dependency("eventmachine", ">= 0.12.10")
23
- s.add_dependency("flt", "~> 1.3.0")
24
-
25
23
  end
@@ -68,7 +68,7 @@ module Drone
68
68
  data.add_value(:gauge, m.five_minutes_rate )
69
69
  data.add_value(:gauge, m.fifteen_minutes_rate )
70
70
 
71
- when Metrics::Timer
71
+ when Metrics::Timer, Metrics::Histogram
72
72
  # min:GAUGE:0:U, max:GAUGE:0:U, mean:GAUGE:0:U, stddev:GAUGE:U:U, median:GAUGE:0:U, p75:GAUGE:0:U, p95:GAUGE:0:U
73
73
  data.add_value(:gauge, m.min )
74
74
  data.add_value(:gauge, m.max )
@@ -1,4 +1,7 @@
1
- require 'flt'
1
+ require 'bigdecimal'
2
+ require 'bigdecimal/util'
3
+ require 'bigdecimal/math'
4
+
2
5
  require File.expand_path('../../core', __FILE__)
3
6
 
4
7
  module Drone
@@ -84,8 +87,10 @@ module Drone
84
87
  old_start = @start_time.get_and_set( new_start )
85
88
  time_diff = new_start - old_start
86
89
 
90
+ coeff = math_exp(-@alpha * time_diff)
91
+
87
92
  @values = Hash[ @values.map{ |k,v|
88
- [k * math_exp(-@alpha * time_diff), v]
93
+ [k * coeff, v]
89
94
  }]
90
95
 
91
96
  end
@@ -99,7 +104,7 @@ module Drone
99
104
 
100
105
  def math_exp(n)
101
106
  if use_flt?
102
- Flt::DecNum(Rational(n)).exp()
107
+ BigMath.exp( BigDecimal(n.to_s), 2 )
103
108
  else
104
109
  Math.exp(n)
105
110
  end
@@ -118,7 +123,7 @@ module Drone
118
123
  end while r == 0.0
119
124
 
120
125
  if use_flt?
121
- Flt::DecNum(Rational(r))
126
+ BigDecimal(r.to_s)
122
127
  else
123
128
  r
124
129
  end
@@ -1,3 +1,3 @@
1
1
  module Drone
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -46,7 +46,7 @@ describe 'Exponentially Decaying Sample' do
46
46
  arr.should == []
47
47
  end
48
48
 
49
- should "rescale after 1 hour2" do
49
+ should "rescale after 1 hour" do
50
50
  Delorean.time_travel_to("1 hours from now") do
51
51
  @sample.update(42)
52
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-07 00:00:00.000000000Z
12
+ date: 2011-11-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
16
- requirement: &70269671302320 !ruby/object:Gem::Requirement
16
+ requirement: &70146450283220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,18 +21,7 @@ dependencies:
21
21
  version: 0.12.10
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70269671302320
25
- - !ruby/object:Gem::Dependency
26
- name: flt
27
- requirement: &70269671301560 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: 1.3.0
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *70269671301560
24
+ version_requirements: *70146450283220
36
25
  description: Drone is a monitoring library based on the metrics java library
37
26
  email: []
38
27
  executables: []
@@ -119,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
108
  version: '0'
120
109
  segments:
121
110
  - 0
122
- hash: 2108349899805565141
111
+ hash: 4258299428496766530
123
112
  required_rubygems_version: !ruby/object:Gem::Requirement
124
113
  none: false
125
114
  requirements:
@@ -128,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
117
  version: '0'
129
118
  segments:
130
119
  - 0
131
- hash: 2108349899805565141
120
+ hash: 4258299428496766530
132
121
  requirements: []
133
122
  rubyforge_project: drone
134
123
  rubygems_version: 1.8.11