Skip to content

Instantly share code, notes, and snippets.

@andresriancho
Created April 23, 2014 18:12
Show Gist options
  • Save andresriancho/11226670 to your computer and use it in GitHub Desktop.
Save andresriancho/11226670 to your computer and use it in GitHub Desktop.
Profiling analysis
>>> p.print_callers('abc.py', 5)
Ordered by: standard name
List reduced from 913 to 2 due to restriction <'abc.py'>
Function was called by...
ncalls tottime cumtime
abc.py:128(__instancecheck__) <-
abc.py:148(__subclasscheck__) <- 1585 0.008 0.012 HTTPRequest.py:32(HTTPRequest.__init__)
2449 0.011 0.017 HTTPRequest.py:80(HTTPRequest.get_headers)
1225 0.030 0.033 HTTPRequest.py:85(HTTPRequest.to_dict)
1225 0.005 0.008 HTTPResponse.py:181(HTTPResponse.to_dict)
1224 0.031 0.083 HTTPResponse.py:657(HTTPResponse.dump_headers)
>>> p.strip_dirs().sort_stats(-1).print_stats('abc.py')
Wed Apr 23 14:22:35 2014 w3af-14755-2014-23-04-05_22.cpu
22141178 function calls (22677477 primitive calls) in 317.823 seconds
Ordered by: standard name
List reduced from 913 to 2 due to restriction <'abc.py'>
ncalls tottime percall cumtime percall filename:lineno(function)
1274827/1274828 24.563 0.000 41.111 0.000 abc.py:128(__instancecheck__)
997850/997859 9.612 0.000 14.822 0.000 abc.py:148(__subclasscheck__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment