Skip to main content
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
=====

You can use a context manager or decorate a function to record the wall clock time of how long it took that function or block of code to complete:

```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
```

---

![PyPI downloads](http://img.shields.io/pypi/dm/timekeeper.svg)   ![PyPI version](http://img.shields.io/pypi/v/timekeeper.svg)   ![Python 2.7](http://img.shields.io/badge/Python-2.7-green.svg)   ![Python 3.2+](http://img.shields.io/badge/Python-3.2+-green.svg)   ![License](http://img.shields.io/badge/License-ISC-red.svg)

Metadata

Release files for timekeeper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timekeeper 0.1.1
File Size Uploaded Provenance
timekeeper-0.1.1.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for timekeeper 0.1.1
File Interpreter ABI Platform
timekeeper-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 5.9 kB

Release files / timekeeper-0.1.1.tar.gz

Download URL timekeeper-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
49714ed8793aa2e0898e12dddd53b7f7de9f930260de725255555af7edb2d8e3
BLAKE2b-256 checksum
How to use checksums
4355fd67e94781e350209ba525e965ffed7c453845e5cd90b01de7a00a98ab0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / timekeeper-0.1.1-py2.py3-none-any.whl

Download URL timekeeper-0.1.1-py2.py3-none-any.whl
Size 3.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
946340b0fa5ab8db38f44de977d5fd85639c7a32973e4cd3152cf0b8c8768adf
BLAKE2b-256 checksum
How to use checksums
4f63d3eeceb42c151b2d78771fc3446d208886643d30461918d183650fac7355
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for timekeeper 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page