formatStats

Format data members from a struct or a class into a string that can be added to a stat collection buffer for exporting to prometheus.

The names and values of the members of the given struct are formatted as stat names and values, respectively.

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

Parameters

ValuesT

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

values ValuesT

The struct or class to fetch stat values from.

buffer mstring

The buffer to add the formatted stats to.

Meta