summaryrefslogtreecommitdiffstats
path: root/src/build_log.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-05-09 23:24:24 (GMT)
committerEvan Martin <martine@danga.com>2011-05-11 18:29:01 (GMT)
commitfa8830b546428e1daa829d0ddf2465697e0d9bb3 (patch)
treee824209be8b0276109ae419ef024e28b59ec35bd /src/build_log.h
parent3f7f99fbb5b064f2850543cf5574a6dc2b8d3a9d (diff)
downloadNinja-fa8830b546428e1daa829d0ddf2465697e0d9bb3.zip
Ninja-fa8830b546428e1daa829d0ddf2465697e0d9bb3.tar.gz
Ninja-fa8830b546428e1daa829d0ddf2465697e0d9bb3.tar.bz2
add a versioning header to build log, switch to v2
In v2 we store both the start and end time of the command. This allows better visualization of the build process.
Diffstat (limited to 'src/build_log.h')
-rw-r--r--src/build_log.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/build_log.h b/src/build_log.h
index 5d8d6a2..81a745f 100644
--- a/src/build_log.h
+++ b/src/build_log.h
@@ -35,7 +35,7 @@ struct BuildLog {
void SetConfig(BuildConfig* config) { config_ = config; }
bool OpenForWrite(const string& path, string* err);
- void RecordCommand(Edge* edge, int time_ms);
+ void RecordCommand(Edge* edge, int start_time, int end_time);
void Close();
/// Load the on-disk log.
@@ -44,9 +44,13 @@ struct BuildLog {
struct LogEntry {
string output;
string command;
- int time_ms;
+ int start_time;
+ int end_time;
+
+ // Used by tests.
bool operator==(const LogEntry& o) {
- return output == o.output && command == o.command && time_ms == o.time_ms;
+ return output == o.output && command == o.command &&
+ start_time == o.start_time && end_time == o.end_time;
}
};