diff options
author | Steven Knight <knight@baldmt.com> | 2009-11-19 08:03:26 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-11-19 08:03:26 +0000 |
commit | fec041d9455395078ffe133c7c6dc7db55daef91 (patch) | |
tree | ce6a93f58cf7d94d174279509431ccb8d51810d7 /timings/JTimer | |
parent | bc761ce58d969404bdfc7e099ad38c403e928c33 (diff) | |
download | scons-fec041d9455395078ffe133c7c6dc7db55daef91.tar.gz |
Capture initial infrastructure for working performance tests.
Diffstat (limited to 'timings/JTimer')
-rw-r--r-- | timings/JTimer/SConstruct | 21 | ||||
-rw-r--r-- | timings/JTimer/TimeSCons-run.py (renamed from timings/JTimer/st.conf) | 35 |
2 files changed, 18 insertions, 38 deletions
diff --git a/timings/JTimer/SConstruct b/timings/JTimer/SConstruct index e1e38d20..95764a63 100644 --- a/timings/JTimer/SConstruct +++ b/timings/JTimer/SConstruct @@ -21,33 +21,18 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -""" -This configuration is for timing how we evaluate long chains of -dependencies, specifically when -j is used. - -We set up a chain of 100 targets that get built from a Python function -action with no source files (equivalent to "echo junk > $TARGET"). -Each target explicitly depends on the next target in turn, so the -Taskmaster will do a deep walk of the dependency graph. - -This test case was contributed by Kevin Massey. Prior to revision 1468, -we had a serious O(N^2) problem in the Taskmaster when handling long -dependency chains like this. That was fixed by adding reference counts -to the Taskmaster so it could be smarter about not re-evaluating Nodes. -""" - -target_cnt = 100 +target_count = int(ARGUMENTS['TARGET_COUNT']) env = Environment() def write_file( env, target, source ): - path_target = env.File( target ).path + path_target = env.File( target )[0].path outfile = open( path_target, 'w' ) outfile.write( 'junk' ) outfile.close() list = [] -for i in range( target_cnt ): +for i in range( target_count ): target = 'target_%03d' % i env.Command( target, [], write_file ) env.Depends( target, list ) diff --git a/timings/JTimer/st.conf b/timings/JTimer/TimeSCons-run.py index cf1ecbfe..36b016f1 100644 --- a/timings/JTimer/st.conf +++ b/timings/JTimer/TimeSCons-run.py @@ -22,27 +22,22 @@ # """ -scons-time.py configuration file for the "JTimer" timing test. -""" +This configuration is for timing how we evaluate long chains of +dependencies, specifically when -j is used. + +We set up a chain of 500 targets that get built from a Python function +action with no source files (equivalent to "echo junk > $TARGET"). +Each target explicitly depends on the next target in turn, so the +Taskmaster will do a deep walk of the dependency graph. -archive_list = [ 'SConstruct' ] -subdir = '.' -targets = '-j2' +This test case was contributed by Kevin Massey. Prior to revision 1468, +we had a serious O(N^2) problem in the Taskmaster when handling long +dependency chains like this. That was fixed by adding reference counts +to the Taskmaster so it could be smarter about not re-evaluating Nodes. +""" -import sys -sys.path.insert(0, '..') -import SCons_Bars +import TestSCons -revs = [ - 1261, # Fix -j re-scanning built files for implicit deps. - 1307, # Move signature Node tranlation of rel_paths into the class. - 1407, # Use a Dir scanner instead of a hard-coded method. - 1435, # Don't prep .sconsign dependencies until needed. - 1468, # Use waiting-Node reference counts to speed up Taskmaster. - 1703, # Lobotomize Memoizer. - 1706, # Fix _doLookup value-cache misspellings. - 2380, # The Big Signature Refactoring hits branches/core. -] +target_count = 500 -vertical_bars = SCons_Bars.Release_Bars.gnuplot(labels=True) + \ - SCons_Bars.Revision_Bars.gnuplot(labels=False, revs=revs) +TestSCons.TimeSCons().main(options='TARGET_COUNT=%d' % target_count) |