sidekiq-cloudwatchmetrics 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sidekiq/cloudwatchmetrics.rb +23 -5
- data.tar.gz.sig +3 -3
- metadata +12 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db3700f67618740e59e5d6b238c8ef38df7fff355b55720cbd8a3e3d8ddc4fe0
|
4
|
+
data.tar.gz: cc370653cf4e03aa2eef772b60063567409f10eeeedd90a4e24bfb67a445f951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6481c3015ff0d156677856c0851f34a35fad57718b9d493d096d38017b902ef12429f18a5e557fd6b1f1b5a0e32df6a7b805dea042a6620528aea76b42c72ec
|
7
|
+
data.tar.gz: f9b6755f2c04741b1704825d6a3a0b9950ea609da9784a77a622a9b99562857c0c81d9cada121ce8c05b148e0096c47e26be7036a05c5c864592b6749e80078f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -56,7 +56,7 @@ module Sidekiq::CloudWatchMetrics
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def start
|
59
|
-
logger.
|
59
|
+
logger.debug { "Starting Sidekiq CloudWatch Metrics Publisher" }
|
60
60
|
|
61
61
|
@done = false
|
62
62
|
@thread = safe_thread("cloudwatch metrics publisher", &method(:run))
|
@@ -73,7 +73,7 @@ module Sidekiq::CloudWatchMetrics
|
|
73
73
|
now = Time.now.to_f
|
74
74
|
tick = now
|
75
75
|
until @stop
|
76
|
-
logger.
|
76
|
+
logger.debug { "Publishing Sidekiq CloudWatch Metrics" }
|
77
77
|
publish
|
78
78
|
|
79
79
|
now = Time.now.to_f
|
@@ -81,7 +81,7 @@ module Sidekiq::CloudWatchMetrics
|
|
81
81
|
sleep(tick - now) if tick > now
|
82
82
|
end
|
83
83
|
|
84
|
-
logger.
|
84
|
+
logger.debug { "Stopped Sidekiq CloudWatch Metrics Publisher" }
|
85
85
|
end
|
86
86
|
|
87
87
|
def publish
|
@@ -164,6 +164,24 @@ module Sidekiq::CloudWatchMetrics
|
|
164
164
|
}
|
165
165
|
end
|
166
166
|
|
167
|
+
processes.group_by do |process|
|
168
|
+
process["tag"]
|
169
|
+
end.each do |(tag, tag_processes)|
|
170
|
+
next if tag.nil?
|
171
|
+
|
172
|
+
tag_utilization = calculate_utilization(tag_processes) * 100.0
|
173
|
+
|
174
|
+
unless tag_utilization.nan?
|
175
|
+
metrics << {
|
176
|
+
metric_name: "Utilization",
|
177
|
+
dimensions: [{name: "Tag", value: tag}],
|
178
|
+
timestamp: now,
|
179
|
+
value: tag_utilization,
|
180
|
+
unit: "Percent",
|
181
|
+
}
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
167
185
|
if @process_metrics
|
168
186
|
processes.each do |process|
|
169
187
|
process_utilization = process["busy"] / process["concurrency"].to_f * 100.0
|
@@ -239,12 +257,12 @@ module Sidekiq::CloudWatchMetrics
|
|
239
257
|
end
|
240
258
|
|
241
259
|
def quiet
|
242
|
-
logger.
|
260
|
+
logger.debug { "Quieting Sidekiq CloudWatch Metrics Publisher" }
|
243
261
|
@stop = true
|
244
262
|
end
|
245
263
|
|
246
264
|
def stop
|
247
|
-
logger.
|
265
|
+
logger.debug { "Stopping Sidekiq CloudWatch Metrics Publisher" }
|
248
266
|
@stop = true
|
249
267
|
@thread.wakeup
|
250
268
|
@thread.join
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
�
|
1
|
+
=�z�"�S�a,F����.��>���:�|����X�k���R�
|
2
|
+
�g�۩��ۮ����z�ɂ�"N��7����K�'c�kW5�ض�\���F�?��noL���=1��v�����a��\
|
3
|
+
�V��.U�xܔ]�jjL�NV�U#��B�W�P�f��Ey�s�W�\�_]0��;im8�
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-cloudwatchmetrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Cochran
|
@@ -10,26 +10,25 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDKDCCAhCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
|
14
14
|
MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0y
|
15
|
-
|
15
|
+
MzA3MTIwODU1NTFaFw0yNDA3MTEwODU1NTFaMDoxDTALBgNVBAMMBHNqMjYxFDAS
|
16
16
|
BgoJkiaJk/IsZAEZFgRzajI2MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkq
|
17
17
|
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr60Eo/ttCk8GMTMFiPr3GoYMIMFvLak
|
18
18
|
xSmTk9YGCB6UiEePB4THSSA5w6IPyeaCF/nWkDp3/BAam0eZMWG1IzYQB23TqIM0
|
19
19
|
1xzcNRvFsn0aQoQ00k+sj+G83j3T5OOV5OZIlu8xAChMkQmiPd1NXc6uFv+Iacz7
|
20
20
|
kj+CMsI9YUFdNoU09QY0b+u+Rb6wDYdpyvN60YC30h0h1MeYbvYZJx/iZK4XY5zu
|
21
21
|
4O/FL2ChjL2CPCpLZW55ShYyrzphWJwLOJe+FJ/ZBl6YXwrzQM9HKnt4titSNvyU
|
22
|
-
KzE3L63A3PZvExzLrN9u09kuWLLJfXB2sGOlw3n9t72rJiuBr3/
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
LDvy9dfwMMOdIZi75Q8SBBib84AuwhMHIlUv9FcHhh3dXsDDYkrVrpUAwCsG6yCm
|
22
|
+
KzE3L63A3PZvExzLrN9u09kuWLLJfXB2sGOlw3n9t72rJiuBr3/OQQIDAQABozkw
|
23
|
+
NzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU99dfRjEKFyczTeIz
|
24
|
+
m3ZsDWrNC80wDQYJKoZIhvcNAQELBQADggEBAHplXTmXnsLZKl6th6Twlbpl3iBl
|
25
|
+
7aRpOrLc7g8WIEirjiWlYZXjhdG6XoiIQAQtV3XniQ6npRPw7Np8AhSR1LOlvbOs
|
26
|
+
hEdArvs/OZy9cN7fQNduZFK1dkbYCF4waBTycsQFvrzcJzRmjhS9BJd0rroetldo
|
27
|
+
nmPzAzlAl9rIOQC/c763FVfdbPQu+mxcj4JCfVElUzxK+4igyB6SFMckMPSZIJbi
|
28
|
+
cxvXzM34LVue8vISlf/2VKpawD3kQinfo1I53MP3Hv3EihDc4p14E4hdAILtHd5r
|
29
|
+
k6d9rkvRe0/YFTLB1hzK6scdAUcD91NOylY8s4cypQv/mk+OTbQ9+Xy7tyU=
|
31
30
|
-----END CERTIFICATE-----
|
32
|
-
date: 2023-
|
31
|
+
date: 2023-07-29 00:00:00.000000000 Z
|
33
32
|
dependencies:
|
34
33
|
- !ruby/object:Gem::Dependency
|
35
34
|
name: sidekiq
|
metadata.gz.sig
CHANGED
Binary file
|