From af0d1fa8920793a95fae456d1f5debdc50287eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 7 Oct 2009 11:17:50 -0300 Subject: Update Orchestra instrumentations and move part of logging to Orchestra. --- actionpack/lib/action_controller/instrument.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 actionpack/lib/action_controller/instrument.rb (limited to 'actionpack/lib/action_controller/instrument.rb') diff --git a/actionpack/lib/action_controller/instrument.rb b/actionpack/lib/action_controller/instrument.rb new file mode 100644 index 0000000000..00888c425f --- /dev/null +++ b/actionpack/lib/action_controller/instrument.rb @@ -0,0 +1,6 @@ +require 'active_support/orchestra' + +ActiveSupport::Orchestra.subscribe(/(read|write|cache|expire|exist)_(fragment|page)\??/) do |event| + human_name = event.name.to_s.humanize + ActionController::Base.log("#{human_name} (%.1fms)" % event.duration) +end -- cgit v1.2.3