traxor 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/traxor/rack/middleware.rb +8 -0
- data/lib/traxor/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: 9e4da239d870978c6eff4d74f12d9b2f2dd498b1746ff66aadf7f78b6b24b9f7
|
4
|
+
data.tar.gz: bcbfd72fab4d42c3c791740ee48066de99ae5df571d89b1114d6d03841f31587
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b013ac839338b084e7f939e27ead2c4107449e6c2a36272e05208b428b63fdda5504e5c641f28fec56b33bad908b7047353aa2020cc69eb5e10fe424c742d99
|
7
|
+
data.tar.gz: 83353eee51881dd5f1b2faac734427415a0746c7d8c322ee634c2875e4cc87492323acd1664d979814ea7e570eaa0462a3c73e5a9ae2737665f6d5235fd7081c
|
data/Gemfile.lock
CHANGED
@@ -11,10 +11,14 @@ module Traxor
|
|
11
11
|
:request_start_at
|
12
12
|
|
13
13
|
def self.time_before
|
14
|
+
return 0 unless pre_start_at
|
15
|
+
|
14
16
|
pre_finish_at.to_f - pre_start_at.to_f
|
15
17
|
end
|
16
18
|
|
17
19
|
def self.time_after
|
20
|
+
return 0 unless post_start_at
|
21
|
+
|
18
22
|
post_finish_at.to_f - post_start_at.to_f
|
19
23
|
end
|
20
24
|
|
@@ -23,10 +27,14 @@ module Traxor
|
|
23
27
|
end
|
24
28
|
|
25
29
|
def self.request_total
|
30
|
+
return 0 unless pre_start_at
|
31
|
+
|
26
32
|
(post_finish_at.to_f - pre_start_at.to_f) * 1_000
|
27
33
|
end
|
28
34
|
|
29
35
|
def self.request_queue_total
|
36
|
+
return 0 unless request_start_at
|
37
|
+
|
30
38
|
(pre_start_at.to_f - request_start_at.to_f) * 1_000
|
31
39
|
end
|
32
40
|
end
|
data/lib/traxor/version.rb
CHANGED