Metadata-Version: 1.0
Name: ua2.carbon
Version: 0.0.2
Summary: Tool for stream statistics to carbon daemon (from graphite)
Home-page: https://bitbucket.org/ua2crm/ua2.carbon
Author: Vic
Author-email: vic@ua2web.com
License: BSD License
Description: Tools for serving statistic data to carbon/graphite server.
        
        To install package into django need:
        
        * add 'ua2.carbon.middleware.MeasureMiddleware' at the top of MIDDLEWARE_CLASSES list
        * into settings.py add next lines:
        
        .. code-block:: python
        
        	from ua2.carbon.loaders import django_loader
        	django_loader()
        
        
        ***************
        Usage examples
        ***************
        
        Measure function execution time
        -------------------------------
        
        .. code-block:: python
        
        	from ua2 import carbon
        
        	@carbon.measure('myapp')
        	def test():
        		print "Hello World!"
        
        
        Measure arbitrary block execution time
        --------------------------------------
        
        .. code-block:: python
        
        	from ua2 import carbon
        
        	def test():
        		with carbon.Profiler('myapp'):
        			for i in range(1,100):
        				print "Hello World!"
        
        
        Send raw value to carbon
        ------------------------
        
        .. code-block:: python
        
        	from ua2 import carbon
        
        	def test():
        		for i in range(1,100):
        			print "Hello World!"
        			carbon.send('metric.hello.world', 1)
        
        
Platform: UNKNOWN
