Changeset 1113 for tools/conductor
- Timestamp:
- 04/07/05 16:27:24 (3 years ago)
- Files:
-
- tools/conductor/lib/request_profiler.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/conductor/lib/request_profiler.rb
r1052 r1113 47 47 # Begin profiling. Ignore if profiling has already begun. 48 48 def before(controller) 49 GC.disable 49 50 Prof.start rescue true 50 51 end … … 53 54 def after(controller) 54 55 results = Prof.stop 55 controller.response.body << render_results(results) 56 GC.enable 57 GC.start 58 str = render_results(results) 59 controller.response.body.gsub!(%r(</html>\s*$)m, "#{str}</html>") 56 60 end 57 61 … … 101 105 r.self_time * 1000 / r.count, 102 106 r.total_time * 1000 / r.count, 103 name107 CGI.escapeHTML(name) 104 108 ) 105 109 end