Date: 2007-07-01 00:47
Sender: Charlie Savage
Hi Kurt,
I was just looking at better thread support and the problem is
that the timings double count times spent in background threads.
For example:
def test_thread_timings
RubyProf.start
sleep(2)
thread = Thread.new do
sleep(2)
end
thread.join
result = RubyProf.stop
end
The main thread will look like it has run for 4 seconds. I'm
having a hard time seeing how to prevent this though.
If it did work, then could you create what you need by looping
over each thread and method, and adding up the times?
Thanks,
Charlie |