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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad8f7a1d3b3d90506c58b5cdb6213f3e22ee75262c252e8c892eef64825763c
4
- data.tar.gz: d64864ea00952fc76f2f3660a79540d9002d4c2dd29dff7125b7898fa44c8d36
3
+ metadata.gz: 34e3680b6c074422ada05cead6d63000d6a28d7841d4a67ac5186550dfbcd97a
4
+ data.tar.gz: 7f0bc86a25bb67f8e8afaf786ee949715fbe4b0183752290361763360f5a4d5b
5
5
  SHA512:
6
- metadata.gz: 69d274bd2e7fb007c8f6580d4e99a3a40911ce1a14f3190bbdff4ff98799a6d53fefa76025b789b943373b994f3b651ba60a06b3070e05aa75aeb38c533977c0
7
- data.tar.gz: 6e0b68f4d94018ef85dcf0af751b6f621c1a96d869fd64520ee4b4f01ec5d994cd1922f338a56447871630ae21c9be1f7b5eaca8c5f6f0cf13b3d09ecc600fee
6
+ metadata.gz: 974bdc6430f6cebacf2460055049db3e2b04752546b52740427fae0078a3d643b73e3c953d795077d4b8cd0569dd4a7ba6604126529cd114fa0ac0b5c85ba25f
7
+ data.tar.gz: 1f93d5d84e7334b2b590c895280db2355aeb17586bde4bbc63173265853eb1fbbb4ba085071d0350216e5a7e6ee827bb94b6795b60fdb0e0e09afae8d51f1852
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meeseeks (0.1.7)
4
+ meeseeks (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -5,8 +5,7 @@
5
5
 
6
6
  # Meeseeks
7
7
 
8
- ⚠️ Do not use in production ⚠️
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
 
@@ -64,7 +64,8 @@ module Meeseeks
64
64
  batch = batch_from_queue
65
65
 
66
66
  begin
67
- submit(batch)
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', @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 + 1)]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meeseeks
4
- VERSION = '0.1.7'
4
+ VERSION = '0.2.0'
5
5
  end
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.1.7
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-15 00:00:00.000000000 Z
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.6
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