From: Robert Klemme Date: 2005-12-21T01:17:47+09:00 Subject: Re: ruby -r profile gives wrong percentage? javachallenge@gmail.com wrote: > I am using Windows, and I was testing the profiler with the simple > sieve.rb program. > > I may not have a good understanding of Ruby's profiler but It seems > that it gives me wrong percentages... I guess it is due to the > overhead of the profiler while the process is not too much cpu bound. > However if it shows wrong percentages, to me it's still a bug. > > So according to the output below, 100% of the time is gone with > Profiler__.start_profile, while 51.61% is gone with Numeric#step. All > this totaling 151.61%! > Am I missing something? Yes. Some figures are cumulative. This confused me in the beginning, too. I guess the rest of the confusion is caused by rounding errors - your figures are quite smallish. HTH > Thanks in advance. I am such a newbie :-) JC We all were once. :-) Kind regards robert