cProfile
shows lot of built-in function calls in the output. Can we limit the output only to the code I have written. So in the below example, can i see only the lines from testrun
or the functions called from testrun()
which resides in the same script. Or may be limit the level of calls logged to 2 or 3 ?
pr = cProfile.Profile()
pr.enable()
testrun()
pr.disable()
pr.print_stats(sort='time')