MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / run

Function run

tools/python-3.11.9-amd64/Lib/profile.py:81–92  ·  view source on GitHub ↗

Run statement under profiler optionally saving results in filename This function takes a single argument that can be passed to the "exec" statement, and an optional file name. In all cases this routine attempts to "exec" its first argument and gather profiling statistics from

(statement, filename=None, sort=-1)

Source from the content-addressed store, hash-verified

79#**************************************************************************
80
81def run(statement, filename=None, sort=-1):
82 """Run statement under profiler optionally saving results in filename
83
84 This function takes a single argument that can be passed to the
85 "exec" statement, and an optional file name. In all cases this
86 routine attempts to "exec" its first argument and gather profiling
87 statistics from the execution. If no file name is present, then this
88 function automatically prints a simple profiling report, sorted by the
89 standard name string (file/line/function-name) that is presented in
90 each line.
91 """
92 return _Utils(Profile).run(statement, filename, sort)
93
94def runctx(statement, globals, locals, filename=None, sort=-1):
95 """Run statement under profiler, supplying your own globals and locals,

Callers

nothing calls this directly

Calls 2

_UtilsClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected