Added more profiling options to run command
This commit is contained in:
parent
c4ae611ec3
commit
35843cce22
1 changed files with 6 additions and 2 deletions
|
@ -357,9 +357,13 @@ def _(args: cli.Args):
|
||||||
@cli.command("r", "builder/run", "Run a component")
|
@cli.command("r", "builder/run", "Run a component")
|
||||||
def runCmd(args: cli.Args):
|
def runCmd(args: cli.Args):
|
||||||
debug = args.consumeOpt("debug", False) is True
|
debug = args.consumeOpt("debug", False) is True
|
||||||
profile = args.consumeOpt("profile", False) is True
|
|
||||||
wait = args.consumeOpt("wait", False) is True
|
wait = args.consumeOpt("wait", False) is True
|
||||||
debugger = str(args.consumeOpt("debugger", "lldb"))
|
debugger = str(args.consumeOpt("debugger", "lldb"))
|
||||||
|
|
||||||
|
profile = args.consumeOpt("profile", False) is True
|
||||||
|
what = str(args.consumeOpt("what", "cpu"))
|
||||||
|
rate = int(args.consumeOpt("rate", 1000))
|
||||||
|
|
||||||
componentSpec = args.consumeArg() or "__main__"
|
componentSpec = args.consumeArg() or "__main__"
|
||||||
scope = TargetScope.use(args, {"debug": debug})
|
scope = TargetScope.use(args, {"debug": debug})
|
||||||
|
|
||||||
|
@ -380,7 +384,7 @@ def runCmd(args: cli.Args):
|
||||||
if debug:
|
if debug:
|
||||||
shell.debug(command, debugger=debugger, wait=wait)
|
shell.debug(command, debugger=debugger, wait=wait)
|
||||||
elif profile:
|
elif profile:
|
||||||
shell.profile(command)
|
shell.profile(command, what=what, rate=rate)
|
||||||
else:
|
else:
|
||||||
shell.exec(*command)
|
shell.exec(*command)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue