rorvswild 1.5.16 → 1.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rorvswild/plugin/redis.rb +29 -15
- data/lib/rorvswild/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ce241e0d917e560c8a5683bdc210dbd4f5158cd7bf49444ced9548d85b61e5e
|
4
|
+
data.tar.gz: b354848c0048368c615e4c2dd5231864a164c127af0aaf590fbfcd5c2a1cb36c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3e48e9328b450bfb3cb7e7e4536e249470bcf7cb1fd2b3c7f67416daa66e1c281e742446a97f868276ac3028a573a84247b80b7f3053fbaeb9f9dfe4209c57
|
7
|
+
data.tar.gz: eab70d88fd705bdd5d679b625a9b6e06b6612cff6eaa6dc5080d6cd80a38f6f28e1a198f475b683cecdb25be7ac98d54a67eecfb8ee8cea230d987248e846823
|
@@ -1,31 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module RorVsWild
|
2
4
|
module Plugin
|
3
5
|
class Redis
|
4
6
|
def self.setup
|
5
7
|
return if !defined?(::Redis)
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
if ::Redis::Client.method_defined?(:process)
|
9
|
+
::Redis::Client.prepend(V4)
|
10
|
+
else
|
11
|
+
::Redis.prepend(V5)
|
12
|
+
end
|
13
|
+
end
|
9
14
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
module V4
|
16
|
+
def process(commands, &block)
|
17
|
+
string = commands.map(&:first).join("\n")
|
18
|
+
appendable = APPENDABLE_COMMANDS.include?(commands[0][0])
|
19
|
+
RorVsWild.agent.measure_section(string, appendable_command: appendable, kind: "redis") do
|
20
|
+
super(commands, &block)
|
16
21
|
end
|
17
22
|
end
|
18
23
|
end
|
19
24
|
|
20
|
-
|
21
|
-
|
22
|
-
|
25
|
+
module V5
|
26
|
+
def send_command(command, &block)
|
27
|
+
appendable = APPENDABLE_COMMANDS.include?(command)
|
28
|
+
RorVsWild.agent.measure_section(command[0], appendable_command: appendable, kind: "redis") do
|
29
|
+
super(command, &block)
|
30
|
+
end
|
31
|
+
end
|
23
32
|
|
24
|
-
|
33
|
+
def pipelined
|
34
|
+
RorVsWild.agent.measure_section("pipeline", kind: "redis") { super }
|
35
|
+
end
|
25
36
|
|
26
|
-
|
27
|
-
|
37
|
+
def multi
|
38
|
+
RorVsWild.agent.measure_section("multi", kind: "redis") { super }
|
39
|
+
end
|
28
40
|
end
|
41
|
+
|
42
|
+
APPENDABLE_COMMANDS = [:auth, :select]
|
29
43
|
end
|
30
44
|
end
|
31
45
|
end
|
data/lib/rorvswild/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rorvswild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Bernard
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-10-
|
12
|
+
date: 2022-10-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Performances and errors insights for rails developers.
|
15
15
|
email:
|