resque-metrics 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/resque/metrics/backends.rb +1 -0
- data/lib/resque/metrics/backends/null.rb +34 -0
- data/resque-metrics.gemspec +4 -3
- data/test/redis-test.conf +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa4f91dfc4b096ce96a07af6c1c611c41e26f6ac
|
4
|
+
data.tar.gz: 9e6e9a6b550e1811334cf7041ef8c2f9f8cee046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 686b568f6ba1de59caed4d44ffcaf88cdb74fb9dcfaa58329c134d3336e390171707a3fbd65bbc70f03d096b7cc1c847f05dbb22a018051f97eefa276edc0a0b
|
7
|
+
data.tar.gz: c689dae5c4f2b1e1a25fa78c849d9d8833fb71126576626234154376917e0b2c7a742cd3bbca266ca03da91ae64feffdf927a86756286c4142dc00aff4696c29
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Resque
|
2
|
+
module Metrics
|
3
|
+
module Backends
|
4
|
+
# Null backend is useful for testing and using Resque Metrics to just
|
5
|
+
# get the callback hooks
|
6
|
+
class Null
|
7
|
+
|
8
|
+
def increment_metric(metric, by = 1)
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
def set_metric(metric, val)
|
13
|
+
true
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_avg(metric, num, total)
|
17
|
+
true
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_metric(metric)
|
21
|
+
1
|
22
|
+
end
|
23
|
+
|
24
|
+
def register_job(job)
|
25
|
+
true
|
26
|
+
end
|
27
|
+
|
28
|
+
def known_jobs
|
29
|
+
[]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/resque-metrics.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: resque-metrics 0.1.
|
5
|
+
# stub: resque-metrics 0.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "resque-metrics"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Aaron Quint", "Josh Nichols", "Michael Smith", "Tomas Varaneckas"]
|
14
|
-
s.date = "2014-10-
|
14
|
+
s.date = "2014-10-26"
|
15
15
|
s.description = "A simple Resque plugin that times and saves some simple metrics for Resque jobs back into redis. Based on this system\nyou could build some simple auto-scaling mechanism based on the speed and ETA of queues. Also includes a hook/callback\nmechanism for recording/sending the metrics to your favorite tool (AKA statsd/graphite).\n"
|
16
16
|
s.email = "aaron@quirkey.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/resque-metrics.rb",
|
30
30
|
"lib/resque/metrics.rb",
|
31
31
|
"lib/resque/metrics/backends.rb",
|
32
|
+
"lib/resque/metrics/backends/null.rb",
|
32
33
|
"lib/resque/metrics/backends/redis.rb",
|
33
34
|
"lib/resque/metrics/backends/statsd.rb",
|
34
35
|
"lib/resque/metrics/server.rb",
|
data/test/redis-test.conf
CHANGED
@@ -112,7 +112,7 @@ databases 16
|
|
112
112
|
# Glue small output buffers together in order to send small replies in a
|
113
113
|
# single TCP packet. Uses a bit more CPU but most of the times it is a win
|
114
114
|
# in terms of number of queries per second. Use 'yes' if unsure.
|
115
|
-
glueoutputbuf yes
|
115
|
+
# glueoutputbuf yes
|
116
116
|
|
117
117
|
# Use object sharing. Can save a lot of memory if you have many common
|
118
118
|
# string in your dataset, but performs lookups against the shared objects
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Quint
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-10-
|
14
|
+
date: 2014-10-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: resque
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/resque-metrics.rb
|
105
105
|
- lib/resque/metrics.rb
|
106
106
|
- lib/resque/metrics/backends.rb
|
107
|
+
- lib/resque/metrics/backends/null.rb
|
107
108
|
- lib/resque/metrics/backends/redis.rb
|
108
109
|
- lib/resque/metrics/backends/statsd.rb
|
109
110
|
- lib/resque/metrics/server.rb
|