Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Library for posting metrics to a server

Project Description

A python library to send application metrics using UDP.

Installation

pip install measures

Usage

  • count
from measures import Measure
measure = Measure('myclient', ('localhost', 1984))
measure.count('mymetric', dimensions={'name': 'john'})
  • time (measure time spent on a given block)
import time
from measures import Measure
measure = Measure('myclient', ('localhost', 1984))
with measure.time('mymetric'):
    # do some slow operation:
    time.sleep(3.14159)
import time
from measures import Measure
measure = Measure('myclient', ('localhost', 1984))
with measure.time('mymetric') as dimensions:
    # do some slow operation:
    time.sleep(1.61803)
    # add any relevant information, if necessary:
    dimensions['relevant_info'] = 'pertinent_info'

Contributing

  • Set up your environment
git clone https://github.com/globocom/measures.git
cd measures
mkvirtualenv measures
pip install -r test_requirements.txt
  • Run the tests
make tests
  • Write tests for your new feature or bug fix
  • Write needed code changes
  • Iterate, have fun :)
  • Make a pull request with your changes

Who do I talk to?

Release History

Release History

This version
History Node

1.2.0

History Node

1.1.0

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
measures-1.2.0.tar.gz (2.2 kB) Copy SHA256 Checksum SHA256 Source Mar 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting