overall_request_times 0.3.0 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9214305699d6972a8cb93fa657561f07fd12fd14
4
- data.tar.gz: 55aa09c07765e1706f8d6e105a8336195008e0eb
3
+ metadata.gz: fb138b6a406c2f567301304a0530d968cd405ed8
4
+ data.tar.gz: 4321da12b12e59176f796f6d8fee64083c635d4c
5
5
  SHA512:
6
- metadata.gz: 17b52f9b4df1ddcec1e8959ea86ab7ffc6f797d0e9e4703c76533dca85f05dc36cb0b797995d0113a7c1326bc74ec87e32fa8fad92d546709398a98b51278bee
7
- data.tar.gz: 99279cf118341e2db68c5dcbdd4764aee86c54a1ac8b36d9c5fbce7ff8e7c649d47d89e29f820b5aff22d043668107998e42003d8ebd1a6d4b0a16440cb16633
6
+ metadata.gz: a38f435765b6615ac822710796126835da21a1a1c80a43aa5ce5e9e671bdd46175d346565c9b15c069288854b3bb0056909ecc14513df1c56059b650e9cfa5cf
7
+ data.tar.gz: 2e6cfd8375d53cc52e5b78cb6b98d1d9c1381432eb9094af85479b3edb6a3497e84f2094c40ddee5850255de238d905b0f286637a2447dc9da37abbe33733e0a
@@ -3,10 +3,12 @@ module OverallRequestTimes
3
3
  initializer "overall_request_times.configure_rails_initialization" do |app|
4
4
  app.middleware.use OverallRequestTimes::RailsMiddleware
5
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)
6
+ ActiveSupport::Notifications.subscribe(/cache_(read|write|delete).active_support/) do |name, start, finish, _id, payload|
7
+ duration_in_seconds = finish - start
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}"
9
10
  end
11
+ OverallRequestTimes.add_duration(:cache, duration_in_seconds)
10
12
  end
11
13
  end
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module OverallRequestTimes
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overall_request_times
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Plummer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2016-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.4.5.1
141
+ rubygems_version: 2.5.1
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: For recording overall times using remote services.