pmTypeStr(3) convert a performance metric type into a string


#include <pcp/pmapi.h>

const char *pmTypeStr(int type)

cc ... -lpcp


Given a performance metric type, produce a terse ASCII equivalent, appropriate for use in error and diagnostic messages

The value for type is typically extracted from a pmDesc structure, following a call to pmLookupDesc(3) for a particular performance metric.

Examples are 32 (for type equals PM_TYPE_32), U64 (for type equals PM_TYPE_U64), AGGREGATE (for type equals PM_TYPE_AGGREGATE), etc.

The string value is held in a single static buffer, so the returned value is only valid until the next call to pmTypeStr.