def write_points(self, name, fields):
        now = int(time.time())
        try:
            self._write([{
                'metric': metric,
                'endpoint': self.prefix,
                'timestamp': now,
                'step': 30,
                'value': val,
                'counterType': 'GAUGE',
                'tags': 'service=redisctl&addr=' + name,
            } for metric, val in fields.iteritems()])
        except __HOLE__ as e:
            logging.error('Fail to write points for %s as %s', name, e.message)
            self.reconnect()
            raise
dataset/ETHPy150Open HunanTV/redis-ctl/stats/db.py/Client.write_points