MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / profile

Function profile

lib/core/profiling.py:14–29  ·  view source on GitHub ↗

This will run the program and present profiling data in a nice looking graph

(profileOutputFile=None)

Source from the content-addressed store, hash-verified

12from lib.core.data import paths
13
14def profile(profileOutputFile=None):
15 """
16 This will run the program and present profiling data in a nice looking graph
17 """
18
19 if profileOutputFile is None:
20 profileOutputFile = os.path.join(paths.SQLMAP_OUTPUT_PATH, "sqlmap_profile.raw")
21
22 if os.path.exists(profileOutputFile):
23 os.remove(profileOutputFile)
24
25 # Start sqlmap main function and generate a raw profile file
26 cProfile.run("start()", profileOutputFile)
27
28 infoMsg = "execution profiled and stored into file '%s' (e.g. 'gprof2dot -f pstats %s | dot -Tpng -o /tmp/sqlmap_profile.png')" % (profileOutputFile, profileOutputFile)
29 logger.info(infoMsg)

Callers 1

mainFunction · 0.90

Calls 3

removeMethod · 0.80
infoMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…