overall_request_times 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/overall_request_times/railtie.rb +1 -5
- data/lib/overall_request_times/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a88359fad7231f21acf8e61bd40debe33bc7f9be
|
4
|
+
data.tar.gz: ab4ec3e028f4e324fe8d72ce28512152d8cef0df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3543abc8635f44540fb722be6312d2a36c8174a4475a1d61db7c404088a9ab68b45c0c78f339fb8e791b35e13ed6e7c3dc8fef7730c11be8b83146b9358e29ba
|
7
|
+
data.tar.gz: f647517b2f00643c96c683184ab2fbb7c352127cb6fa3b6bffe50e6333784d0454ecd5cd8f3f23c3f7eaa5828361be65c7cac34fcd2f60c3ece125e6c74b63f1
|
@@ -4,11 +4,7 @@ module OverallRequestTimes
|
|
4
4
|
app.middleware.use OverallRequestTimes::RailsMiddleware
|
5
5
|
|
6
6
|
ActiveSupport::Notifications.subscribe(/cache_(read|write|delete).active_support/) do |name, start, finish, _id, payload|
|
7
|
-
|
8
|
-
if duration_in_seconds > 0.005
|
9
|
-
Rails.logger.info "Cache operation took over 5ms: name:#{name} start:#{start.to_f} finish:#{finish.to_f} payload:#{payload.inspect}"
|
10
|
-
end
|
11
|
-
OverallRequestTimes.add_duration(:cache, duration_in_seconds)
|
7
|
+
OverallRequestTimes.add_duration(:cache, finish - start)
|
12
8
|
end
|
13
9
|
end
|
14
10
|
end
|