peek-sidekiq 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +4 -0
- data/lib/peek-sidekiq/version.rb +1 -1
- data/lib/peek/views/sidekiq.rb +17 -13
- metadata +14 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3afb6ca92edfa605f0f60552ee9dd48b4c21a3853e37273a5f7a74cda15375fd
|
4
|
+
data.tar.gz: 478bd9a8cdde1ad29652bc2111566bc0122c8f375231a79e3f83c5d1d7e7605a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 95d8441b4207b51afb48ca6145f5a5c5caeb4ce9e99a83670eaaa65edf21a890aeb91e194fe954ef7ad39613d25dfe2a7e47c4fc6a9faf7a230841393aa59b8d
|
7
|
+
data.tar.gz: 4103062aaab911de0da25bda90b67d3e3baf25e6773e1d4042d4c6dfcf70bcbb3caefb45b19bb430e80fa8a1af0e06b90b75fbbf1bd6aeb78807641e4762fc0f
|
data/CHANGELOG.md
CHANGED
data/lib/peek-sidekiq/version.rb
CHANGED
data/lib/peek/views/sidekiq.rb
CHANGED
@@ -1,29 +1,33 @@
|
|
1
1
|
require 'sidekiq'
|
2
2
|
require 'atomic'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
def push_with_timing(*args)
|
4
|
+
module Peek
|
5
|
+
module SidekiqInstrumented
|
6
|
+
def push(*args)
|
9
7
|
start = Time.now
|
10
|
-
|
8
|
+
super(*args)
|
11
9
|
ensure
|
12
10
|
duration = (Time.now - start)
|
13
|
-
|
14
|
-
|
11
|
+
::Sidekiq::Client.query_time.update { |value| value + duration }
|
12
|
+
::Sidekiq::Client.query_count.update { |value| value + 1 }
|
15
13
|
end
|
16
|
-
alias_method_chain :push, :timing
|
17
14
|
|
18
|
-
def
|
15
|
+
def push_bulk(*args)
|
19
16
|
start = Time.now
|
20
|
-
|
17
|
+
super(*args)
|
21
18
|
ensure
|
22
19
|
duration = (Time.now - start)
|
23
|
-
|
24
|
-
|
20
|
+
::Sidekiq::Client.query_time.update { |value| value + duration }
|
21
|
+
::Sidekiq::Client.query_count.update { |value| value + 1 }
|
25
22
|
end
|
26
23
|
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class Sidekiq::Client
|
27
|
+
prepend Peek::SidekiqInstrumented
|
28
|
+
class << self
|
29
|
+
attr_accessor :query_time, :query_count
|
30
|
+
end
|
27
31
|
|
28
32
|
self.query_count = Atomic.new(0)
|
29
33
|
self.query_time = Atomic.new(0)
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peek-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Parry
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: peek
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sidekiq
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: atomic
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 1.0.0
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 1.0.0
|
62
55
|
description: Provide a peek into the Sidekiq calls made within your Rails application.
|
@@ -66,7 +59,7 @@ executables: []
|
|
66
59
|
extensions: []
|
67
60
|
extra_rdoc_files: []
|
68
61
|
files:
|
69
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
70
63
|
- CHANGELOG.md
|
71
64
|
- Gemfile
|
72
65
|
- LICENSE.txt
|
@@ -80,26 +73,24 @@ files:
|
|
80
73
|
- peek-sidekiq.gemspec
|
81
74
|
homepage: https://github.com/suranyami/peek-sidekiq
|
82
75
|
licenses: []
|
76
|
+
metadata: {}
|
83
77
|
post_install_message:
|
84
78
|
rdoc_options: []
|
85
79
|
require_paths:
|
86
80
|
- lib
|
87
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
82
|
requirements:
|
90
|
-
- -
|
83
|
+
- - ">="
|
91
84
|
- !ruby/object:Gem::Version
|
92
85
|
version: '0'
|
93
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
87
|
requirements:
|
96
|
-
- -
|
88
|
+
- - ">="
|
97
89
|
- !ruby/object:Gem::Version
|
98
90
|
version: '0'
|
99
91
|
requirements: []
|
100
|
-
|
101
|
-
rubygems_version: 1.8.25
|
92
|
+
rubygems_version: 3.0.3
|
102
93
|
signing_key:
|
103
|
-
specification_version:
|
94
|
+
specification_version: 4
|
104
95
|
summary: Provide a peek into the Sidekiq calls made within your Rails application.
|
105
96
|
test_files: []
|