summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-05-01 15:42:35 (GMT)
committerNico Weber <nicolasweber@gmx.de>2012-05-01 15:42:35 (GMT)
commit71224a9953341368aa03efcf5c4fb557ae809568 (patch)
tree6e38a86c169ac603b645cf9f233e7dfedaa2e3d1 /src/build_log.cc
parent4d1674f37a0a3aeaa8be6bcce66555871cba8995 (diff)
downloadNinja-71224a9953341368aa03efcf5c4fb557ae809568.zip
Ninja-71224a9953341368aa03efcf5c4fb557ae809568.tar.gz
Ninja-71224a9953341368aa03efcf5c4fb557ae809568.tar.bz2
Add .ninja_log load time to metrics.
On my system, it takes 22% of the empty build time for chrome.
Diffstat (limited to 'src/build_log.cc')
-rw-r--r--src/build_log.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 0cecd70..4ad005f 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -21,6 +21,7 @@
#include "build.h"
#include "graph.h"
+#include "metrics.h"
#include "util.h"
// Implementation details:
@@ -104,6 +105,7 @@ void BuildLog::Close() {
}
bool BuildLog::Load(const string& path, string* err) {
+ METRIC_RECORD(".ninja_log load");
FILE* file = fopen(path.c_str(), "r");
if (!file) {
if (errno == ENOENT)