yabeda-latency 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7129185f3b35549c6d47c870f34f802b761d1c50d69576d4cbe7741f03681408
4
- data.tar.gz: 351cc540bfd2dd6b9e154f7e59f6bcd9ce44990c041475426f6dded4c86a3725
3
+ metadata.gz: 3e9ea4d7372b163eddba1779e6f2cc5cf3646a33b3bdb8a4b868c932db53fa26
4
+ data.tar.gz: 1b1180b2383ad423b65b44ada18efe54444c5b05909c9ead7f6bc9f174e5e23d
5
5
  SHA512:
6
- metadata.gz: 7769f03056bf2172b72168908ce4399eeac3d41d97fc0b744a8a3d9ea9184f61f0cdd7ec22bfc80e7c405f731684e5aa8d7b589d91e2a1d4e53c1b933cf8c575
7
- data.tar.gz: 8cfdfd3687096f837d7f49d9f8cedee8e91c2d36fe8bc50d50fde3b29f72c1ae67efff8dfece3596aac3b30ac7ad24b05dc304391b1dc7b75a4901d1d1942ff9
6
+ metadata.gz: 34692c3fe86f2455bacef04c6150fa1fca44c87084c171836e9d1f3c7a63b951f1534eaf6c28736063e99c3ad3c72136d6ddb58344bfae76fcc086b93a52f674
7
+ data.tar.gz: f47b2ac5a47be047527fc4d6293a1bdb060fdc5f6612a43021fa7f06b3ffe40b9df55018c2507f353e1feb0676a363285daecefedc4b9569d318cee733b660f6
@@ -67,11 +67,11 @@ module Yabeda
67
67
 
68
68
  def calculate_latency_seconds(env, now)
69
69
  raw_header_value = env[REQUEST_START_HEADER]
70
- request_start_timestamp_ms = extract_timestamp_from_header_value(raw_header_value)
70
+ request_start_timestamp_s = extract_timestamp_from_header_value(raw_header_value)
71
71
 
72
- return unless request_start_timestamp_ms
72
+ return unless request_start_timestamp_s
73
73
 
74
- now.to_f - (request_start_timestamp_ms / 1000)
74
+ now.to_f - request_start_timestamp_s
75
75
  end
76
76
 
77
77
  def extract_timestamp_from_header_value(value)
@@ -86,7 +86,7 @@ module Yabeda
86
86
 
87
87
  return unless str
88
88
 
89
- str.to_i
89
+ str.to_f
90
90
  end
91
91
  end
92
92
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Latency
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer