formatStats

Format data members from a struct or a class, with an additional struct or class to fetch label names and values from, into a string that can be added to a stat collection buffer for exporting to prometheus.

  1. void formatStats(ValuesT values, mstring buffer)
  2. void formatStats(ValuesT values, LabelT label_val, mstring buffer)
  3. void formatStats(ValuesT values, LabelsT labels, mstring buffer)
    static
    void
    formatStats
    (
    ValuesT
    LabelsT
    )
    (
    ValuesT values
    ,
    LabelsT labels
    ,)

Parameters

ValuesT

The struct or class type to fetch the stat names from.

LabelsT

The struct or class type to fetch the label names from.

values ValuesT

The struct or class to fetch stat values from.

labels LabelsT

The struct or class holding the label values to annotate the stats with.

buffer mstring

The buffer to add the formatted stats to.

Meta