Ninja
|
Go to the source code of this file.
Classes | |
struct | Metric |
The Metrics module is used for the debug mode that dumps timing stats of various actions. More... | |
struct | Metrics |
The singleton that stores metrics and prints the report. More... | |
struct | ScopedMetric |
A scoped object for recording a metric across the body of a function. More... | |
struct | Stopwatch |
A simple stopwatch which returns the time in seconds since Restart() was called. More... | |
Macros | |
#define | METRIC_RECORD(name) |
The primary interface to metrics. More... | |
Functions | |
int64_t | GetTimeMillis () |
Get the current time as relative to some epoch. More... | |
Variables | |
Metrics * | g_metrics |
#define METRIC_RECORD | ( | name | ) |
The primary interface to metrics.
Use METRIC_RECORD("foobar") at the top of a function to get timing stats recorded for each call of the function.
Definition at line 85 of file metrics.h.
Referenced by CanonicalizePath(), Builder::FinishCommand(), BuildLog::Load(), DepsLog::Load(), ImplicitDepLoader::LoadDepFile(), State::LookupNode(), ManifestParser::Parse(), BuildLog::Recompact(), DepsLog::Recompact(), Builder::StartEdge(), and Node::Stat().
int64_t GetTimeMillis | ( | ) |
Get the current time as relative to some epoch.
Epoch varies between platforms; only useful for measuring elapsed time.
Definition at line 122 of file metrics.cc.
Referenced by BuildStatus::BuildEdgeFinished(), BuildStatus::BuildEdgeStarted(), and main().
Metrics* g_metrics |
Definition at line 29 of file metrics.cc.