Add a metric id for category and name if not already registered.

Synopsis

Declared in <balm_metricregistry.h>

MetricId
addId(
    char const* category,
    char const* name);

Description

Add the specified category and name to this registry, unless it has already been registered, and return a balm::MetricId object identifying the newly‐registered metric. If the indicated metric has already been registered, the returned balm::MetricId object will not be valid (i.e., isValid will return false). The behavior is undefined unless category and name are null‐terminated.

Return Value

newly‐registered metric id, or an invalid id if already registered

Parameters

Name

Description

category

null‐terminated category name

name

null‐terminated metric name

Created with MrDocs