goblinfish-metrics-process-timing


Namegoblinfish-metrics-process-timing JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryContext-managed metrics tracking and output, including but not limited to process/subprocess latencies.
upload_time2025-01-26 15:37:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2025 Brian D. Allbee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords aws cloudwatch log metrics process timing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```shell
# Install with pip
pip install goblinfish-metrics-process_timing
```

```shell
# Install with pipenv
pipenv install goblinfish-metrics-process_timing
```

Import in your code:

```python
from goblinfish.metrics.process_timing import ProcessTimer
```

Create the timing-tracker instance:

```python
tracker = ProcessTimer()
```

Decorate your top-level/entry-point function:

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

Add any sub-process timers:

```python
@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:

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

More detailed examples can be found in [the `examples` directory](https://bitbucket.org/stonefish-software-studio/stonefish-metrics-process_timer-package/src/main/examples/) 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](https://bitbucket.org/stonefish-software-studio/stonefish-metrics-process_timer-package/src/main/pyproject.toml) in the repository.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "goblinfish-metrics-process-timing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Brian Allbee <brian.allbee+goblinfish.process_timing+@gmail.com>",
    "keywords": "aws, cloudwatch, log, metrics, process timing",
    "author": null,
    "author_email": "Brian Allbee <brian.allbee+goblinfish.process_timing+@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/2d/3e47de6a77cd9784db136c64be7565f2c6ee7f6cecc20ac70804967d0197/goblinfish_metrics_process_timing-0.0.3.tar.gz",
    "platform": null,
    "description": "# The goblinfish.metrics.process_timing Package\n\n> 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.\n\n## Quick Start\n\nInstall in your project:\n\n```shell\n# Install with pip\npip install goblinfish-metrics-process_timing\n```\n\n```shell\n# Install with pipenv\npipenv install goblinfish-metrics-process_timing\n```\n\nImport in your code:\n\n```python\nfrom goblinfish.metrics.process_timing import ProcessTimer\n```\n\nCreate the timing-tracker instance:\n\n```python\ntracker = ProcessTimer()\n```\n\nDecorate your top-level/entry-point function:\n\n```python\n@tracker.track\ndef some_function():\n    ...\n```\n\nAdd any sub-process timers:\n\n```python\n@tracker.track\ndef some_function():\n    ...\n\n    with tracker.timer('some_process_name'):\n        # Do stuff here\n        ...\n```\n\nWhen this code is executed, after the context created by the `@tracker.track` decorator is complete, it will `print` something that looks like this:\n\n```json\n{\"some_process_name\": 0.0, \"some_function\": 0.0}\n```\n\nMore detailed examples can be found in [the `examples` directory](https://bitbucket.org/stonefish-software-studio/stonefish-metrics-process_timer-package/src/main/examples/) in the repository.\n\n## Contribution guidelines\n\nAt this point, contributions are not accepted \u2014 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.\n\n## Who do I talk to?\n\nThe current maintainer(s) will always be listed in the `[maintainers]` section of [the `pyproject.toml` file](https://bitbucket.org/stonefish-software-studio/stonefish-metrics-process_timer-package/src/main/pyproject.toml) in the repository.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Brian D. Allbee\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Context-managed metrics tracking and output, including but not limited to process/subprocess latencies.",
    "version": "0.0.3",
    "project_urls": null,
    "split_keywords": [
        "aws",
        " cloudwatch",
        " log",
        " metrics",
        " process timing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "63a5affec76eececd79115020212002fe98d8db873c27aec2d78e64f59ee42db",
                "md5": "f0423b51edfe832b605de0c2662c4860",
                "sha256": "4a5230f9194f22cd2612044297a402a1b3584bc3f93826f764a7c09cd1a82953"
            },
            "downloads": -1,
            "filename": "goblinfish_metrics_process_timing-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0423b51edfe832b605de0c2662c4860",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 6251,
            "upload_time": "2025-01-26T15:37:28",
            "upload_time_iso_8601": "2025-01-26T15:37:28.539285Z",
            "url": "https://files.pythonhosted.org/packages/63/a5/affec76eececd79115020212002fe98d8db873c27aec2d78e64f59ee42db/goblinfish_metrics_process_timing-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e82d3e47de6a77cd9784db136c64be7565f2c6ee7f6cecc20ac70804967d0197",
                "md5": "115b711294e101987acb80abdd558b04",
                "sha256": "1fef0454059e3a55399424d0f4e9010ccb7118e8e2b3d8649daf40e0fe849cfd"
            },
            "downloads": -1,
            "filename": "goblinfish_metrics_process_timing-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "115b711294e101987acb80abdd558b04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 5530,
            "upload_time": "2025-01-26T15:37:29",
            "upload_time_iso_8601": "2025-01-26T15:37:29.572958Z",
            "url": "https://files.pythonhosted.org/packages/e8/2d/3e47de6a77cd9784db136c64be7565f2c6ee7f6cecc20ac70804967d0197/goblinfish_metrics_process_timing-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-26 15:37:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "goblinfish-metrics-process-timing"
}
        
Elapsed time: 0.42481s