ruby-prof / ruby-prof

A ruby profiler. See https://ruby-prof.github.io for more information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some items have nonsensical (very large) total time

ujetjeremy opened this issue · comments

It's entirely possible I've misunderstood the output here, but I've looked through all the documentation and I can't seem to find an answer.

When I take time profiles and print the output with GraphHtmlPrinter I see a number of cases where the total time for child or parent items well exceed the total time of the current item or really the entire profiling session. Here's an example:

Screen Shot 2022-01-18 at 5 52 27 PM

In this case, the profiler ran for a few minutes so I think the "205.62 seconds" for total time is right. I have no clue where the "64104.11" or "62779.33" or "1324.76" are coming from. If you click any of those children / parent items, their bolded line correctly shows "205.62" or something close to it. I'm not sure why they're different.

Originally I thought these might aggregate if a method is called recursively or something, but I can find cases in my profile where that doesn't seem to happen, so it seems like maybe this is just a bug.

Can you share the code that produced this output?

Closing since haven't heard back. Happy to look if you can provide the code that was profiled.