User Tools

Site Tools


competitive_programming:development_utilities

This is an old revision of the document!


Table of Contents

Profiling Tools

Python

cProfile

>>> import cProfile
>>> cProfile.run('x = [i for i in range(10000000)]')
         4 function calls in 0.719 seconds
 
   Ordered by: standard name
 
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.568    0.568    0.568    0.568 <string>:1(<listcomp>)
        1    0.151    0.151    0.719    0.719 <string>:1(<module>)
        1    0.000    0.000    0.719    0.719 {built-in method exec}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
competitive_programming/development_utilities.1536781104.txt.gz · Last modified: 2018/09/12 14:38 by jguerin