summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2013-07-11 00:43:29 (GMT)
committerNico Weber <thakis@chromium.org>2013-07-11 00:43:29 (GMT)
commit4c7802baf8ddead0cbfddefb1f9fa3587c6dd089 (patch)
treef19457b24d6d65a4a8b06734a2c362a1b9dfc2cb
parentadaa91a33eb2cf23b88333b5cc2e2e456a5f1803 (diff)
downloadNinja-4c7802baf8ddead0cbfddefb1f9fa3587c6dd089.zip
Ninja-4c7802baf8ddead0cbfddefb1f9fa3587c6dd089.tar.gz
Ninja-4c7802baf8ddead0cbfddefb1f9fa3587c6dd089.tar.bz2
Let the ".ninja parse" metric include the time to read the toplevel ninja file.
Loads of included ninja files were covered by the ".ninja parse" in Parse() further up the stack from the toplevel file, but the load of the toplevel file wasn't counted. Fix that.
-rw-r--r--src/manifest_parser.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/manifest_parser.cc b/src/manifest_parser.cc
index 88c16ab..f5e7eac 100644
--- a/src/manifest_parser.cc
+++ b/src/manifest_parser.cc
@@ -30,6 +30,7 @@ ManifestParser::ManifestParser(State* state, FileReader* file_reader)
}
bool ManifestParser::Load(const string& filename, string* err) {
+ METRIC_RECORD(".ninja parse");
string contents;
string read_err;
if (!file_reader_->ReadFile(filename, &contents, &read_err)) {
@@ -41,7 +42,6 @@ bool ManifestParser::Load(const string& filename, string* err) {
bool ManifestParser::Parse(const string& filename, const string& input,
string* err) {
- METRIC_RECORD(".ninja parse");
lexer_.Start(filename, input);
for (;;) {