def _parse_perfdata(self, s):
        metrics = []
        counters = re.findall(self.TOKENIZER_RE, s)
        if counters is None:
            self.log.warning("Failed to parse performance data: {s}".format(
                s=s))
            return metrics

        for (key, value, uom, warn, crit, min, max) in counters:
            try:
                norm_value = self._normalize_to_unit(float(value), uom)
                metrics.append((key, norm_value))
            except ValueError:
                self.log.warning(
                    "Couldn't convert value '{value}' to float".format(
                        value=value))

        return metrics
Parse performance data from a perfdata string
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/nagiosperfdata/nagiosperfdata.py/NagiosPerfdataCollector._parse_perfdata