BloombergLP::balm::IntegerMetric_MacroImp::getCollector

Load a default integer collector, register its category holder, and set preferred publication type.

Synopsis

Declared in <balm_integermetric.h>

static
void
getCollector(
    IntegerCollector** collector,
    CategoryHolder* holder,
    char const* category,
    char const* metric,
    PublicationType::Value preferredPublicationType);

Description

Load the specified collector with the address of the default integer collector (from the default metrics manager) for the specified metric identified by the specified category and name, register the specified holder for category, and set the identified metric's preferred publication type to the specified preferredPublicationType. Note that *collector must be assigned before holder to ensure that the macros always have a valid collector when holder->enabled() is true.

Parameters

NameDescription
collectorreceives the address of the default integer collector
holdercategory holder to register for category
categorynull-terminated metric category name
metricnull-terminated metric name
preferredPublicationTypepreferred publication type for the metric