8#ifndef INCLUDED_BALM_STOPWATCHSCOPEDGUARD
9#define INCLUDED_BALM_STOPWATCHSCOPEDGUARD
196#include <balscm_version.h>
243#ifndef BDE_OMIT_INTERNAL_DEPRECATED
365StopwatchScopedGuard::StopwatchScopedGuard(
Metric *metric,
368, d_timeUnits(timeUnits)
369, d_collector_p(metric->isActive() ? metric->collector() : 0)
377StopwatchScopedGuard::StopwatchScopedGuard(
Collector *collector,
380, d_timeUnits(timeUnits)
381, d_collector_p((collector && collector->metricId().category()->enabled())
391StopwatchScopedGuard::StopwatchScopedGuard(
const MetricId& metricId,
394, d_timeUnits(k_SECONDS)
398 d_collector_p = (collector &&
407StopwatchScopedGuard::StopwatchScopedGuard(
const MetricId& metricId,
411, d_timeUnits(timeUnits)
415 d_collector_p = (collector &&
424StopwatchScopedGuard::StopwatchScopedGuard(
const char *category,
428, d_timeUnits(k_SECONDS)
433 d_collector_p = (collector &&
443StopwatchScopedGuard::StopwatchScopedGuard(
const char *category,
448, d_timeUnits(timeUnits)
471 return 0 != d_collector_p
bool enabled() const
Definition balm_category.h:340
Definition balm_collector.h:152
const MetricId & metricId() const
Definition balm_collector.h:308
void update(double value)
Definition balm_collector.h:271
Definition balm_metricid.h:162
const Category * category() const
Definition balm_metricid.h:319
Definition balm_metric.h:250
static Collector * lookupCollector(const char *category, const char *name, MetricsManager *manager=0)
Definition balm_metric.h:456
Definition balm_metricsmanager.h:490
Definition balm_stopwatchscopedguard.h:232
~StopwatchScopedGuard()
Definition balm_stopwatchscopedguard.h:460
Units
Definition balm_stopwatchscopedguard.h:236
@ k_MICROSECONDS
Definition balm_stopwatchscopedguard.h:240
@ BAEM_NANOSECONDS
Definition balm_stopwatchscopedguard.h:244
@ BAEM_MICROSECONDS
Definition balm_stopwatchscopedguard.h:245
@ MICROSECONDS
Definition balm_stopwatchscopedguard.h:249
@ BAEM_MILLISECONDS
Definition balm_stopwatchscopedguard.h:246
@ SECONDS
Definition balm_stopwatchscopedguard.h:251
@ BAEM_SECONDS
Definition balm_stopwatchscopedguard.h:247
@ NANOSECONDS
Definition balm_stopwatchscopedguard.h:248
@ k_SECONDS
Definition balm_stopwatchscopedguard.h:242
@ k_MILLISECONDS
Definition balm_stopwatchscopedguard.h:241
@ k_NANOSECONDS
Definition balm_stopwatchscopedguard.h:239
@ MILLISECONDS
Definition balm_stopwatchscopedguard.h:250
bool isActive() const
Definition balm_stopwatchscopedguard.h:469
Definition bsls_stopwatch.h:149
void start(bool collectCpuTimes=false)
Definition bsls_stopwatch.h:348
double elapsedTime() const
Definition bsls_stopwatch.h:427
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141