The script utils/genbench.py
generates a simple benchmark for Waf. The habitual use is the following:
utils/genbench.py /tmp/build 50 100 15 5 cd /tmp/build waf configure waf -p -j2
The project created contains 50 libraries with 100 classes for each, each source file having 15 include headers pointing to the same library and 5 headers pointing to the headers of other libraries in the project.
The time taken to create the tasks and to resolve the dependencies can be obtained by injecting code to disable the actual compilation, for example:
def build(bld): import Task def touch_func(task): for x in task.outputs: open(x.abspath(task.env), 'w').close() for x in Task.TaskBase.classes.keys(): cls = Task.TaskBase.classes[x] cls.func = touch_func cls.color = 'CYAN'