1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Annoying bugs in debug mode because someone likes changing object_id and class signatures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@236 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
zedshaw 2006-06-09 05:01:26 +00:00
parent d9e061c97d
commit db9bf40124
2 changed files with 19 additions and 13 deletions

View file

@ -33,7 +33,7 @@ task :ragel do
end
task :site_webgen do
sh %{pushd doc/site; webgen; scp -r output/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/; popd }
sh %{pushd doc/site; webgen; scp -r `find output -name "*.html" -print` #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/; popd }
end
task :site_rdoc do

View file

@ -79,12 +79,14 @@ module ObjectTracker
ospace = Set.new
counts = {}
# Strings can't be tracked easily and are so numerous that they drown out all else
# so we just ignore them in the counts.
ObjectSpace.each_object do |obj|
ospace << obj.object_id
counts[obj.class] ||= 0
counts[obj.class] += 1
begin
ospace << obj.object_id
counts[obj.class] ||= 0
counts[obj.class] += 1
rescue Object
# skip since object_id can magically get parameters
end
end
dead_objects = @active_objects - ospace
@ -194,15 +196,19 @@ module RequestLog
def process(request, response)
MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
ObjectSpace.each_object do |obj|
if obj.class == Mongrel::HttpServer
worker_list = obj.workers.list
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}" }
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
MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
rescue Object
# ignore since obj.class can sometimes take parameters
end
end
end