formatStats

Format data members from a struct or a class, with a additional label name and value, 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)
    static
    void
    formatStats
    (
    istring LabelName
    ValuesT
    LabelT
    )
    (
    ValuesT values
    ,
    LabelT label_val
    ,)
  3. void formatStats(ValuesT values, LabelsT labels, mstring buffer)

Parameters

LabelName

The name of the label to annotate the stats with.

ValuesT

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

LabelT

The type of the label's value.

values ValuesT

The struct or class to fetch stat values from.

label_val LabelT

The label value to annotate the stats with.

buffer mstring

The buffer to add the formatted stats to.

Meta