Skip to main content

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

Reason this release was yanked:

Changing namespace and releasing new package

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

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.dev1.tar.gz.

File metadata

File hashes

Hashes for goblinfish_metrics_process_timing-0.0.3.dev1.tar.gz
Algorithm Hash digest
SHA256 c2a7c1970d325b2ae065efbafc6e59a10e77ea44ff720bcf8d25415f0d3fdd42
MD5 a0409831b2fa2dc9ed1b6c51c2a32e7b
BLAKE2b-256 7254a193b043ad444cc9cd33f0079c5c8b99597f36e0593341cc7a94481d7f3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for goblinfish_metrics_process_timing-0.0.3.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8a275510f8bc40ffba37d2055a09b011ca6f64d8d1fffe2c32926814afab90d
MD5 4c343ea43dd7a2fd7aeb3e6d995c9929
BLAKE2b-256 404f72416e25f91c2ad6ccf6b99fe80b9e9ace82fab592d5b614c871e86fa956

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