Changeset 6157
- Timestamp:
- 02/17/07 05:11:55 (1 year 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
r6156 r6157 1 1 *SVN* 2 2 3 * Added X- Benchmark to all responses with the same benchmark data as goes into the log[DHH]3 * Added X-Runtime to all responses with the request run time [DHH] 4 4 5 5 * Add Mime::Type convenience methods to check the current mime type. [Rick] trunk/actionpack/lib/action_controller/benchmarking.rb
r6156 r6157 65 65 else 66 66 runtime = [ Benchmark::measure{ perform_action_without_benchmark }.real, 0.0001 ].max 67 67 68 log_message = "Completed in #{sprintf("%.5f", runtime)} (#{(1 / runtime).floor} reqs/sec)" 68 69 log_message << rendering_runtime(runtime) if defined?(@rendering_runtime) 69 70 log_message << active_record_runtime(runtime) if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected? 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"}]" 71 log_message << " | #{headers["Status"]}" 72 log_message << " [#{complete_request_uri rescue "unknown"}]" 74 73 75 response.headers["X-Benchmark"] = log_message76 logger.info(log_message_with_status)74 logger.info(log_message) 75 response.headers["X-Runtime"] = sprintf("%.5f", runtime) 77 76 end 78 77 end