Commit Graph

7 Commits

Author SHA1 Message Date
Johnny Chen 6acfb690b5 Tests decorated with @benchmarks_test do not participate in the remote-macosx test suite run.
But, still, tearDown() should call super.tearDown(), not super.setUp(). :-)

llvm-svn: 155170
2012-04-19 23:50:00 +00:00
Johnny Chen 09e87a6622 Add display of min and max samples to Stopwatch's string representation.
llvm-svn: 143087
2011-10-27 00:32:03 +00:00
Johnny Chen 2a6eab04b1 Up until now, we have been using pexpect to spawn an lldb process and use lldb commands to
bring the debugger to the desired state.

This patch makes BenchBase inherit from TestBase, instead of Base (which is a parent class of
TestBase).  This is so that we can also enjoy the Pythonic way of bringing the lldb debugger
to a desired state before running the benchmark and collect statistics.

llvm-svn: 142562
2011-10-20 01:35:57 +00:00
Johnny Chen aaa82ff9ad Add the real benchmarks comparing lldb against gdb for repeated expression evaluations.
Modify lldbbench.py so that lldbtest.line_number() utility function is available to
BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec
(the full path for the 'lldb' executable) is available to BenchBase client as well.

An example run of the test case on my MacBook Pro running Lion:

1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase)
   Test repeated expressions with lldb vs. gdb. ... 
lldb_avg: 0.204339
gdb_avg: 0.205721
lldb_avg/gdb_avg: 0.993284
ok

llvm-svn: 136740
2011-08-02 22:54:37 +00:00
Johnny Chen da0384c90e Simple renaming: self.swatch -> self.stopwatch.
llvm-svn: 136666
2011-08-02 00:50:55 +00:00
Johnny Chen 2352af85f9 Add a Stopwatch utility class to lldbench.py module and initialize an instance of
Stopwatch (self.swatch) within the BenchBase's setUp() instance method to be available
to all the child classes.

Use self.swatch to measure elapsed time in TestRepeatedExprs.py, which needs to be
modified later on to actually measure repeated expression evaluations within the
context of lldb as well as gdb.

llvm-svn: 136664
2011-08-02 00:43:09 +00:00
Johnny Chen 985e740cd9 Add an abstract base class called BenchBase to be inherited by benchmark tests.
Modify the example TestRepeatedExprs.py to use BenchBase, instead.

llvm-svn: 136649
2011-08-01 21:13:26 +00:00