Set the format specification for one aggregate of a metric.
Declared in <balm_configurationutil.h>
static
int
setFormatSpec(
char const* category,
char const* metricName,
PublicationType::Value publicationType,
MetricFormatSpec const& formatSpec,
MetricsManager* manager = 0);
Set the format specification for the metric aggregate indicated by the specified category, metricName, and publicationType to the specified formatSpec. Optionally specify a metrics manager to configure. If manager is 0, configure the default metrics manager; if manager is 0 and the default metrics manager has not been initialized, this method has no effect. Return 0 on success, or a non-zero value if manager is 0 and the default metrics manager has not been initialized. If a MetricId does not exist for category and metricName, create one and add it to the metric registry of the indicated metrics manager. For example a publication type of e_AVG, and a format spec with a scale of 1000.0 and a format of "%.2f ms", indicates that the average value of the indicated metric should be formatted by scaling the value by 1000 and then rounding the value to the second decimal place and appending " ms".
0 on success, or a non-zero value if manager is 0 and the default metrics manager has not been initialized
| Name | Description |
|---|---|
| category | category of the metric to format |
| metricName | name of the metric to format |
| publicationType | publication aggregate whose format is set |
| formatSpec | format specification to apply |
| manager | metrics manager to configure; 0 uses the default |