yabeda-latency 0.1.1 → 0.1.2
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/.gitignore +1 -0
- data/lib/yabeda/latency/collector.rb +8 -3
- data/lib/yabeda/latency/version.rb +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7129185f3b35549c6d47c870f34f802b761d1c50d69576d4cbe7741f03681408
|
4
|
+
data.tar.gz: 351cc540bfd2dd6b9e154f7e59f6bcd9ce44990c041475426f6dded4c86a3725
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7769f03056bf2172b72168908ce4399eeac3d41d97fc0b744a8a3d9ea9184f61f0cdd7ec22bfc80e7c405f731684e5aa8d7b589d91e2a1d4e53c1b933cf8c575
|
7
|
+
data.tar.gz: 8cfdfd3687096f837d7f49d9f8cedee8e91c2d36fe8bc50d50fde3b29f72c1ae67efff8dfece3596aac3b30ac7ad24b05dc304391b1dc7b75a4901d1d1942ff9
|
data/.gitignore
CHANGED
@@ -23,14 +23,19 @@ module Yabeda
|
|
23
23
|
|
24
24
|
def call(env) # :nodoc:
|
25
25
|
now = Time.now
|
26
|
-
|
27
|
-
measure(latency_seconds) unless latency_seconds.nil?
|
28
|
-
ensure
|
26
|
+
observe(env, now)
|
29
27
|
@app.call(env)
|
30
28
|
end
|
31
29
|
|
32
30
|
protected
|
33
31
|
|
32
|
+
def observe(env, now)
|
33
|
+
latency_seconds = calculate_latency_seconds(env, now)
|
34
|
+
measure(latency_seconds) unless latency_seconds.nil?
|
35
|
+
rescue StandardError
|
36
|
+
# ok
|
37
|
+
end
|
38
|
+
|
34
39
|
# rubocop:disable Metrics/MethodLength
|
35
40
|
def init_request_metrics
|
36
41
|
prefix = @metrics_prefix
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yabeda-latency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ker-Seymer
|
@@ -38,7 +38,6 @@ files:
|
|
38
38
|
- ".travis.yml"
|
39
39
|
- CODE_OF_CONDUCT.md
|
40
40
|
- Gemfile
|
41
|
-
- Gemfile.lock
|
42
41
|
- LICENSE.txt
|
43
42
|
- README.md
|
44
43
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
yabeda-latency (0.1.1)
|
5
|
-
yabeda (~> 0.2)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ast (2.4.2)
|
11
|
-
coderay (1.1.3)
|
12
|
-
concurrent-ruby (1.1.8)
|
13
|
-
diff-lcs (1.4.4)
|
14
|
-
dry-initializer (3.0.3)
|
15
|
-
method_source (1.0.0)
|
16
|
-
parallel (1.20.1)
|
17
|
-
parser (3.0.0.0)
|
18
|
-
ast (~> 2.4.1)
|
19
|
-
pry (0.13.1)
|
20
|
-
coderay (~> 1.1)
|
21
|
-
method_source (~> 1.0)
|
22
|
-
rainbow (3.0.0)
|
23
|
-
rake (12.3.3)
|
24
|
-
regexp_parser (2.0.3)
|
25
|
-
rexml (3.2.4)
|
26
|
-
rspec (3.10.0)
|
27
|
-
rspec-core (~> 3.10.0)
|
28
|
-
rspec-expectations (~> 3.10.0)
|
29
|
-
rspec-mocks (~> 3.10.0)
|
30
|
-
rspec-core (3.10.1)
|
31
|
-
rspec-support (~> 3.10.0)
|
32
|
-
rspec-expectations (3.10.1)
|
33
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.10.0)
|
35
|
-
rspec-mocks (3.10.1)
|
36
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.10.0)
|
38
|
-
rspec-support (3.10.1)
|
39
|
-
rubocop (1.9.1)
|
40
|
-
parallel (~> 1.10)
|
41
|
-
parser (>= 3.0.0.0)
|
42
|
-
rainbow (>= 2.2.2, < 4.0)
|
43
|
-
regexp_parser (>= 1.8, < 3.0)
|
44
|
-
rexml
|
45
|
-
rubocop-ast (>= 1.2.0, < 2.0)
|
46
|
-
ruby-progressbar (~> 1.7)
|
47
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
48
|
-
rubocop-ast (1.4.1)
|
49
|
-
parser (>= 2.7.1.5)
|
50
|
-
ruby-progressbar (1.11.0)
|
51
|
-
unicode-display_width (2.0.0)
|
52
|
-
yabeda (0.7.0)
|
53
|
-
concurrent-ruby
|
54
|
-
dry-initializer
|
55
|
-
|
56
|
-
PLATFORMS
|
57
|
-
ruby
|
58
|
-
|
59
|
-
DEPENDENCIES
|
60
|
-
pry
|
61
|
-
rake (~> 12.0)
|
62
|
-
rspec (~> 3.0)
|
63
|
-
rubocop
|
64
|
-
yabeda
|
65
|
-
yabeda-latency!
|
66
|
-
|
67
|
-
BUNDLED WITH
|
68
|
-
2.1.1
|