resque-analytics 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +4 -0
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/lib/resque-analytics/server/views/analytics.erb +18 -9
- data/lib/resque-analytics/server.rb +6 -7
- data/resque-analytics.gemspec +3 -4
- metadata +2 -3
- data/resque-analytics-0.6.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17ae0b32a8358b7f91cbec473ec1ce6262eb42c9
|
4
|
+
data.tar.gz: 15252ab1873d1204e8c09d1fe01bd83623bd6a26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1abe2a07366bf72ea85e6f80726f4379f0305f65f0412eb0cdc668efc73fefaffb4d0efd1ff62d288f2b7bffc530eba48c0d3d7ca18b6e0ce363d4298c07e6d
|
7
|
+
data.tar.gz: 5bb4c49cf4b2560315eca59e70519e931858db7debc64e5b0eed3d7502cba13db08768829f2fc76984a6a66b68690ffc8c3e793c8225f8fadab00e10d5684b5f
|
data/Changelog
CHANGED
data/README.rdoc
CHANGED
@@ -46,6 +46,7 @@ On the Resque screens, you will find a new tab called "Analytics".
|
|
46
46
|
|
47
47
|
If you wish to stop collection wait time for certain classes, add the following to your resque.rb initializer:
|
48
48
|
Resque::Plugins::Analytics.ignore_classes = ['worker_class', ...]
|
49
|
+
|
49
50
|
where worker class represents a job class for which you do not want to collect wait time metrics.
|
50
51
|
|
51
52
|
== TODO
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
@@ -4,13 +4,22 @@
|
|
4
4
|
Various KPIs related to Resque jobs
|
5
5
|
</p>
|
6
6
|
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
<form action='analytics', method='get'>
|
8
|
+
<label>Select Job</label>
|
9
|
+
<select name="job">
|
10
|
+
<% measured_jobs.each do |job| %>
|
11
|
+
<% selected = job == @job ? 'selected="selected"' : '' %>
|
12
|
+
<option value="<%= job %>"<%= selected %>><%= job %></option>
|
13
|
+
<% end %>
|
14
|
+
</select>
|
15
|
+
<input type="submit" />
|
16
|
+
</form>
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
<h2><%= @job %></h2>
|
19
|
+
<% performed = chart_data(@data, Resque::Plugins::Analytics::PERFORMED) %>
|
20
|
+
<% failed = chart_data(@data, Resque::Plugins::Analytics::FAILED) %>
|
21
|
+
<%= chart_it("Number of jobs", [Resque::Plugins::Analytics::PERFORMED, Resque::Plugins::Analytics::FAILED], [performed, failed]) %>
|
22
|
+
|
23
|
+
<% run_time = chart_data(@data, Resque::Plugins::Analytics::TOTAL_TIME) %>
|
24
|
+
<% wait_time = chart_data(@data, Resque::Plugins::Analytics::WAIT_TIME) %>
|
25
|
+
<%= chart_it("Wait and Run times", [Resque::Plugins::Analytics::WAIT_TIME, Resque::Plugins::Analytics::TOTAL_TIME], [wait_time, run_time]) %>
|
@@ -29,8 +29,8 @@ module Resque
|
|
29
29
|
@legend_keys ||= (-90..0).map { |number| number.days.from_now.strftime("%y_%m_%d")}
|
30
30
|
end
|
31
31
|
|
32
|
-
def chart_data(data,
|
33
|
-
legend_keys.map { |key| @data[
|
32
|
+
def chart_data(data, kpi)
|
33
|
+
legend_keys.map { |key| @data[kpi][key].to_i || 0 }
|
34
34
|
end
|
35
35
|
|
36
36
|
def chart_it(title, legend, data)
|
@@ -52,11 +52,10 @@ module Resque
|
|
52
52
|
class << self
|
53
53
|
def registered(app)
|
54
54
|
app.get '/analytics' do
|
55
|
-
@
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
}
|
55
|
+
@job = params[:job] || measured_jobs.first
|
56
|
+
|
57
|
+
@data = {}
|
58
|
+
[PERFORMED, FAILED, TOTAL_TIME, WAIT_TIME].each { |kpi| @data[kpi] = counters_for(@job, kpi) }
|
60
59
|
erb(File.read(File.join(VIEW_PATH, 'analytics.erb')))
|
61
60
|
end
|
62
61
|
|
data/resque-analytics.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
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-analytics 0.6.
|
5
|
+
# stub: resque-analytics 0.6.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "resque-analytics"
|
9
|
-
s.version = "0.6.
|
9
|
+
s.version = "0.6.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Nir Tzur"]
|
13
|
-
s.date = "2014-06-
|
13
|
+
s.date = "2014-06-23"
|
14
14
|
s.description = "Shows Resque jobs key performance indciators over time"
|
15
15
|
s.email = "nir.tzur@samanage.com"
|
16
16
|
s.extra_rdoc_files = [
|
@@ -30,7 +30,6 @@ Gem::Specification.new do |s|
|
|
30
30
|
"lib/resque-analytics/server.rb",
|
31
31
|
"lib/resque-analytics/server/views/analytics.erb",
|
32
32
|
"lib/resque/plugins/analytics.rb",
|
33
|
-
"resque-analytics-0.6.1.gem",
|
34
33
|
"resque-analytics.gemspec"
|
35
34
|
]
|
36
35
|
s.homepage = "http://github.com/nirtzur/resque-analytics"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nir Tzur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: resque
|
@@ -100,7 +100,6 @@ files:
|
|
100
100
|
- lib/resque-analytics/server.rb
|
101
101
|
- lib/resque-analytics/server/views/analytics.erb
|
102
102
|
- lib/resque/plugins/analytics.rb
|
103
|
-
- resque-analytics-0.6.1.gem
|
104
103
|
- resque-analytics.gemspec
|
105
104
|
homepage: http://github.com/nirtzur/resque-analytics
|
106
105
|
licenses:
|
data/resque-analytics-0.6.1.gem
DELETED
Binary file
|