더북(TheBook)

출력은 함수별로 정보가 정리된 표로 되어 있다. 이때 표에 정리된 데이터는 앞에서 설명한 runcall 메서드가 실행되면서 프로파일러가 활성화되어 있는 동안에만 샘플링된다.

>>>
       41475 function calls in 2.198 seconds

  Ordered by: cumulative time

  ncalls tottime percall cumtime percall filename:lineno(function)
       1   0.000   0.000   2.198   2.198 main.py:35(<lambda>)
       1   0.003   0.003   2.198   2.198 main.py:10(insertion_sort)
   20736   2.137   0.000   2.195   0.000 main.py:20(insert_value)
   20729   0.058   0.000   0.058   0.000 {method 'insert' of 'list' objects}
       7   0.000   0.000   0.000   0.000 {method 'append' of 'list' objects}