8#ifndef INCLUDED_BALM_METRICSMANAGER
9#define INCLUDED_BALM_METRICSMANAGER
437#include <balscm_version.h>
453#include <bsl_functional.h>
455#include <bsl_memory.h>
457#include <bsl_vector.h>
471class MetricsManager_PublisherRegistry;
472class MetricsManager_CallbackRegistry;
473struct MetricsManager_PublicationHelper;
558#ifndef BDE_OMIT_INTERNAL_DEPRECATED
593 const Category *
const categories[],
595 bool resetFlag =
false);
631 const char *categoryName,
710 bool resetFlag =
false);
738 const Category *
const categories[],
740 bool resetFlag =
false);
765 bool resetFlag =
true);
768 bool resetFlag =
true);
789 void publish(
const std::set<const Category *>& categories,
790 bool resetFlag =
true);
791#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
792 void publish(
const std::pmr::set<const Category *>& categories,
793 bool resetFlag =
true);
815 bool resetFlag =
true);
832 void publishAll(
const std::set<const Category *>& excludedCategories,
833 bool resetFlag =
true);
834#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
835 void publishAll(
const std::pmr::set<const Category *>& excludedCategories,
836 bool resetFlag =
true);
869 bool isEnabled =
true);
913#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
923 const char *categoryName)
const;
925 const char *categoryName)
const;
926#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
928 std::pmr::vector<Publisher *> *publishers,
929 const char *categoryName)
const;
942#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
974 const char *categoryName,
984 const char *categoryName,
1003 d_metricRegistry.
getCategory(category), isEnabled);
1015 return d_collectors;
1021 return d_metricRegistry;
1029 const char *categoryName)
const
1037 std::vector<Publisher *> *publishers,
1038 const char *categoryName)
const
1044#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
1047 std::pmr::vector<Publisher *> *publishers,
1048 const char *categoryName)
const
1056const CollectorRepository&
1059 return d_collectors;
1065 return d_metricRegistry;
Definition balm_category.h:151
Definition balm_collectorrepository.h:184
Definition balm_metricregistry.h:180
void setCategoryEnabled(const Category *category, bool value)
const Category * getCategory(const char *category)
void setAllCategoriesEnabled(bool value)
const Category * findCategory(const char *category) const
Definition balm_metricsample.h:342
Definition balm_metricsmanager.h:490
MetricsManager(bslma::Allocator *basicAllocator=0)
bsl::function< void(bsl::vector< MetricRecord > *, bool)> RecordsCollectionCallback
Definition balm_metricsmanager.h:506
CallbackHandle registerCollectionCallback(const Category *category, const RecordsCollectionCallback &callback)
void setAllCategoriesEnabled(bool value)
Definition balm_metricsmanager.h:1007
int CallbackHandle
Identifies a registered RecordsCollectionCallback.
Definition balm_metricsmanager.h:509
int findGeneralPublishers(bsl::vector< Publisher * > *publishers) const
int addSpecificPublisher(const char *categoryName, const bsl::shared_ptr< Publisher > &publisher)
Definition balm_metricsmanager.h:983
int addGeneralPublisher(const bsl::shared_ptr< Publisher > &publisher)
int findSpecificPublishers(bsl::vector< Publisher * > *publishers, const Category *category) const
int removePublisher(const Publisher *publisher)
void collectSample(MetricSample *sample, bsl::vector< MetricRecord > *records, bool resetFlag=false)
void publish(const Category *category, bool resetFlag=true)
@ BAEM_INVALID_HANDLE
Definition balm_metricsmanager.h:559
@ e_INVALID_HANDLE
Definition balm_metricsmanager.h:557
void publish(const bsl::set< const Category * > &categories, bool resetFlag=true)
~MetricsManager()
Destroy this MetricsManager.
void publish(const Category *const categories[], int numCategories, bool resetFlag=true)
CollectorRepository & collectorRepository()
Definition balm_metricsmanager.h:1013
int findGeneralPublishers(std::vector< Publisher * > *publishers) const
int removePublisher(const bsl::shared_ptr< Publisher > &publisher)
int removeCollectionCallback(CallbackHandle handle)
void publishAll(bool resetFlag=true)
void publish(const std::set< const Category * > &categories, bool resetFlag=true)
void publishAll(const std::set< const Category * > &excludedCategories, bool resetFlag=true)
MetricRegistry & metricRegistry()
Definition balm_metricsmanager.h:1019
void publishAll(const bsl::set< const Category * > &excludedCategories, bool resetFlag=true)
int findSpecificPublishers(std::vector< Publisher * > *publishers, const Category *category) const
void setCategoryEnabled(const char *category, bool isEnabled=true)
Definition balm_metricsmanager.h:999
void collectSample(MetricSample *sample, bsl::vector< MetricRecord > *records, const Category *const categories[], int numCategories, bool resetFlag=false)
friend struct MetricsManager_PublicationHelper
Definition balm_metricsmanager.h:547
int findSpecificPublishers(bsl::vector< Publisher * > *publishers, const char *categoryName) const
Definition balm_metricsmanager.h:1027
CallbackHandle registerCollectionCallback(const char *categoryName, const RecordsCollectionCallback &callback)
Definition balm_metricsmanager.h:973
BSLMF_NESTED_TRAIT_DECLARATION(MetricsManager, bslma::UsesBslmaAllocator)
int addSpecificPublisher(const Category *category, const bsl::shared_ptr< Publisher > &publisher)
Definition balm_publisher.h:276
Forward declaration.
Definition bslstl_function.h:934
Definition bslstl_map.h:619
Definition bslstl_set.h:657
Definition bslstl_sharedptr.h:1830
Definition bslstl_vector.h:1025
Definition bslma_allocator.h:457
Definition bslma_managedptr.h:1182
Definition bslmt_mutex.h:315
Definition bslmt_rwmutex.h:147
Definition bsls_timeinterval.h:301
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141
Definition bslma_usesbslmaallocator.h:343