(self)
return fstring % (self.path, self.value, self.timestamp)
Return the Metric as a string
Return the Metric as a string
Return the Metric as a string
def __repr__(self):
        """
        Return the Metric as a string
        """
        if not isinstance(self.precision, (int, long)):
            log = logging.getLogger('diamond')
            log.warn('Metric %s does not have a valid precision', self.path)
            self.precision = 0

        # Set the format string
        fstring = "%%s %%0.%if %%i\n" % self.precision

        # Return formated string
        return fstring % (self.path, self.value, self.timestamp)
def __repr__ ( self ) : if not isinstance ( self . precision , ( int , long ) ) : log = logging . getLogger ( 'diamond' ) log . warn ( 'Metric %s does not have a valid precision' , self . path ) self . precision = 0 # Set the format string fstring = "%%s %%0.%if %%i\n" % self . precision # Return formated string return fstring % ( self . path , self . value , self . timestamp )