drone 1.0.1 → 1.0.2
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.
- metadata +3 -41
- data/.gitignore +0 -8
- data/.rvmrc +0 -1
- data/.yardopts +0 -1
- data/Gemfile +0 -4
- data/LICENSE +0 -20
- data/README.md +0 -162
- data/Rakefile +0 -20
- data/drone.gemspec +0 -29
- data/examples/simple.rb +0 -50
- data/lib/drone.rb +0 -23
- data/lib/drone/core.rb +0 -141
- data/lib/drone/interfaces/base.rb +0 -17
- data/lib/drone/interfaces/console.rb +0 -82
- data/lib/drone/metrics/counter.rb +0 -40
- data/lib/drone/metrics/gauge.rb +0 -25
- data/lib/drone/metrics/histogram.rb +0 -153
- data/lib/drone/metrics/meter.rb +0 -82
- data/lib/drone/metrics/metric.rb +0 -16
- data/lib/drone/metrics/timer.rb +0 -57
- data/lib/drone/monitoring.rb +0 -107
- data/lib/drone/schedulers/eventmachine.rb +0 -70
- data/lib/drone/storage/base.rb +0 -122
- data/lib/drone/storage/memory.rb +0 -58
- data/lib/drone/utils/ewma.rb +0 -55
- data/lib/drone/utils/exponentially_decaying_sample.rb +0 -81
- data/lib/drone/utils/uniform_sample.rb +0 -52
- data/lib/drone/version.rb +0 -3
- data/specs/all.rb +0 -11
- data/specs/common.rb +0 -63
- data/specs/metrics/counter_spec.rb +0 -43
- data/specs/metrics/gauge_spec.rb +0 -28
- data/specs/metrics/meter_spec.rb +0 -61
- data/specs/metrics/timer_spec.rb +0 -111
- data/specs/schedulers/eventmachine_spec.rb +0 -76
- data/specs/unit/ewma_spec.rb +0 -141
- data/specs/unit/exponentially_decaying_sample_spec.rb +0 -86
- data/specs/unit/histogram_spec.rb +0 -91
- data/specs/unit/monitoring_spec.rb +0 -129
- data/specs/unit/uniform_sample_spec.rb +0 -46
@@ -1,46 +0,0 @@
|
|
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
|
-
|