sidekiq 6.5.6 → 7.0.0.beta1
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 +16 -4
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +13 -12
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +15 -24
- data/lib/sidekiq/api.rb +55 -111
- data/lib/sidekiq/capsule.rb +110 -0
- data/lib/sidekiq/cli.rb +44 -47
- data/lib/sidekiq/client.rb +29 -16
- data/lib/sidekiq/component.rb +1 -0
- data/lib/sidekiq/config.rb +270 -0
- data/lib/sidekiq/deploy.rb +62 -0
- data/lib/sidekiq/embedded.rb +61 -0
- data/lib/sidekiq/fetch.rb +10 -11
- data/lib/sidekiq/job.rb +375 -10
- data/lib/sidekiq/job_logger.rb +1 -1
- data/lib/sidekiq/job_retry.rb +8 -8
- data/lib/sidekiq/job_util.rb +4 -4
- data/lib/sidekiq/launcher.rb +36 -46
- data/lib/sidekiq/logger.rb +1 -26
- data/lib/sidekiq/manager.rb +9 -11
- data/lib/sidekiq/metrics/query.rb +2 -2
- data/lib/sidekiq/metrics/shared.rb +4 -3
- data/lib/sidekiq/metrics/tracking.rb +18 -18
- data/lib/sidekiq/middleware/chain.rb +7 -9
- data/lib/sidekiq/middleware/current_attributes.rb +8 -13
- data/lib/sidekiq/pool.rb +7 -0
- data/lib/sidekiq/processor.rb +17 -26
- data/lib/sidekiq/redis_client_adapter.rb +9 -45
- data/lib/sidekiq/redis_connection.rb +11 -111
- data/lib/sidekiq/scheduled.rb +58 -25
- data/lib/sidekiq/testing.rb +4 -32
- data/lib/sidekiq/transaction_aware_client.rb +4 -5
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/application.rb +1 -1
- data/lib/sidekiq/web/csrf_protection.rb +1 -1
- data/lib/sidekiq/web/helpers.rb +5 -16
- data/lib/sidekiq/web.rb +2 -17
- data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
- data/lib/sidekiq.rb +52 -274
- data/sidekiq.gemspec +29 -5
- data/web/assets/javascripts/base-charts.js +106 -0
- data/web/assets/javascripts/dashboard-charts.js +166 -0
- data/web/assets/javascripts/dashboard.js +3 -223
- data/web/assets/javascripts/metrics.js +90 -116
- data/web/assets/stylesheets/application-rtl.css +2 -91
- data/web/assets/stylesheets/application.css +21 -296
- data/web/locales/ar.yml +70 -70
- data/web/locales/cs.yml +62 -62
- data/web/locales/da.yml +52 -52
- data/web/locales/de.yml +65 -65
- data/web/locales/el.yml +2 -7
- data/web/locales/en.yml +76 -70
- data/web/locales/es.yml +68 -68
- data/web/locales/fa.yml +65 -65
- data/web/locales/fr.yml +67 -67
- data/web/locales/he.yml +65 -64
- data/web/locales/hi.yml +59 -59
- data/web/locales/it.yml +53 -53
- data/web/locales/ja.yml +71 -68
- data/web/locales/ko.yml +52 -52
- data/web/locales/lt.yml +66 -66
- data/web/locales/nb.yml +61 -61
- data/web/locales/nl.yml +52 -52
- data/web/locales/pl.yml +45 -45
- data/web/locales/pt-br.yml +59 -69
- data/web/locales/pt.yml +51 -51
- data/web/locales/ru.yml +67 -66
- data/web/locales/sv.yml +53 -53
- data/web/locales/ta.yml +60 -60
- data/web/locales/uk.yml +62 -61
- data/web/locales/ur.yml +64 -64
- data/web/locales/vi.yml +67 -67
- data/web/locales/zh-cn.yml +37 -11
- data/web/locales/zh-tw.yml +42 -8
- data/web/views/_footer.erb +5 -2
- data/web/views/dashboard.erb +36 -5
- data/web/views/metrics.erb +30 -19
- data/web/views/metrics_for_job.erb +16 -34
- metadata +59 -30
- data/lib/sidekiq/delay.rb +0 -43
- data/lib/sidekiq/extensions/action_mailer.rb +0 -48
- data/lib/sidekiq/extensions/active_record.rb +0 -43
- data/lib/sidekiq/extensions/class_methods.rb +0 -43
- data/lib/sidekiq/extensions/generic_proxy.rb +0 -33
- data/lib/sidekiq/metrics/deploy.rb +0 -47
- data/lib/sidekiq/worker.rb +0 -367
- data/web/assets/javascripts/graph.js +0 -16
data/web/locales/vi.yml
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
# elements like %{queue} are variables and should not be translated
|
2
|
-
vi:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
vi:
|
3
|
+
Actions: Những hành động
|
4
|
+
AddToQueue: Thêm vào hàng đợi
|
5
|
+
AreYouSure: Bạn chắc chứ?
|
6
|
+
AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
|
7
|
+
AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
|
8
|
+
Arguments: Tham số
|
9
|
+
BackToApp: Trở về ứng dụng
|
9
10
|
Busy: Bận rộn
|
10
|
-
Processed: Đã xử lí
|
11
|
-
Failed: Đã thất bại
|
12
|
-
Scheduled: Đã lên lịch
|
13
|
-
Retries: Số lần thử
|
14
|
-
Enqueued: Đã xếp hàng đợi
|
15
|
-
Worker: Máy xử lí
|
16
|
-
LivePoll: Thăm dò trực tiếp
|
17
|
-
StopPolling: Ngừng thăm dò
|
18
|
-
Queue: Hàng đợi
|
19
11
|
Class: Lớp
|
20
|
-
|
21
|
-
|
22
|
-
Extras: Thêm
|
23
|
-
Started: Đã bắt đầu
|
24
|
-
ShowAll: Hiện tất cả
|
12
|
+
Connections: Các kết nối
|
13
|
+
CreatedAt: Được tạo vào lúc
|
25
14
|
CurrentMessagesInQueue: Số lượng công việc trong <span class='title'>%{queue}</span>
|
15
|
+
Dashboard: Bảng điều khiển
|
16
|
+
Dead: Chết
|
17
|
+
DeadJobs: Những tác vụ đã chết
|
26
18
|
Delete: Xóa
|
27
|
-
AddToQueue: Thêm vào hàng đợi
|
28
|
-
AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
|
29
|
-
AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
|
30
|
-
Queues: Các hàng đợi
|
31
|
-
Size: Kích thước
|
32
|
-
Actions: Những hành động
|
33
|
-
NextRetry: Lần thử lại tiếp theo
|
34
|
-
RetryCount: Số lần thử lại
|
35
|
-
RetryNow: Thử lại ngay bây giờ
|
36
|
-
Kill: Giết
|
37
|
-
LastRetry: Lần thử cuối
|
38
|
-
OriginallyFailed: Đã thất bại từ đầu
|
39
|
-
AreYouSure: Bạn chắc chứ?
|
40
19
|
DeleteAll: Xóa hết
|
41
|
-
|
42
|
-
KillAll: Giết hết
|
43
|
-
NoRetriesFound: Không có lần thử nào được tìm thấy
|
20
|
+
Enqueued: Đã xếp hàng đợi
|
44
21
|
Error: Lỗi
|
22
|
+
ErrorBacktrace: Dấu vết của lỗi
|
45
23
|
ErrorClass: Lớp lỗi
|
46
24
|
ErrorMessage: Tin nhắn lỗi
|
47
|
-
|
25
|
+
Extras: Thêm
|
26
|
+
Failed: Đã thất bại
|
27
|
+
Failures: Các thất bại
|
48
28
|
GoBack: ← Trở lại
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
29
|
+
History: Lịch sử
|
30
|
+
Job: Tác vụ
|
31
|
+
Jobs: Các tác vụ
|
32
|
+
Kill: Giết
|
33
|
+
KillAll: Giết hết
|
34
|
+
LastRetry: Lần thử cuối
|
35
|
+
Latency: Độ trễ
|
36
|
+
LivePoll: Thăm dò trực tiếp
|
56
37
|
MemoryUsage: Lượng bộ nhớ sử dụng
|
57
|
-
|
58
|
-
|
59
|
-
OneWeek: 1 tuần
|
60
|
-
OneMonth: 1 tháng
|
61
|
-
ThreeMonths: 3 tháng
|
62
|
-
SixMonths: 6 tháng
|
63
|
-
Failures: Các thất bại
|
64
|
-
DeadJobs: Những tác vụ đã chết
|
38
|
+
Namespace: Không gian tên
|
39
|
+
NextRetry: Lần thử lại tiếp theo
|
65
40
|
NoDeadJobsFound: Không có tác vụ đã chết nào được tìm thấy
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
41
|
+
NoRetriesFound: Không có lần thử nào được tìm thấy
|
42
|
+
NoScheduledFound: Không có tác vụ đã lên lịch nào được tìm thấy
|
43
|
+
NotYetEnqueued: Chưa được bỏ vào hàng đợi
|
44
|
+
OneMonth: 1 tháng
|
45
|
+
OneWeek: 1 tuần
|
46
|
+
OriginallyFailed: Đã thất bại từ đầu
|
47
|
+
Pause: Tạm dừng
|
71
48
|
Paused: Đã tạm dừng
|
72
|
-
|
49
|
+
PeakMemoryUsage: Lượng bộ nhớ sử dụng đỉnh điểm
|
50
|
+
Plugins: Hệ thống đính kèm
|
51
|
+
PollingInterval: Khoảng thời gian giữa các lần thăm dò
|
52
|
+
Processed: Đã xử lí
|
53
|
+
Processes: Tiến trình xử lí
|
54
|
+
Queue: Hàng đợi
|
55
|
+
Queues: Các hàng đợi
|
73
56
|
Quiet: Im lặng
|
74
|
-
StopAll: Dừng lại tất cả
|
75
57
|
QuietAll: Làm cho tất cả im lặng
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
58
|
+
Realtime: Thời gian thực
|
59
|
+
Retries: Số lần thử
|
60
|
+
RetryAll: Thử lại tất cả
|
61
|
+
RetryCount: Số lần thử lại
|
62
|
+
RetryNow: Thử lại ngay bây giờ
|
63
|
+
Scheduled: Đã lên lịch
|
64
|
+
ScheduledJobs: Những Tác Vụ Được Hẹn
|
65
|
+
ShowAll: Hiện tất cả
|
66
|
+
SixMonths: 6 tháng
|
67
|
+
Size: Kích thước
|
68
|
+
Started: Đã bắt đầu
|
69
|
+
Status: Trạng thái
|
70
|
+
Stop: Dừng Lại
|
71
|
+
StopAll: Dừng lại tất cả
|
72
|
+
StopPolling: Ngừng thăm dò
|
73
|
+
Thread: Luồng xử lí
|
74
|
+
Threads: Những luồng xử lí
|
75
|
+
ThreeMonths: 3 tháng
|
76
|
+
Time: Thời gian
|
83
77
|
Unpause: Hủy tạm dừng
|
78
|
+
Uptime: Thời gian hệ thống đã online (days)
|
79
|
+
Version: Phiên bản
|
80
|
+
When: Khi nào
|
81
|
+
Worker: Máy xử lí
|
82
|
+
active: Đang hoạt động
|
83
|
+
idle: Đang chờ
|
data/web/locales/zh-cn.yml
CHANGED
@@ -7,6 +7,7 @@ zh-cn: # <---- change this to your locale code
|
|
7
7
|
Realtime: 实时
|
8
8
|
History: 历史记录
|
9
9
|
Busy: 执行中
|
10
|
+
Utilization: 利用率
|
10
11
|
Processed: 已处理
|
11
12
|
Failed: 已失败
|
12
13
|
Scheduled: 已计划
|
@@ -17,15 +18,15 @@ zh-cn: # <---- change this to your locale code
|
|
17
18
|
StopPolling: 停止轮询
|
18
19
|
Queue: 队列
|
19
20
|
Class: 类别
|
20
|
-
Job:
|
21
|
+
Job: 任务
|
21
22
|
Arguments: 参数
|
22
23
|
Extras: 额外的
|
23
24
|
Started: 已开始
|
24
25
|
ShowAll: 显示全部
|
25
|
-
CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span
|
26
|
+
CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span>的任务
|
26
27
|
Delete: 删除
|
27
28
|
AddToQueue: 添加至队列
|
28
|
-
AreYouSureDeleteJob:
|
29
|
+
AreYouSureDeleteJob: 你确定要删除这个任务么?
|
29
30
|
AreYouSureDeleteQueue: 你确定要删除%{queue}这个队列?
|
30
31
|
Queues: 队列
|
31
32
|
Size: 容量
|
@@ -33,20 +34,23 @@ zh-cn: # <---- change this to your locale code
|
|
33
34
|
NextRetry: 下次重试
|
34
35
|
RetryCount: 重试次數
|
35
36
|
RetryNow: 现在重试
|
37
|
+
Kill: 终止
|
36
38
|
LastRetry: 最后一次重试
|
37
39
|
OriginallyFailed: 原本已失败
|
38
40
|
AreYouSure: 你确定?
|
39
|
-
DeleteAll:
|
40
|
-
RetryAll:
|
41
|
+
DeleteAll: 全部删除
|
42
|
+
RetryAll: 全部重试
|
43
|
+
KillAll: 全部终止
|
41
44
|
NoRetriesFound: 沒有发现可重试
|
42
45
|
Error: 错误
|
46
|
+
ErrorBacktrace: 错误的回调追踪
|
43
47
|
ErrorClass: 错误类别
|
44
48
|
ErrorMessage: 错误消息
|
45
|
-
ErrorBacktrace:
|
49
|
+
ErrorBacktrace: 错误细节
|
46
50
|
GoBack: ← 返回
|
47
|
-
NoScheduledFound:
|
51
|
+
NoScheduledFound: 沒有发现计划任务
|
48
52
|
When: 当
|
49
|
-
ScheduledJobs:
|
53
|
+
ScheduledJobs: 计划任务
|
50
54
|
idle: 闲置
|
51
55
|
active: 活动中
|
52
56
|
Version: 版本
|
@@ -59,10 +63,32 @@ zh-cn: # <---- change this to your locale code
|
|
59
63
|
ThreeMonths: 三个月
|
60
64
|
SixMonths: 六个月
|
61
65
|
Failures: 失败
|
62
|
-
DeadJobs:
|
63
|
-
NoDeadJobsFound:
|
66
|
+
DeadJobs: 已停滞任务
|
67
|
+
NoDeadJobsFound: 沒有发现任何已停滞的任务
|
64
68
|
Dead: 已停滞
|
69
|
+
Process: 进程
|
65
70
|
Processes: 处理中
|
71
|
+
Name: 名称
|
66
72
|
Thread: 线程
|
67
73
|
Threads: 线程
|
68
|
-
Jobs:
|
74
|
+
Jobs: 任务
|
75
|
+
Paused: 已暫停
|
76
|
+
Stop: 強制暫停
|
77
|
+
Quiet: 暫停
|
78
|
+
StopAll: 全部強制暫停
|
79
|
+
QuietAll: 全部暫停
|
80
|
+
PollingInterval: 輪詢週期
|
81
|
+
Plugins: 套件
|
82
|
+
NotYetEnqueued: 尚未進入佇列
|
83
|
+
CreatedAt: 建立時間
|
84
|
+
BackToApp: 回首頁
|
85
|
+
Latency: 延時
|
86
|
+
Pause: 暫停
|
87
|
+
Unpause: 取消暂停
|
88
|
+
Metrics: 指标
|
89
|
+
NoDataFound: 无数据
|
90
|
+
TotalExecutionTime: 总执行时间
|
91
|
+
AvgExecutionTime: 平均执行时间
|
92
|
+
Context: 上下文
|
93
|
+
Bucket: 桶
|
94
|
+
NoJobMetricsFound: 无任务相关指标数据
|
data/web/locales/zh-tw.yml
CHANGED
@@ -7,6 +7,7 @@ zh-tw: # <---- change this to your locale code
|
|
7
7
|
Realtime: 即時
|
8
8
|
History: 歷史資料
|
9
9
|
Busy: 忙碌
|
10
|
+
Utilization: 使用率
|
10
11
|
Processed: 已處理
|
11
12
|
Failed: 已失敗
|
12
13
|
Scheduled: 已排程
|
@@ -25,26 +26,29 @@ zh-tw: # <---- change this to your locale code
|
|
25
26
|
CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span>的工作
|
26
27
|
Delete: 刪除
|
27
28
|
AddToQueue: 增加至佇列
|
28
|
-
AreYouSureDeleteJob:
|
29
|
-
AreYouSureDeleteQueue:
|
29
|
+
AreYouSureDeleteJob: 確定要刪除這個工作嗎?
|
30
|
+
AreYouSureDeleteQueue: 確定要刪除%{queue}佇列?這會刪除佇列裡的所有工作,佇列將會在有新工作時重新出現。
|
30
31
|
Queues: 佇列
|
31
32
|
Size: 容量
|
32
33
|
Actions: 動作
|
33
34
|
NextRetry: 下次重試
|
34
35
|
RetryCount: 重試次數
|
35
36
|
RetryNow: 馬上重試
|
37
|
+
Kill: 取消
|
36
38
|
LastRetry: 最後一次重試
|
37
39
|
OriginallyFailed: 原本已失敗
|
38
40
|
AreYouSure: 你確定?
|
39
|
-
DeleteAll:
|
40
|
-
RetryAll:
|
41
|
-
|
41
|
+
DeleteAll: 全部刪除
|
42
|
+
RetryAll: 全部重試
|
43
|
+
KillAll: 全部取消
|
44
|
+
NoRetriesFound: 找無可重試的工作
|
42
45
|
Error: 錯誤
|
46
|
+
ErrorBacktrace: 錯誤的回調追踨
|
43
47
|
ErrorClass: 錯誤類別
|
44
48
|
ErrorMessage: 錯誤訊息
|
45
|
-
ErrorBacktrace:
|
49
|
+
ErrorBacktrace: 詳細錯誤訊息
|
46
50
|
GoBack: ← 返回
|
47
|
-
NoScheduledFound:
|
51
|
+
NoScheduledFound: 找無已排程的工作
|
48
52
|
When: 當
|
49
53
|
ScheduledJobs: 已排程的工作
|
50
54
|
idle: 閒置
|
@@ -59,10 +63,40 @@ zh-tw: # <---- change this to your locale code
|
|
59
63
|
ThreeMonths: 三個月
|
60
64
|
SixMonths: 六個月
|
61
65
|
Failures: 失敗
|
62
|
-
|
66
|
+
GoBack: ← 返回
|
67
|
+
History: 歷史資料
|
68
|
+
Job: 工作
|
69
|
+
Jobs: 工作
|
70
|
+
LastRetry: 最後一次重試
|
71
|
+
LivePoll: 即時輪詢
|
72
|
+
MemoryUsage: 記憶體使用量
|
73
|
+
Namespace: 命名空間
|
74
|
+
NextRetry: 下次重試
|
63
75
|
NoDeadJobsFound: 沒有發現任何停滯的工作
|
64
76
|
Dead: 停滯
|
77
|
+
Process: 程序
|
65
78
|
Processes: 處理中
|
79
|
+
Name: 名稱
|
66
80
|
Thread: 執行緒
|
67
81
|
Threads: 執行緒
|
68
82
|
Jobs: 工作
|
83
|
+
Paused: 已暫停
|
84
|
+
Stop: 強制暫停
|
85
|
+
Quiet: 暫停
|
86
|
+
StopAll: 全部強制暫停
|
87
|
+
QuietAll: 全部暫停
|
88
|
+
PollingInterval: 輪詢週期
|
89
|
+
Plugins: 套件
|
90
|
+
NotYetEnqueued: 尚未進入佇列
|
91
|
+
CreatedAt: 建立時間
|
92
|
+
BackToApp: 回首頁
|
93
|
+
Latency: 延時
|
94
|
+
Pause: 暫停
|
95
|
+
Unpause: 取消暫停
|
96
|
+
Metrics: 計量
|
97
|
+
NoDataFound: 找無資料
|
98
|
+
TotalExecutionTime: 總執行時間
|
99
|
+
AvgExecutionTime: 平均執行時間
|
100
|
+
Context: 上下文
|
101
|
+
Bucket: 桶
|
102
|
+
NoJobMetricsFound: 找無工作相關計量資料
|
data/web/views/_footer.erb
CHANGED
@@ -6,13 +6,16 @@
|
|
6
6
|
<p class="navbar-text product-version"><%= product_version %></p>
|
7
7
|
</li>
|
8
8
|
<li>
|
9
|
-
<p class="navbar-text redis-url" title="<%=
|
9
|
+
<p class="navbar-text redis-url" title="<%= redis_url %>"><%= redis_url %></p>
|
10
10
|
</li>
|
11
11
|
<li>
|
12
12
|
<p id="serverUtcTime" class="navbar-text server-utc-time"><%= server_utc_time %></p>
|
13
13
|
</li>
|
14
14
|
<li>
|
15
|
-
<p class="navbar-text"><a
|
15
|
+
<p class="navbar-text"><a rel=help href="https://github.com/mperham/sidekiq/wiki">docs</a></p>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
<p class="navbar-text"><a rel=external href="https://github.com/mperham/sidekiq/tree/main/web/locales"><%= locale %></a></p>
|
16
19
|
</li>
|
17
20
|
</ul>
|
18
21
|
</div>
|
data/web/views/dashboard.erb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
<script type="text/javascript" src="<%= root_path %>javascripts/
|
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/base-charts.js"></script>
|
4
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard-charts.js"></script>
|
2
5
|
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard.js"></script>
|
3
6
|
<div class= "dashboard clearfix">
|
4
7
|
<h3 >
|
@@ -17,8 +20,26 @@
|
|
17
20
|
</div>
|
18
21
|
|
19
22
|
<div class="row chart">
|
20
|
-
<
|
21
|
-
<
|
23
|
+
<canvas id="realtime-chart"></canvas>
|
24
|
+
<script>
|
25
|
+
window.realtimeChart = new RealtimeChart(
|
26
|
+
document.getElementById("realtime-chart"),
|
27
|
+
<%= Sidekiq.dump_json({
|
28
|
+
processedLabel: t('Processed'),
|
29
|
+
failedLabel: t('Failed'),
|
30
|
+
labels: Array.new(50, ""),
|
31
|
+
processed: Array.new(50),
|
32
|
+
failed: Array.new(50),
|
33
|
+
updateUrl: "#{root_path}stats",
|
34
|
+
}) %>
|
35
|
+
)
|
36
|
+
</script>
|
37
|
+
|
38
|
+
<!-- start with a space in the legend so the height doesn't change when we add content dynamically -->
|
39
|
+
<div id="realtime-legend"> </div>
|
40
|
+
<script>
|
41
|
+
realtimeChart.registerLegend(document.getElementById("realtime-legend"))
|
42
|
+
</script>
|
22
43
|
</div>
|
23
44
|
|
24
45
|
<div class="row header">
|
@@ -34,8 +55,18 @@
|
|
34
55
|
<a href="<%= root_path %>?days=180" class="history-graph <%= "active" if params[:days] == "180" %>"><%= t('SixMonths') %></a>
|
35
56
|
</div>
|
36
57
|
|
37
|
-
<
|
38
|
-
<
|
58
|
+
<canvas id="history-chart"></canvas>
|
59
|
+
<script>
|
60
|
+
window.historyChart = new DashboardChart(
|
61
|
+
document.getElementById("history-chart"),
|
62
|
+
<%= Sidekiq.dump_json({
|
63
|
+
processedLabel: t('Processed'),
|
64
|
+
failedLabel: t('Failed'),
|
65
|
+
processed: @processed_history.to_a.reverse,
|
66
|
+
failed: @failed_history.to_a.reverse,
|
67
|
+
}) %>
|
68
|
+
)
|
69
|
+
</script>
|
39
70
|
</div>
|
40
71
|
|
41
72
|
<br/>
|
data/web/views/metrics.erb
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
2
2
|
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
3
4
|
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
4
5
|
|
5
|
-
<
|
6
|
+
<div class="header-container">
|
7
|
+
<h1><%= t('Metrics') %></h1>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<a target="blank" href="https://github.com/mperham/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
11
|
+
</div>
|
12
|
+
</div>
|
6
13
|
|
7
14
|
<%
|
8
15
|
table_limit = 20
|
@@ -11,30 +18,33 @@
|
|
11
18
|
visible_kls = job_results.first(chart_limit).map(&:first)
|
12
19
|
%>
|
13
20
|
|
14
|
-
|
15
|
-
|
16
|
-
<script>
|
17
|
-
window.jobMetricsChart = new JobMetricsOverviewChart(
|
18
|
-
"job-metrics-overview-chart",
|
19
|
-
<%= Sidekiq.dump_json({
|
20
|
-
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
21
|
-
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
22
|
-
visible: visible_kls,
|
23
|
-
labels: @query_result.buckets,
|
24
|
-
}) %>
|
25
|
-
)
|
26
|
-
</script>
|
21
|
+
<% if job_results.any? %>
|
22
|
+
<canvas id="job-metrics-overview-chart"></canvas>
|
27
23
|
|
28
|
-
<
|
24
|
+
<script>
|
25
|
+
window.jobMetricsChart = new JobMetricsOverviewChart(
|
26
|
+
document.getElementById("job-metrics-overview-chart"),
|
27
|
+
<%= Sidekiq.dump_json({
|
28
|
+
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
29
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
30
|
+
labels: @query_result.buckets,
|
31
|
+
visibleKls: visible_kls,
|
32
|
+
yLabel: t('TotalExecutionTime'),
|
33
|
+
units: t('Seconds').downcase,
|
34
|
+
markLabel: t('Deploy'),
|
35
|
+
}) %>
|
36
|
+
)
|
37
|
+
</script>
|
38
|
+
<% end %>
|
29
39
|
|
30
40
|
<div class="table_container">
|
31
41
|
<table class="table table-bordered table-striped table-hover">
|
32
42
|
<tbody>
|
33
43
|
<tr>
|
34
44
|
<th><%= t('Name') %></th>
|
35
|
-
<th><%= t('
|
36
|
-
<th><%= t('
|
37
|
-
<th><%= t('
|
45
|
+
<th><%= t('Success') %></th>
|
46
|
+
<th><%= t('Failure') %></th>
|
47
|
+
<th><%= t('TotalExecutionTime') %></th>
|
38
48
|
<th><%= t('AvgExecutionTime') %></th>
|
39
49
|
</tr>
|
40
50
|
<% if job_results.any? %>
|
@@ -48,12 +58,13 @@
|
|
48
58
|
id="<%= id %>"
|
49
59
|
class="metrics-swatch"
|
50
60
|
value="<%= kls %>"
|
61
|
+
<%= visible_kls.include?(kls) ? 'checked' : '' %>
|
51
62
|
/>
|
52
63
|
<code><a href="<%= root_path %>metrics/<%= kls %>"><%= kls %></a></code>
|
53
64
|
</div>
|
54
65
|
<script>jobMetricsChart.registerSwatch("<%= id %>")</script>
|
55
66
|
</td>
|
56
|
-
<td><%= jr.dig("totals", "p") %></td>
|
67
|
+
<td><%= jr.dig("totals", "p") - jr.dig("totals", "f") %></td>
|
57
68
|
<td><%= jr.dig("totals", "f") %></td>
|
58
69
|
<td><%= jr.dig("totals", "s").round(2) %> seconds</td>
|
59
70
|
<td><%= jr.total_avg("s").round(2) %> seconds</td>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
2
2
|
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
3
4
|
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
4
5
|
|
5
6
|
<%
|
@@ -13,69 +14,50 @@
|
|
13
14
|
%>
|
14
15
|
|
15
16
|
<% if job_result.totals["s"] > 0 %>
|
16
|
-
<div class="header-
|
17
|
+
<div class="header-container">
|
17
18
|
<h1>
|
18
|
-
<a href="<%= root_path
|
19
|
+
<a href="<%= root_path %>metrics"><%= t(:metrics).to_s.titleize %></a> /
|
19
20
|
<%= h @name %>
|
20
21
|
</h1>
|
21
|
-
|
22
|
+
|
23
|
+
<div>
|
24
|
+
<a target="blank" href="https://github.com/mperham/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
25
|
+
</div>
|
22
26
|
</div>
|
23
27
|
|
24
28
|
<canvas id="hist-totals-chart"></canvas>
|
25
29
|
|
26
30
|
<script>
|
27
31
|
window.histTotalsChart = new HistTotalsChart(
|
28
|
-
"hist-totals-chart",
|
32
|
+
document.getElementById("hist-totals-chart"),
|
29
33
|
<%= Sidekiq.dump_json({
|
30
34
|
series: hist_totals,
|
31
35
|
labels: bucket_labels,
|
36
|
+
xLabel: t('ExecutionTime'),
|
37
|
+
yLabel: t('Jobs'),
|
38
|
+
units: t('Jobs').downcase,
|
32
39
|
}) %>
|
33
40
|
)
|
34
41
|
</script>
|
35
42
|
|
36
|
-
<h2>Performance over time</h2>
|
37
|
-
|
38
43
|
<canvas id="hist-bubble-chart"></canvas>
|
39
44
|
|
40
45
|
<script>
|
41
46
|
window.histBubbleChart = new HistBubbleChart(
|
42
|
-
"hist-bubble-chart",
|
47
|
+
document.getElementById("hist-bubble-chart"),
|
43
48
|
<%= Sidekiq.dump_json({
|
44
49
|
hist: job_result.hist,
|
45
50
|
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
46
51
|
labels: @query_result.buckets,
|
47
52
|
histIntervals: bucket_intervals,
|
53
|
+
yLabel: t('ExecutionTime'),
|
54
|
+
markLabel: t('Deploy'),
|
55
|
+
yUnits: t('Seconds').downcase,
|
56
|
+
zUnits: t('Jobs').downcase,
|
48
57
|
}) %>
|
49
58
|
)
|
50
59
|
</script>
|
51
60
|
|
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
61
|
<p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p>
|
80
62
|
<% else %>
|
81
63
|
<h1>
|