librato-metrics 1.3.1 → 1.3.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.
- data.tar.gz.sig +0 -0
- data/.travis.yml +6 -2
- data/CHANGELOG.md +3 -0
- data/lib/librato/metrics/queue.rb +1 -0
- data/lib/librato/metrics/version.rb +1 -1
- data/spec/unit/metrics/queue/autosubmission_spec.rb +14 -5
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,11 +5,7 @@ module Librato
|
|
5
5
|
|
6
6
|
describe Queue do
|
7
7
|
|
8
|
-
let(:client) {
|
9
|
-
client = Client.new
|
10
|
-
client.persistence = :test
|
11
|
-
client
|
12
|
-
}
|
8
|
+
let(:client) { Client.new.tap{ |c| c.persistence = :test } }
|
13
9
|
|
14
10
|
context "with an autosubmit count" do
|
15
11
|
it "should submit when the max is reached" do
|
@@ -25,6 +21,19 @@ module Librato
|
|
25
21
|
vol_queue.add :bar => 2
|
26
22
|
vol_queue.persister.persisted.should be_nil # nothing sent
|
27
23
|
end
|
24
|
+
|
25
|
+
it 'should submit when merging' do
|
26
|
+
queue = Queue.new(:client => client, :autosubmit_count => 5)
|
27
|
+
(1..3).each {|i| queue.add "metric_#{i}" => 1 }
|
28
|
+
|
29
|
+
to_merge = Queue.new(:client => client)
|
30
|
+
(1..5).each {|i| to_merge.add "metric_#{i}" => 1 }
|
31
|
+
|
32
|
+
queue.merge!(to_merge)
|
33
|
+
|
34
|
+
queue.persister.persisted[:gauges].length.should == 8
|
35
|
+
queue.queued.should be_empty
|
36
|
+
end
|
28
37
|
end
|
29
38
|
|
30
39
|
context "with an autosubmit interval" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -251,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
251
|
version: '0'
|
252
252
|
segments:
|
253
253
|
- 0
|
254
|
-
hash: -
|
254
|
+
hash: -3482606803820656168
|
255
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
256
|
none: false
|
257
257
|
requirements:
|
metadata.gz.sig
CHANGED
Binary file
|