Skip to main content

Context-managed metrics tracking and output, including but not limited to process/subprocess latencies.

Reason this release was yanked:

Changing package name

Project description

The goblinfish.metrics.process_timing Package

Provides context-manager classes to name, track and report elapsed-time and other metrics for top-level process entry-points (like AWS Lambda Function handlers) and sub-processes within them.

Quick Start

Install in your project:

# Install with pip
pip install goblinfish-metrics-process_timing
# Install with pipenv
pipenv install goblinfish-metrics-process_timing

Import in your code:

from goblinfish.metrics.process_timing import ProcessTimer

Create the timing-tracker instance:

tracker = ProcessTimer()

Decorate your top-level/entry-point function:

@tracker.track
def some_function():
    ...

Add any sub-process timers:

@tracker.track
def some_function():
    ...

    with tracker.timer('some_process_name'):
        # Do stuff here
        ...

When this code is executed, after the context created by the @tracker.track decorator is complete, it will print something that looks like this:

{"some_process_name": 0.0, "some_function": 0.0}

More detailed examples can be found in the examples directory in the repository.

Contribution guidelines

At this point, contributions are not accepted — I need to finish configuring the repository, deciding on whether I want to set up automated builds for pull-requests, and probably several other items.

Who do I talk to?

The current maintainer(s) will always be listed in the [maintainers] section of the pyproject.toml file in the repository.

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

goblinfish_metrics_process_timing-0.0.3.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file goblinfish_metrics_process_timing-0.0.3.tar.gz.

File metadata

File hashes

Hashes for goblinfish_metrics_process_timing-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1fef0454059e3a55399424d0f4e9010ccb7118e8e2b3d8649daf40e0fe849cfd
MD5 115b711294e101987acb80abdd558b04
BLAKE2b-256 e82d3e47de6a77cd9784db136c64be7565f2c6ee7f6cecc20ac70804967d0197

See more details on using hashes here.

File details

Details for the file goblinfish_metrics_process_timing-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for goblinfish_metrics_process_timing-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a5230f9194f22cd2612044297a402a1b3584bc3f93826f764a7c09cd1a82953
MD5 f0423b51edfe832b605de0c2662c4860
BLAKE2b-256 63a5affec76eececd79115020212002fe98d8db873c27aec2d78e64f59ee42db

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