aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/bench.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/bench.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/bench.py55
1 files changed, 31 insertions, 24 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/bench.py b/lldb/packages/Python/lldbsuite/test/bench.py
index a9661b6..3fe301f 100644
--- a/lldb/packages/Python/lldbsuite/test/bench.py
+++ b/lldb/packages/Python/lldbsuite/test/bench.py
@@ -23,36 +23,42 @@ from optparse import OptionParser
benches = [
# Measure startup delays creating a target, setting a breakpoint, and run
# to breakpoint stop.
- './dotest.py -v +b %E %X -n -p TestStartupDelays.py',
-
+ "./dotest.py -v +b %E %X -n -p TestStartupDelays.py",
# Measure 'frame variable' response after stopping at a breakpoint.
- './dotest.py -v +b %E %X -n -p TestFrameVariableResponse.py',
-
+ "./dotest.py -v +b %E %X -n -p TestFrameVariableResponse.py",
# Measure stepping speed after stopping at a breakpoint.
- './dotest.py -v +b %E %X -n -p TestSteppingSpeed.py',
-
+ "./dotest.py -v +b %E %X -n -p TestSteppingSpeed.py",
# Measure expression cmd response with a simple custom executable program.
- './dotest.py +b -n -p TestExpressionCmd.py',
-
+ "./dotest.py +b -n -p TestExpressionCmd.py",
# Attach to a spawned process then run disassembly benchmarks.
- './dotest.py -v +b -n %E -p TestDoAttachThenDisassembly.py'
+ "./dotest.py -v +b -n %E -p TestDoAttachThenDisassembly.py",
]
def main():
"""Read the items from 'benches' and run the command line one by one."""
- parser = OptionParser(usage="""\
+ parser = OptionParser(
+ usage="""\
%prog [options]
Run the standard benchmarks defined in the list named 'benches'.\
-""")
- parser.add_option('-e', '--executable',
- type='string', action='store',
- dest='exe',
- help='The target program launched by lldb.')
- parser.add_option('-x', '--breakpoint-spec',
- type='string', action='store',
- dest='break_spec',
- help='The lldb breakpoint spec for the target program.')
+"""
+ )
+ parser.add_option(
+ "-e",
+ "--executable",
+ type="string",
+ action="store",
+ dest="exe",
+ help="The target program launched by lldb.",
+ )
+ parser.add_option(
+ "-x",
+ "--breakpoint-spec",
+ type="string",
+ action="store",
+ dest="break_spec",
+ help="The lldb breakpoint spec for the target program.",
+ )
# Parses the options, if any.
opts, args = parser.parse_args()
@@ -60,14 +66,15 @@ Run the standard benchmarks defined in the list named 'benches'.\
print("Starting bench runner....")
for item in benches:
- command = item.replace('%E',
- '-e "%s"' % opts.exe if opts.exe else '')
- command = command.replace('%X', '-x "%s"' %
- opts.break_spec if opts.break_spec else '')
+ command = item.replace("%E", '-e "%s"' % opts.exe if opts.exe else "")
+ command = command.replace(
+ "%X", '-x "%s"' % opts.break_spec if opts.break_spec else ""
+ )
print("Running %s" % (command))
os.system(command)
print("Bench runner done.")
-if __name__ == '__main__':
+
+if __name__ == "__main__":
main()