pyroscope
pyroscope copied to clipboard
Total time is wrongly calculated with recursive functions.
As it can be seen in the screenshot, the program runs for ~40s, but FibKt.main report 2x and FibKt.fib multiple times that:

I suppose that the problem is that the Total is aggregating the total times of each function by name, without taking into account node connections in the tree: only the first appearance of the function in each of the tree branches should be counted.