yabeda-latency 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8208b03d0db33e5175d7937a429a432a468f7c6485589b5251978743dc73948d
4
- data.tar.gz: f79c2d9904a8c1834b8d206b1af0fdde1dc9604cd9df541e2d59dc614a10114e
3
+ metadata.gz: 7129185f3b35549c6d47c870f34f802b761d1c50d69576d4cbe7741f03681408
4
+ data.tar.gz: 351cc540bfd2dd6b9e154f7e59f6bcd9ce44990c041475426f6dded4c86a3725
5
5
  SHA512:
6
- metadata.gz: e8690d781117bfaf3083d51a3d435077f75ed87263760dd73a9fd2bdddb1549f14fc9692e544744339c48a4b37fb359a1555b18764208758c0efd0e355005ee9
7
- data.tar.gz: de420dbbc06356d8b44b50e361fb5e0f2e4b14dc7e69f26a1ab1e0b4f5a803bdc7b63ec509c0c9d345679564bbc73da21df6e26c915b5c3b2c52f980d83cb26c
6
+ metadata.gz: 7769f03056bf2172b72168908ce4399eeac3d41d97fc0b744a8a3d9ea9184f61f0cdd7ec22bfc80e7c405f731684e5aa8d7b589d91e2a1d4e53c1b933cf8c575
7
+ data.tar.gz: 8cfdfd3687096f837d7f49d9f8cedee8e91c2d36fe8bc50d50fde3b29f72c1ae67efff8dfece3596aac3b30ac7ad24b05dc304391b1dc7b75a4901d1d1942ff9
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ Gemfile.lock
@@ -23,14 +23,19 @@ module Yabeda
23
23
 
24
24
  def call(env) # :nodoc:
25
25
  now = Time.now
26
- latency_seconds = calculate_latency_seconds(env, now)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Latency
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
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.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