This example shows how to use the testing.time
utility
to show time information for building a target.
Files:
Our jamroot.jam
specifies the target we build and the
time
declaration to time the
target we build:
import testing ; exe hello : hello.cpp ; time hello.time : hello ;
Import the time rule from the testing module. |
|
The target we are timing just builds a hello program. |
|
This target records the time to build the |
Building the example yields:
> cd /example/time > b2 ...found 9 targets... ...updating 6 targets... common.mkdir bin common.mkdir bin/clang-darwin-4.2.1 common.mkdir bin/clang-darwin-4.2.1/debug clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o clang-darwin.link bin/clang-darwin-4.2.1/debug/hello testing.time bin/clang-darwin-4.2.1/debug/hello.time user: [hello] 0.013509 system: [hello] 0.045641 clock: [hello] 0.000000 ...updated 6 targets...
The actual paths in the bin
sub-directory will depend on your
toolset.