drone 1.0.2 → 1.0.4

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.
@@ -0,0 +1,46 @@
1
+ require File.expand_path('../../common', __FILE__)
2
+
3
+ require 'drone/utils/uniform_sample'
4
+ include Drone
5
+
6
+ describe 'EWMA' do
7
+ describe "A sample of 100 out of 1000 elements" do
8
+ before do
9
+ Drone::init_drone()
10
+
11
+ @population = (0...1000)
12
+ @sample = UniformSample.new('id1', 100)
13
+ @population.step(1){|n| @sample.update(n) }
14
+ end
15
+
16
+ should "have 100 elements" do
17
+ @sample.size.should == 100
18
+ @sample.values.size.should == 100
19
+ end
20
+
21
+ should "only have elements from the population" do
22
+ arr = @sample.values - @population.to_a
23
+ arr.should == []
24
+ end
25
+ end
26
+
27
+ describe "A sample of 100 out of 10 elements" do
28
+ before do
29
+ @population = (0...10)
30
+ @sample = UniformSample.new('id1', 100)
31
+ @population.step(1){|n| @sample.update(n) }
32
+ end
33
+
34
+ should "have 10 elements" do
35
+ @sample.size.should == 10
36
+ @sample.values.size.should == 10
37
+ end
38
+
39
+ should "only have elements from the population" do
40
+ arr = @sample.values - @population.to_a
41
+ arr.should == []
42
+ end
43
+ end
44
+
45
+ end
46
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: drone
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.2
5
+ version: 1.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Julien Ammous
@@ -87,8 +87,46 @@ extensions: []
87
87
 
88
88
  extra_rdoc_files: []
89
89
 
90
- files: []
91
-
90
+ files:
91
+ - .gitignore
92
+ - .rvmrc
93
+ - .yardopts
94
+ - Gemfile
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - drone.gemspec
99
+ - examples/simple.rb
100
+ - lib/drone.rb
101
+ - lib/drone/core.rb
102
+ - lib/drone/interfaces/base.rb
103
+ - lib/drone/interfaces/console.rb
104
+ - lib/drone/metrics/counter.rb
105
+ - lib/drone/metrics/gauge.rb
106
+ - lib/drone/metrics/histogram.rb
107
+ - lib/drone/metrics/meter.rb
108
+ - lib/drone/metrics/metric.rb
109
+ - lib/drone/metrics/timer.rb
110
+ - lib/drone/monitoring.rb
111
+ - lib/drone/schedulers/eventmachine.rb
112
+ - lib/drone/storage/base.rb
113
+ - lib/drone/storage/memory.rb
114
+ - lib/drone/utils/ewma.rb
115
+ - lib/drone/utils/exponentially_decaying_sample.rb
116
+ - lib/drone/utils/uniform_sample.rb
117
+ - lib/drone/version.rb
118
+ - specs/all.rb
119
+ - specs/common.rb
120
+ - specs/metrics/counter_spec.rb
121
+ - specs/metrics/gauge_spec.rb
122
+ - specs/metrics/meter_spec.rb
123
+ - specs/metrics/timer_spec.rb
124
+ - specs/schedulers/eventmachine_spec.rb
125
+ - specs/unit/ewma_spec.rb
126
+ - specs/unit/exponentially_decaying_sample_spec.rb
127
+ - specs/unit/histogram_spec.rb
128
+ - specs/unit/monitoring_spec.rb
129
+ - specs/unit/uniform_sample_spec.rb
92
130
  homepage: ""
93
131
  licenses: []
94
132
 
@@ -112,10 +150,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
150
  requirements: []
113
151
 
114
152
  rubyforge_project: drone
115
- rubygems_version: 1.7.2
153
+ rubygems_version: 1.8.1
116
154
  signing_key:
117
155
  specification_version: 3
118
156
  summary: Drone is a monitoring library
119
157
  test_files: []
120
158
 
121
- has_rdoc: