Merge pull request #4434 from jcbrill/jbrill-msvc-normalize
[scons.git] / timings / JTimer / TimeSCons-run.py
blob7fe1bf408e71fa2381d61531140200b3cf11ab1d
2 # __COPYRIGHT__
4 # Permission is hereby granted, free of charge, to any person obtaining
5 # a copy of this software and associated documentation files (the
6 # "Software"), to deal in the Software without restriction, including
7 # without limitation the rights to use, copy, modify, merge, publish,
8 # distribute, sublicense, and/or sell copies of the Software, and to
9 # permit persons to whom the Software is furnished to do so, subject to
10 # the following conditions:
12 # The above copyright notice and this permission notice shall be included
13 # in all copies or substantial portions of the Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
16 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
17 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 """
25 This configuration is for timing how we evaluate long chains of
26 dependencies, specifically when -j is used.
28 We set up a chain of $TARGET_COUNT targets that get built from a
29 Python function action with no source files (equivalent to "echo junk >
30 $TARGET"). Each target explicitly depends on the next target in turn,
31 so the Taskmaster will do a deep walk of the dependency graph.
33 This test case was contributed by Kevin Massey. Prior to revision 1468,
34 we had a serious O(N^2) problem in the Taskmaster when handling long
35 dependency chains like this. That was fixed by adding reference counts
36 to the Taskmaster so it could be smarter about not re-evaluating Nodes.
37 """
39 import TestSCons
41 # Full-build time of just under 10 seconds on ubuntu-timings slave,
42 # as determined by bin/calibrate.py on 9 December 2009:
44 # run 1: 3.211: TARGET_COUNT=50
45 # run 2: 11.920: TARGET_COUNT=155
46 # run 3: 9.182: TARGET_COUNT=130
47 # run 4: 10.185: TARGET_COUNT=141
48 # run 5: 9.945: TARGET_COUNT=138
49 # run 6: 10.035: TARGET_COUNT=138
50 # run 7: 9.898: TARGET_COUNT=137
51 # run 8: 9.840: TARGET_COUNT=137
52 # run 9: 10.054: TARGET_COUNT=137
53 # run 10: 9.747: TARGET_COUNT=136
54 # run 11: 9.778: TARGET_COUNT=136
55 # run 12: 9.743: TARGET_COUNT=136
57 # The fact that this varies so much suggests that it's pretty
58 # non-deterministic, which makes sense for a test involving -j.
60 test = TestSCons.TimeSCons(variables={'TARGET_COUNT':136})
62 test.main()
64 test.pass_test()