meeseeks 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -3
- data/lib/meeseeks/harvester.rb +6 -5
- data/lib/meeseeks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e3680b6c074422ada05cead6d63000d6a28d7841d4a67ac5186550dfbcd97a
|
4
|
+
data.tar.gz: 7f0bc86a25bb67f8e8afaf786ee949715fbe4b0183752290361763360f5a4d5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 974bdc6430f6cebacf2460055049db3e2b04752546b52740427fae0078a3d643b73e3c953d795077d4b8cd0569dd4a7ba6604126529cd114fa0ac0b5c85ba25f
|
7
|
+
data.tar.gz: 1f93d5d84e7334b2b590c895280db2355aeb17586bde4bbc63173265853eb1fbbb4ba085071d0350216e5a7e6ee827bb94b6795b60fdb0e0e09afae8d51f1852
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
|
6
6
|
# Meeseeks
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
Submit measurements asynchronously from your ruby applications to a Circonus HTTPTrap.
|
10
9
|
|
11
10
|
## Usage
|
12
11
|
|
@@ -58,7 +57,7 @@ batch submitted to Circonus, so for `max_batch_size: 100` we will really submit
|
|
58
57
|
|
59
58
|
- ``meeseeks`batch_size`` (how many measurements were submitted per request to Circonus?)
|
60
59
|
- ``meeseeks`cycle_count`` (how many intervals did this meeseeks instance do?)
|
61
|
-
- ``meeseeks`queue_size`` (how many measurements are waiting in the queue to be submitted
|
60
|
+
- ``meeseeks`queue_size`` (how many measurements are waiting in the queue to be submitted)
|
62
61
|
- ``meeseeks`submit_count`` (how many requests to Circonus did this meeseeks instance do?)
|
63
62
|
|
64
63
|
|
@@ -90,6 +89,8 @@ We tried to make Meeseeks inspectable:
|
|
90
89
|
|
91
90
|
```
|
92
91
|
|
92
|
+
If you want to stop Meeseeks, you can call `my_meeseeks.implode!`.
|
93
|
+
|
93
94
|
|
94
95
|
## Development
|
95
96
|
|
data/lib/meeseeks/harvester.rb
CHANGED
@@ -64,7 +64,8 @@ module Meeseeks
|
|
64
64
|
batch = batch_from_queue
|
65
65
|
|
66
66
|
begin
|
67
|
-
|
67
|
+
queue_size = @queue.size
|
68
|
+
submit(batch, queue_size)
|
68
69
|
rescue StandardError
|
69
70
|
# TODO: think about whether or not this is a good idea. It's nice to
|
70
71
|
# recover from the occasional HTTP hickup, but when we can't submit
|
@@ -93,10 +94,10 @@ module Meeseeks
|
|
93
94
|
batch
|
94
95
|
end
|
95
96
|
|
96
|
-
def meeseeks_stats_payload(batch_size)
|
97
|
+
def meeseeks_stats_payload(batch_size, queue_size)
|
97
98
|
{ meeseeks: {} }.tap do |stats|
|
98
99
|
stats[:meeseeks].merge!(Payload.for('batch_size', batch_size))
|
99
|
-
stats[:meeseeks].merge!(Payload.for('queue_size',
|
100
|
+
stats[:meeseeks].merge!(Payload.for('queue_size', queue_size))
|
100
101
|
stats[:meeseeks].merge!(Payload.for('submit_count', submit_count))
|
101
102
|
stats[:meeseeks].merge!(Payload.for('cycle_count', @cycle_count))
|
102
103
|
end
|
@@ -106,8 +107,8 @@ module Meeseeks
|
|
106
107
|
@http_trap.submit_count
|
107
108
|
end
|
108
109
|
|
109
|
-
def submit(measurements)
|
110
|
-
stats = [meeseeks_stats_payload(measurements.length
|
110
|
+
def submit(measurements, queue_size)
|
111
|
+
stats = [meeseeks_stats_payload(measurements.length, queue_size)]
|
111
112
|
@http_trap.submit(measurements + stats)
|
112
113
|
end
|
113
114
|
end
|
data/lib/meeseeks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meeseeks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jannis Hermanns
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
189
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.7.
|
190
|
+
rubygems_version: 2.7.7
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Submits measurements to a circonus http trap
|