Skip to main content

Send runtime measurements of your code to InfluxDB

Project description

Timekeeper is a library for instrumentation of live Python code by sending measurements to InfluxDB.

Requires Python 2.7 or 3.2+, and InfluxDB 0.9.0+.

Usage
=====

```python
from timekeeper import TimeKeeper

tk = TimeKeeper(
"udp+influxdb://localhost/databasename",
prefix="location-1.cluster-1.app-1.", # if you prefer Graphite style over tags
tags={"host": "location-1.cluster-1.app-1"},
)


@tk.decorate("some_slow_function", tags={"foo": "bar"})
def slowpoke():
sleep(9001)


def slowpoke2():
with tk.context("some_other_slow_function", tags={"foo": "baz"}):
sleep(9001)
```

Installation
============

```
pip install timekeeper
```

Project details


Download files

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

Source Distribution

timekeeper-0.1.0.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

timekeeper-0.1.0-py2.py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page