rack-queue-metrics 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/queue-metrics/middleware.rb +1 -1
- data/lib/queue-metrics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjliYTU3ZTUxNmM4NmMxMjUxYWUwNGU1ODI5N2E2OWNkYjM2YzQ5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzQ3ZTkwZGQ4MDE1MjY1NjU1NjZhMzRmNTdmMjc3NTI0NTQ2YWQwNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTMzMTY3MDI0MWUxM2UxYjkxMmFhNjI0ZTRlOGZkYThkYzg4NDVhNzg5YjVj
|
10
|
+
M2U2M2E5MDc0M2EyYjNkOTRjYTEyNjdiMjUwMjVmYmFiNDkxZTA0NmM5N2Rh
|
11
|
+
MDY1NjUyN2RkMzcwOWM2NzdmODM2YmQwNjU0ZTg4MmM2Y2M0Yzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTExOTcyZTNhYzkzZmE1MDRiY2E1MTY0OTMwZDdmYjg0Y2Y1NzgyZTE0NWRh
|
14
|
+
ZDQwMDY4YTNiMjFjNmI0NzQ5ZTEzYmZjMDIwMDE0NDQ1OTdiNjgyMzFhZDgw
|
15
|
+
YmFkMjUwZDQ4Y2U1MmYwNzQ5Y2M2MDFkZGRjNjljY2U0Mzc0YzQ=
|
@@ -17,7 +17,7 @@ module Rack
|
|
17
17
|
status, headers, body = @app.call(env)
|
18
18
|
|
19
19
|
stats[:addr] = IPSocket.getaddress(Socket.gethostname).to_s + ':'+ENV['PORT']
|
20
|
-
stats[:queue_time] =
|
20
|
+
stats[:queue_time] = env["HTTP_X_REQUEST_START"] ? (start_time - env["HTTP_X_REQUEST_START"].to_f).round : 0
|
21
21
|
|
22
22
|
puts "at=metric measure=rack.queue-metrics addr=#{stats[:addr]} queue_time=#{stats[:queue_time]} queue_depth=#{stats[:requests][:queued]}"
|
23
23
|
ActiveSupport::Notifications.instrument("rack.queue-metrics", stats) if defined?(ActiveSupport::Notifications)
|