Ninja
Public Member Functions | Private Attributes | List of all members
ScopedMetric Struct Reference

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

#include <metrics.h>

Public Member Functions

 ScopedMetric (Metric *metric)
 
 ~ScopedMetric ()
 

Private Attributes

Metricmetric_
 
int64_t start_
 Timestamp when the measurement started. More...
 

Detailed Description

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

Used by the METRIC_RECORD macro.

Definition at line 37 of file metrics.h.

Constructor & Destructor Documentation

◆ ScopedMetric()

ScopedMetric::ScopedMetric ( Metric metric)
explicit

Definition at line 57 of file metrics.cc.

◆ ~ScopedMetric()

ScopedMetric::~ScopedMetric ( )

Definition at line 63 of file metrics.cc.

Member Data Documentation

◆ metric_

Metric* ScopedMetric::metric_
private

Definition at line 42 of file metrics.h.

◆ start_

int64_t ScopedMetric::start_
private

Timestamp when the measurement started.

Value is platform-dependent.

Definition at line 45 of file metrics.h.


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