Ninja
Public Member Functions | Private Attributes
ScopedMetric Struct Reference

A scoped object for recording a metric across the body of a function. More...

#include <metrics.h>

List of all members.

Public Member Functions

 ScopedMetric (Metric *metric)
 ~ScopedMetric ()

Private Attributes

Metricmetric_
int64_t start_
 Timestamp when the measurement started.

Detailed Description

A scoped object for recording a metric across the body of a function.

Used by the METRIC_RECORD macro.

Definition at line 39 of file metrics.h.


Constructor & Destructor Documentation

ScopedMetric::ScopedMetric ( Metric metric) [explicit]

Definition at line 76 of file metrics.cc.

References metric_, and start_.

Definition at line 82 of file metrics.cc.

References Metric::count, metric_, start_, and Metric::sum.


Member Data Documentation

Definition at line 44 of file metrics.h.

Referenced by ScopedMetric(), and ~ScopedMetric().

Timestamp when the measurement started.

Value is platform-dependent.

Definition at line 47 of file metrics.h.

Referenced by ScopedMetric(), and ~ScopedMetric().


The documentation for this struct was generated from the following files: