8#ifndef INCLUDED_BALM_COLLECTORREPOSITORY
9#define INCLUDED_BALM_COLLECTORREPOSITORY
143#include <balscm_version.h>
159#include <bsl_memory.h>
160#include <bsl_vector.h>
170class CollectorRepository_MetricCollectors;
191 typedef CollectorRepository_MetricCollectors MetricCollectors;
226 template <
class VECTOR>
227 void collectAndResetImp(VECTOR *records,
235 template <
class VECTOR>
236 void collectImp(VECTOR *records,
246 MetricCollectors& getMetricCollectors(
const MetricId& metricId);
271#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
282 void collect(std::vector<MetricRecord> *records,
284#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
285 void collect(std::pmr::vector<MetricRecord> *records,
306 const char *metricName);
327 const char *metricName);
346 const char *metricName);
365 const char *category,
366 const char *metricName);
383#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
422: d_registry_p(registry)
423, d_collectors(basicAllocator)
424, d_categories(basicAllocator)
426, d_allocator_p(
bslma::Default::allocator(basicAllocator))
438 const char *metricName)
445 const char *category,
446 const char *metricName)
454 const char *category,
455 const char *metricName)
463 const char *metricName)
471 return *d_registry_p;
478 return *d_registry_p;
Definition balm_category.h:151
Definition balm_collectorrepository.h:184
Collector * getDefaultCollector(const MetricId &metricId)
MetricRegistry & registry()
Definition balm_collectorrepository.h:469
int getAddedCollectors(bsl::vector< bsl::shared_ptr< Collector > > *collectors, bsl::vector< bsl::shared_ptr< IntegerCollector > > *intCollectors, const MetricId &metricId)
IntegerCollector * getDefaultIntegerCollector(const char *category, const char *metricName)
Definition balm_collectorrepository.h:444
int getAddedCollectors(std::vector< bsl::shared_ptr< Collector > > *collectors, std::vector< bsl::shared_ptr< IntegerCollector > > *intCollectors, const MetricId &metricId)
bsl::shared_ptr< Collector > addCollector(const MetricId &metricId)
void collect(bsl::vector< MetricRecord > *records, const Category *category)
IntegerCollector * getDefaultIntegerCollector(const MetricId &metricId)
bsl::shared_ptr< IntegerCollector > addIntegerCollector(const char *category, const char *metricName)
Definition balm_collectorrepository.h:462
bsl::shared_ptr< Collector > addCollector(const char *category, const char *metricName)
Definition balm_collectorrepository.h:453
bsl::shared_ptr< IntegerCollector > addIntegerCollector(const MetricId &metricId)
void collectAndReset(bsl::vector< MetricRecord > *records, const Category *category)
Collector * getDefaultCollector(const char *category, const char *metricName)
Definition balm_collectorrepository.h:437
void collectAndReset(std::vector< MetricRecord > *records, const Category *category)
~CollectorRepository()
Free all the collectors in this repository and destroy this object.
Definition balm_collectorrepository.h:431
BSLMF_NESTED_TRAIT_DECLARATION(CollectorRepository, bslma::UsesBslmaAllocator)
void collect(std::vector< MetricRecord > *records, const Category *category)
Definition balm_collector.h:152
Definition balm_integercollector.h:151
Definition balm_metricid.h:162
Definition balm_metricregistry.h:180
MetricId getId(const char *category, const char *name)
Definition bslstl_map.h:619
Definition bslstl_sharedptr.h:1830
Definition bslstl_vector.h:1025
Definition bslma_allocator.h:457
Definition bslmt_rwmutex.h:147
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141
Definition balxml_encoderoptions.h:68
Definition bslma_usesbslmaallocator.h:343