summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py')
-rw-r--r--packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py b/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
index 3106c4511f586..ab2b2004fc5da 100644
--- a/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
+++ b/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
@@ -3,8 +3,8 @@
from __future__ import print_function
-
-import os, sys
+import os
+import sys
import lldb
from lldbsuite.test.lldbbench import *
from lldbsuite.test.decorators import *
@@ -12,6 +12,7 @@ from lldbsuite.test.lldbtest import *
from lldbsuite.test import configuration
from lldbsuite.test import lldbutil
+
class CompileRunToBreakpointBench(BenchBase):
mydir = TestBase.compute_mydir(__file__)
@@ -27,7 +28,9 @@ class CompileRunToBreakpointBench(BenchBase):
@benchmarks_test
@no_debug_info_test
- @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+ @expectedFailureAll(
+ oslist=["windows"],
+ bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_lldb_then_gdb(self):
"""Benchmark turnaround time with lldb vs. gdb."""
print()
@@ -35,15 +38,18 @@ class CompileRunToBreakpointBench(BenchBase):
print("lldb turnaround benchmark:", self.stopwatch)
self.run_gdb_turnaround(self.exe, self.function, self.count)
print("gdb turnaround benchmark:", self.stopwatch)
- print("lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg))
+ print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
def run_lldb_turnaround(self, exe, function, count):
import pexpect
+
def run_one_round():
prompt = self.child_prompt
# So that the child gets torn down after the test.
- self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+ self.child = pexpect.spawn(
+ '%s %s %s' %
+ (lldbtest_config.lldbExec, self.lldbOption, exe))
child = self.child
# Turn on logging for what the child sends back.
@@ -62,7 +68,8 @@ class CompileRunToBreakpointBench(BenchBase):
self.stopwatch.reset()
for i in range(count + 1):
- # Ignore the first invoke lldb and run to the breakpoint turnaround time.
+ # Ignore the first invoke lldb and run to the breakpoint turnaround
+ # time.
if i == 0:
run_one_round()
else:
@@ -80,6 +87,7 @@ class CompileRunToBreakpointBench(BenchBase):
def run_gdb_turnaround(self, exe, function, count):
import pexpect
+
def run_one_round():
prompt = self.child_prompt
@@ -102,8 +110,9 @@ class CompileRunToBreakpointBench(BenchBase):
# Reset the stopwatch now.
self.stopwatch.reset()
- for i in range(count+1):
- # Ignore the first invoke lldb and run to the breakpoint turnaround time.
+ for i in range(count + 1):
+ # Ignore the first invoke lldb and run to the breakpoint turnaround
+ # time.
if i == 0:
run_one_round()
else: