sidekiq 6.5.4 → 6.5.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Changes.md +6 -0
- data/lib/sidekiq/job_retry.rb +1 -0
- data/lib/sidekiq/metrics/deploy.rb +2 -2
- data/lib/sidekiq/metrics/query.rb +102 -73
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/action.rb +3 -3
- data/lib/sidekiq/web/application.rb +7 -7
- data/lib/sidekiq/web.rb +1 -1
- data/web/assets/javascripts/chart.min.js +13 -0
- data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
- data/web/assets/javascripts/metrics.js +262 -0
- data/web/assets/stylesheets/application.css +44 -1
- data/web/locales/el.yml +43 -19
- data/web/locales/en.yml +4 -1
- data/web/views/metrics.erb +47 -37
- data/web/views/metrics_for_job.erb +77 -82
- metadata +5 -2
@@ -1,92 +1,87 @@
|
|
1
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
2
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
1
4
|
|
2
|
-
|
5
|
+
<%
|
6
|
+
job_result = @query_result.job_results[@name]
|
7
|
+
hist_totals = job_result.hist.values.first.zip(*job_result.hist.values[1..-1]).map(&:sum)
|
8
|
+
bucket_labels =Sidekiq::Metrics::Histogram::LABELS
|
9
|
+
bucket_intervals =Sidekiq::Metrics::Histogram::BUCKET_INTERVALS.reverse
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
|
11
|
+
# Replace INFINITY since it can't be represented as JSON
|
12
|
+
bucket_intervals[0] = bucket_intervals[1] * 2
|
13
|
+
%>
|
7
14
|
|
8
|
-
<%
|
9
|
-
<div class="
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<th><%= t('Failed') %></th>
|
17
|
-
<th><%= t('Deploy') %></th>
|
18
|
-
<th><%= t('Histogram') %></th>
|
19
|
-
</tr>
|
20
|
-
<% data.each do |hash| %>
|
21
|
-
<tr><td><%= hash[:time] %></td><td><%= hash[:p] %></td><td><%= hash[:ms] %></td><td><%= hash[:f] %></td><td><%= hash[:mark] %></td><td><%= hash[:hist] %></td></tr>
|
22
|
-
<% end %>
|
23
|
-
</tbody>
|
24
|
-
</table>
|
25
|
-
</div>
|
15
|
+
<% if job_result.totals["s"] > 0 %>
|
16
|
+
<div class="header-with-subheader">
|
17
|
+
<h1>
|
18
|
+
<a href="<%= root_path %>/metrics"><%= t(:metrics).to_s.titleize %></a> /
|
19
|
+
<%= h @name %>
|
20
|
+
</h1>
|
21
|
+
<h2>Histogram summary</h2>
|
22
|
+
</div>
|
26
23
|
|
27
|
-
<
|
28
|
-
Data from <%= @resultset[:starts_at] %> to <%= @resultset[:ends_at] %>
|
29
|
-
</p>
|
24
|
+
<canvas id="hist-totals-chart"></canvas>
|
30
25
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
<% end %> ]
|
41
|
-
}, {
|
42
|
-
name: "Failed",
|
43
|
-
color: palette.color(),
|
44
|
-
data: [ <% atad.each do |hash| %>
|
45
|
-
{ x: <%= hash[:epoch] %>, y: <%= hash[:f] %> },
|
46
|
-
<% end %>
|
47
|
-
]
|
48
|
-
}, {
|
49
|
-
name: "Execution Time",
|
50
|
-
color: palette.color(),
|
51
|
-
data: [ <% atad.each do |hash| %>
|
52
|
-
{ x: <%= hash[:epoch] %>, y: <%= hash[:ms] %> },
|
53
|
-
<% end %>
|
54
|
-
]
|
55
|
-
} ];
|
26
|
+
<script>
|
27
|
+
window.histTotalsChart = new HistTotalsChart(
|
28
|
+
"hist-totals-chart",
|
29
|
+
<%= Sidekiq.dump_json({
|
30
|
+
series: hist_totals,
|
31
|
+
labels: bucket_labels,
|
32
|
+
}) %>
|
33
|
+
)
|
34
|
+
</script>
|
56
35
|
|
57
|
-
|
58
|
-
var histogramData = [ <% atad.each do |hash| %>
|
59
|
-
{ x: <%= hash[:epoch] %>, hist: <%= hash[:hist] %> },
|
60
|
-
<% end %> ]
|
61
|
-
var histogramLabels = <%= Sidekiq::Metrics::Histogram::LABELS.inspect %>;
|
36
|
+
<h2>Performance over time</h2>
|
62
37
|
|
63
|
-
|
64
|
-
var graphElement = document.getElementById("realtime");
|
38
|
+
<canvas id="hist-bubble-chart"></canvas>
|
65
39
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
40
|
+
<script>
|
41
|
+
window.histBubbleChart = new HistBubbleChart(
|
42
|
+
"hist-bubble-chart",
|
43
|
+
<%= Sidekiq.dump_json({
|
44
|
+
hist: job_result.hist,
|
45
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
46
|
+
labels: @query_result.buckets,
|
47
|
+
histIntervals: bucket_intervals,
|
48
|
+
}) %>
|
49
|
+
)
|
50
|
+
</script>
|
74
51
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
52
|
+
<div class="table_container">
|
53
|
+
<table class="table table-bordered table-striped table-hover">
|
54
|
+
<tbody>
|
55
|
+
<tr>
|
56
|
+
<th><%= t('Time') %></th>
|
57
|
+
<th><%= t('Processed') %></th>
|
58
|
+
<th><%= t('Failed') %></th>
|
59
|
+
<th><%= t('ExecutionTime') %></th>
|
60
|
+
<th><%= t('AvgExecutionTime') %></th>
|
61
|
+
</tr>
|
62
|
+
<% @query_result.buckets.reverse.each do |bucket| %>
|
63
|
+
<tr>
|
64
|
+
<td><%= bucket %></td>
|
65
|
+
<td><%= job_result.series.dig("p", bucket) %></td>
|
66
|
+
<td><%= job_result.series.dig("f", bucket) %></td>
|
67
|
+
<% if (total_sec = job_result.series.dig("s", bucket)) > 0 %>
|
68
|
+
<td><%= total_sec.round(2) %> seconds</td>
|
69
|
+
<td><%= job_result.series_avg("s")[bucket].round(2) %> seconds</td>
|
70
|
+
<% else %>
|
71
|
+
<td>—</td>
|
72
|
+
<td>—</td>
|
73
|
+
<% end %>
|
74
|
+
</tr>
|
75
|
+
<% end %>
|
76
|
+
</tbody>
|
77
|
+
</table>
|
78
|
+
</div>
|
79
|
+
<p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p>
|
80
|
+
<% else %>
|
81
|
+
<h1>
|
82
|
+
<a href="<%= root_path %>/metrics"><%= t(:metrics).to_s.titleize %></a> /
|
83
|
+
<%= h @name %>
|
84
|
+
</h1>
|
80
85
|
|
81
|
-
|
82
|
-
|
83
|
-
var hoverDetail = new Rickshaw.Graph.HoverDetail( {
|
84
|
-
graph: graph,
|
85
|
-
// formatter: function(series, x, y) {
|
86
|
-
// var date = '<span class="date">' + new Date(x * 1000).toUTCString() + '</span>';
|
87
|
-
// var swatch = '<span class="detail_swatch" style="background-color: ' + series.color + '"></span>';
|
88
|
-
// var content = swatch + series.name + ": " + parseInt(y) + '<br>' + date;
|
89
|
-
// return content;
|
90
|
-
// }
|
91
|
-
} );
|
92
|
-
</script>
|
86
|
+
<div class="alert alert-success"><%= t('NoJobMetricsFound') %></div>
|
87
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.5.
|
4
|
+
version: 6.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -124,8 +124,11 @@ files:
|
|
124
124
|
- web/assets/images/logo.png
|
125
125
|
- web/assets/images/status.png
|
126
126
|
- web/assets/javascripts/application.js
|
127
|
+
- web/assets/javascripts/chart.min.js
|
128
|
+
- web/assets/javascripts/chartjs-plugin-annotation.min.js
|
127
129
|
- web/assets/javascripts/dashboard.js
|
128
130
|
- web/assets/javascripts/graph.js
|
131
|
+
- web/assets/javascripts/metrics.js
|
129
132
|
- web/assets/stylesheets/application-dark.css
|
130
133
|
- web/assets/stylesheets/application-rtl.css
|
131
134
|
- web/assets/stylesheets/application.css
|