diff options
author | Colin Cross <ccross@android.com> | 2017-05-22 18:27:14 (GMT) |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-05-22 18:27:21 (GMT) |
commit | 036003d20e80cbb044a3f0f0b41e2fdefcde66af (patch) | |
tree | 76adc0be97078012d76a41af276a60ca8f5be596 /src | |
parent | 2fc5b9e34bc38c7a8c4c33f39990f847325beffd (diff) | |
download | Ninja-036003d20e80cbb044a3f0f0b41e2fdefcde66af.zip Ninja-036003d20e80cbb044a3f0f0b41e2fdefcde66af.tar.gz Ninja-036003d20e80cbb044a3f0f0b41e2fdefcde66af.tar.bz2 |
Move stat metric to DiskInterface
Stat is not always used through Node::Stat, it is often used directly
through DiskInterface. THe next patches will cause it to be called
even more often through DiskInterface, so move the metrics to
DiskInterface.
Diffstat (limited to 'src')
-rw-r--r-- | src/disk_interface.cc | 2 | ||||
-rw-r--r-- | src/graph.cc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/disk_interface.cc b/src/disk_interface.cc index 1b4135f..b418e04 100644 --- a/src/disk_interface.cc +++ b/src/disk_interface.cc @@ -28,6 +28,7 @@ #include <direct.h> // _mkdir #endif +#include "metrics.h" #include "util.h" namespace { @@ -148,6 +149,7 @@ bool DiskInterface::MakeDirs(const string& path) { // RealDiskInterface ----------------------------------------------------------- TimeStamp RealDiskInterface::Stat(const string& path, string* err) const { + METRIC_RECORD("node stat"); #ifdef _WIN32 // MSDN: "Naming Files, Paths, and Namespaces" // http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx diff --git a/src/graph.cc b/src/graph.cc index b4c8619..76d996b 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -28,7 +28,6 @@ #include "util.h" bool Node::Stat(DiskInterface* disk_interface, string* err) { - METRIC_RECORD("node stat"); return (mtime_ = disk_interface->Stat(path_, err)) != -1; } |