8#ifndef INCLUDED_BALM_METRIC
9#define INCLUDED_BALM_METRIC
12BSLS_IDENT(
"$Id: balm_metric.h,v 1.7 2008/04/17 21:22:34 hversche Exp $")
217#include <balscm_version.h>
296 Metric(
const char *category,
348 void update(
double value);
428 const char *category,
441 const char *category,
481: d_collector_p(lookupCollector(category, name, manager))
483 d_isEnabled_p = (d_collector_p
490: d_collector_p(lookupCollector(metricId, manager))
492 d_isEnabled_p = (d_collector_p
498: d_collector_p(collector)
505: d_collector_p(original.d_collector_p)
506, d_isEnabled_p(original.d_isEnabled_p)
515 d_collector_p->
update(1.0);
523 d_collector_p->
update(value);
541 return d_collector_p;
548 return d_collector_p;
560 return d_isEnabled_p && d_isEnabled_p->
loadRelaxed();
569 return lhs.collector() == rhs.collector();
575 return !(lhs == rhs);
Definition balm_category.h:257
const bsls::AtomicInt & isEnabledRaw() const
Definition balm_category.h:346
Collector * getDefaultCollector(const char *category, const char *metricName)
Definition balm_collectorrepository.h:437
Definition balm_collector.h:152
void accumulateCountTotalMinMax(int count, double total, double min, double max)
Definition balm_collector.h:281
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
void accumulateCountTotalMinMax(int count, double total, double min, double max)
Definition balm_metric.h:528
MetricId metricId() const
Definition balm_metric.h:552
static Collector * lookupCollector(const char *category, const char *name, MetricsManager *manager=0)
Definition balm_metric.h:456
void increment()
Definition balm_metric.h:512
void update(double value)
Definition balm_metric.h:520
bool isActive() const
Definition balm_metric.h:558
~Metric()
Destroy this object.
Metric(const char *category, const char *name, MetricsManager *manager=0)
Definition balm_metric.h:478
Collector * collector()
Return the address of the modifiable collector for this metric.
Definition balm_metric.h:539
Definition balm_metricsmanager.h:490
CollectorRepository & collectorRepository()
Definition balm_metricsmanager.h:1013
Definition bsls_atomic.h:743
int loadRelaxed() const
Definition bsls_atomic.h:1738
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141
bool operator==(const IntegerMetric &lhs, const IntegerMetric &rhs)
bool operator!=(const IntegerMetric &lhs, const IntegerMetric &rhs)
static MetricsManager * manager(MetricsManager *manager=0)
Definition balm_defaultmetricsmanager.h:302
Definition balm_metric.h:415
static void getCollector(Collector **collector, CategoryHolder *holder, const char *category, const char *metric, PublicationType::Value preferredPublicationType)
static void getCollector(Collector **collector, CategoryHolder *holder, const char *category, const char *metric)
Value
Definition balm_publicationtype.h:81