BDE 4.14.0 Production release
|
Provide an identifier for a metric.
This component implements an in-core value-semantic type used to identify a metric. A balm::MetricId
object's value is the address of a (non-modifiable) balm::MetricDescription
object. A balm::MetricId
object also provides auxiliary methods, category
, categoryName
, and metricName
, that enables access to the properties of the held balm::MetricDescription
. Two balm::MetricId
objects have the same value if the values of their respective balm::MetricDescription
object addresses are the same.
Bloomberg software may alternatively use the GUTS telemetry API, which is integrated into Bloomberg infrastructure.
balm::MetricId
is const thread-safe, meaning that accessors may be invoked concurrently from different threads, but it is not safe to access or modify a balm::MetricId
in one thread while another thread modifies the same object.
This section illustrates intended use of this component.
The following example demonstrates how to create and use a balm::MetricId
object. We start by creating a category and two metric description objects:
Now we create three balm::MetricId
objects:
We can access and verify the properties of the balm::MetricId
objects we have created:
We now verify that copies of a metric id have the same value as the original:
Note that two balm::MetricId
objects that have different balm::MetricDescription
object addresses are not equal, even if the descriptions have the same name and category.