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 +4 -4
- data/lib/yabeda/latency/collector.rb +4 -4
- data/lib/yabeda/latency/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e9ea4d7372b163eddba1779e6f2cc5cf3646a33b3bdb8a4b868c932db53fa26
|
|
4
|
+
data.tar.gz: 1b1180b2383ad423b65b44ada18efe54444c5b05909c9ead7f6bc9f174e5e23d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
70
|
+
request_start_timestamp_s = extract_timestamp_from_header_value(raw_header_value)
|
|
71
71
|
|
|
72
|
-
return unless
|
|
72
|
+
return unless request_start_timestamp_s
|
|
73
73
|
|
|
74
|
-
now.to_f -
|
|
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.
|
|
89
|
+
str.to_f
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
end
|