summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-10-26 00:35:10 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-10-26 00:35:10 +0000
commit6e5b330fb4ee74b2c93c4ba10abc555e86fd240f (patch)
tree7df8e5e0c22f9daae26618f87d88f6bcef284b74
parent6ebf401412484c3d741a0f74c61cad7516d7ad8c (diff)
downloadbcm5719-llvm-6e5b330fb4ee74b2c93c4ba10abc555e86fd240f.tar.gz
bcm5719-llvm-6e5b330fb4ee74b2c93c4ba10abc555e86fd240f.zip
Add another metric for startup delay -- run to breakpoint, which measures the time from issuing
the run command till the first breakpoint hit. Example: $ ./dotest.py -v +b -n -x '-F Driver::MainLoop()' -p TestStartupDelays.py 1: test_startup_delay (TestStartupDelays.StartupDelaysBench) Test start up delays creating a target and setting a breakpoint. ... lldb startup delay (create fresh target) benchmark: Avg: 0.124496 (Laps: 30, Total Elapsed Time: 3.734883) lldb startup delay (set first breakpoint) benchmark: Avg: 0.220828 (Laps: 30, Total Elapsed Time: 6.624847) lldb startup delay (run to breakpoint) benchmark: Avg: 0.478159 (Laps: 30, Total Elapsed Time: 14.344774) ok llvm-svn: 142993
-rw-r--r--lldb/test/benchmarks/startup/TestStartupDelays.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/test/benchmarks/startup/TestStartupDelays.py b/lldb/test/benchmarks/startup/TestStartupDelays.py
index 1a15a917cdd..f770b31dfa3 100644
--- a/lldb/test/benchmarks/startup/TestStartupDelays.py
+++ b/lldb/test/benchmarks/startup/TestStartupDelays.py
@@ -15,6 +15,8 @@ class StartupDelaysBench(BenchBase):
# Create self.stopwatch2 for measuring "set first breakpoint".
# The default self.stopwatch is for "create fresh target".
self.stopwatch2 = Stopwatch()
+ # Create self.stopwatch3 for measuring "run to breakpoint".
+ self.stopwatch3 = Stopwatch()
if lldb.bmExecutable:
self.exe = lldb.bmExecutable
else:
@@ -35,6 +37,7 @@ class StartupDelaysBench(BenchBase):
self.run_startup_delays_bench(self.exe, self.break_spec, self.count)
print "lldb startup delay (create fresh target) benchmark:", self.stopwatch
print "lldb startup delay (set first breakpoint) benchmark:", self.stopwatch2
+ print "lldb startup delay (run to breakpoint) benchmark:", self.stopwatch3
def run_startup_delays_bench(self, exe, break_spec, count):
# Set self.child_prompt, which is "(lldb) ".
@@ -63,6 +66,11 @@ class StartupDelaysBench(BenchBase):
child.sendline('breakpoint set %s' % break_spec)
child.expect_exact(prompt)
+ with self.stopwatch3:
+ # Run to the breakpoint just set.
+ child.sendline('run')
+ child.expect_exact(prompt)
+
child.sendline('quit')
try:
self.child.expect(pexpect.EOF)
OpenPOWER on IntegriCloud