baverman / flameprof

Flamegraph generator for cProfile stats
MIT License
237 stars 15 forks source link

What do the numbers in parentheses mean #12

Open zcfh opened 1 year ago

zcfh commented 1 year ago
test.py:15:test_recursion 22.93% (6 0 4.222224027306071e-05 0.2833811705771583)

I understand that the last two numbers may be tottime and cumtime corresponding to the profile, and the first number may be ncalls, so what is the second number 0?


def test_recursion(num):
    if num < 0:
        return
    print('test_recursion', num)
    time.sleep(0.1)
    test_recursion(num-1)
    test_recursion(num-3)

def main():
    test_recursion(5)

if __name__ == "__main__":
    main()