diff options
author | Evan Martin <martine@danga.com> | 2012-01-05 21:35:47 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-05 22:03:55 (GMT) |
commit | d5165bafdabbfba23d33a5e0ceb9e0e680384183 (patch) | |
tree | 7f61a5d96d62c1f75d60b761b7d1059a0783c2bd /src/graph.cc | |
parent | 9e31e01595656cc2dacd2f97fb6e765799518254 (diff) | |
download | Ninja-d5165bafdabbfba23d33a5e0ceb9e0e680384183.zip Ninja-d5165bafdabbfba23d33a5e0ceb9e0e680384183.tar.gz Ninja-d5165bafdabbfba23d33a5e0ceb9e0e680384183.tar.bz2 |
add a '-d stats' flag for detailed timings
1) Add a system for recording detailed timing info of functions.
2) Add a -d flag for requesting debug info at runtime, with the
above as the first user.
Diffstat (limited to 'src/graph.cc')
-rw-r--r-- | src/graph.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/graph.cc b/src/graph.cc index eb107f2..5c7507a 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -20,11 +20,13 @@ #include "build_log.h" #include "depfile_parser.h" #include "disk_interface.h" +#include "metrics.h" #include "parsers.h" #include "state.h" #include "util.h" bool Node::Stat(DiskInterface* disk_interface) { + METRIC_RECORD("node stat"); mtime_ = disk_interface->Stat(path_); return mtime_ > 0; } @@ -219,6 +221,7 @@ string Edge::GetDescription() { bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface, string* err) { + METRIC_RECORD("depfile load"); string path = EvaluateDepFile(); string content = disk_interface->ReadFile(path, err); if (!err->empty()) |