Class: RequestLog::Threads
- Inherits:
-
Object
- Object
- RequestLog::Threads
- Includes:
- Mongrel::HttpHandlerPlugin
- Defined in:
- lib/mongrel/debug.rb
Instance Attribute Summary
Attributes included from Mongrel::HttpHandlerPlugin
#listener, #options, #request_notify
Instance Method Summary collapse
Methods included from Mongrel::HttpHandlerPlugin
#initialize, #request_begins, #request_progress
Instance Method Details
#process(request, response) ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/mongrel/debug.rb', line 175 def process(request, response) MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}") begin ObjectSpace.each_object do |obj| begin if obj.class == Mongrel::HttpServer worker_list = obj.workers.list if worker_list.length > 0 keys = "-----\n\tKEYS:" worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" } end MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}") end rescue Object # Ignore since obj.class can sometimes take parameters end end rescue Object # Ignore since ObjectSpace might not be loaded on JRuby end end |