There is no straight translation for the JMX reporter into python, so I'll do something else in a separate commit.
		
			
				
	
	
		
			22 lines
		
	
	
		
			588 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			588 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import abc
 | 
						|
 | 
						|
 | 
						|
class AbstractStat(object):
 | 
						|
    """
 | 
						|
    An AbstractStat is a quantity such as average, max, etc that is computed
 | 
						|
    off the stream of updates to a sensor
 | 
						|
    """
 | 
						|
    __metaclass__ = abc.ABCMeta
 | 
						|
 | 
						|
    @abc.abstractmethod
 | 
						|
    def record(self, config, value, time_ms):
 | 
						|
        """
 | 
						|
        Record the given value
 | 
						|
 | 
						|
        Arguments:
 | 
						|
            config (MetricConfig): The configuration to use for this metric
 | 
						|
            value (float): The value to record
 | 
						|
            timeMs (int): The POSIX time in milliseconds this value occurred
 | 
						|
        """
 | 
						|
        raise NotImplementedError
 |