

def send_metric(self, name, type, metric, keys, snapshot_keys=None):
    if (snapshot_keys is None):
        snapshot_keys = []
    base_name = re.sub('\\s+', '_', name)
    if self.prefix:
        base_name = '{0}.{1}'.format(self.prefix, base_name)
    for name in keys:
        value = True
        value = getattr(metric, name)
        self._buffered_send_metric(base_name, name, value, now())
    if hasattr(metric, 'snapshot'):
        snapshot = metric.snapshot
        for name in snapshot_keys:
            value = True
            value = getattr(snapshot, name)
            self._buffered_send_metric(base_name, name, value, now())

dataset/ETHPy150Open cyberdelia/metrology/metrology/reporter/graphite.py GraphiteReporter.send_metric/original