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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file timekeeper-0.1.0.tar.gz.

File metadata

  • Download URL: timekeeper-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for timekeeper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95ea7a38e852b1df079eed0ab02dc04306f4e8c49aed28d9457ab1f69d4e84b6
MD5 3ddc50aa96dd25de28fbcce76feecd53
BLAKE2b-256 9166aa7c8b420a2c4cb19f0edff3bced607efda6a1f62039c068cccf87a7087a

See more details on using hashes here.

File details

Details for the file timekeeper-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for timekeeper-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 64bd6080089e58a5777b0e01d4b08c27ee326edad81bed5a5e52bbf76edcb946
MD5 186922eaebe00b2536542ab00c406a3b
BLAKE2b-256 62160e52239d837fa2bdec9b0e782bb94145fa869a1fcefe4a8a6a054dce8df7

See more details on using hashes here.

Supported by

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