예제 #1
0
파일: protocol.py 프로젝트: kiall/yardstick
    def unpack_counter(self, name, value, remainder):
        ts = timeutils.utcnow_ts()

        sample_rate = 1

        if len(remainder) >= 1:
            sample_rate = float(remainder.pop(0).strip("@"))

        value = value * sample_rate

        return ("stats.%s.%s" % (self.host, name), (ts, value))
예제 #2
0
파일: protocol.py 프로젝트: kiall/yardstick
 def unpack_meter(self, name, value):
     ts = timeutils.utcnow_ts()
     return ("stats.%s.%s" % (self.host, name), (ts, value))