Changeset 6156
- Timestamp:
- 02/16/07 21:13:02 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/benchmarking.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r6152 r6156 1 1 *SVN* 2 3 * Added X-Benchmark to all responses with the same benchmark data as goes into the log [DHH] 2 4 3 5 * Add Mime::Type convenience methods to check the current mime type. [Rick] trunk/actionpack/lib/action_controller/benchmarking.rb
r4595 r6156 64 64 perform_action_without_benchmark 65 65 else 66 runtime = [ Benchmark::measure{ perform_action_without_benchmark }.real, 0.0001].max66 runtime = [ Benchmark::measure{ perform_action_without_benchmark }.real, 0.0001 ].max 67 67 log_message = "Completed in #{sprintf("%.5f", runtime)} (#{(1 / runtime).floor} reqs/sec)" 68 68 log_message << rendering_runtime(runtime) if defined?(@rendering_runtime) 69 69 log_message << active_record_runtime(runtime) if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected? 70 log_message << " | #{headers["Status"]}" 71 log_message << " [#{complete_request_uri rescue "unknown"}]" 72 logger.info(log_message) 70 71 log_message_with_status = log_message.dup 72 log_message_with_status << " | #{headers["Status"]}" 73 log_message_with_status << " [#{complete_request_uri rescue "unknown"}]" 74 75 response.headers["X-Benchmark"] = log_message 76 logger.info(log_message_with_status) 73 77 end 74 78 end 75 79 80 76 81 private 77 82 def rendering_runtime(runtime)