overall_request_times 0.2.3 → 0.2.4
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 +6 -0
- 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: e228419273167ea687df724563fdaebbd4c047f5
|
4
|
+
data.tar.gz: 95576351fe8449fa146bce2930a1f7e6a8026e1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87456e3b9d43a0523f49dc8eb75ec74c5c9672f1ec2a6c03d9d3554e736931f5073683301c0ab759403dee8647da338c751ca149244060019a352348c120a6a1
|
7
|
+
data.tar.gz: ef289744f075d57770014869d68a82e002342d01785d5b4d2c60121efd78c88ce111478aedc9480e588cb2bcdfab0ff5a93d5911b341528221594d62b5428771
|
@@ -2,6 +2,12 @@ module OverallRequestTimes
|
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
initializer "overall_request_times.configure_rails_initialization" do |app|
|
4
4
|
app.middleware.use OverallRequestTimes::RailsMiddleware
|
5
|
+
|
6
|
+
[:read, :write, :delete, :fetch_hit].each do |name|
|
7
|
+
ActiveSupport::Notifications.subscribe("cache_#{name}.active_support") do |_name, start, ending, _id, _payload|
|
8
|
+
OverallRequestTimes.add_duration(:cache, ending - start)
|
9
|
+
end
|
10
|
+
end
|
5
11
|
end
|
6
12
|
end
|
7
13
|
end
|