Skip to main content

Runtime Reporting Utils

Python module for reporting runtime metadata.

Usage

from runtime_reporting_utils import RuntimeReporter

rr = RuntimeReporter()

rr.add_file(file=logfile, name="log file")
rr.add_file(file=config_file, name="configuration file")
rr.add_file(file=outfile, name="main output file")

rr.count(name="gene", desc="Number of genes processed")
rr.count(name="missing-annotation", desc="Number of genes that do not have annotation")

# Set the output directory.
# Default will be /tmp/[USER]/runtime-reporting-utils/[basename of executable]/YYYY-MM-DD-HHMMSS/
rr.outdir(outdir)

rr.generate_report()
# The RuntimeReport will write the runtime report to the output directory.
# The file will be named report.json.

Invocation:

python main.py
Runtime report written to /tmp/sundaram/runtime-reporting-utils/main.py/2025-02-15-084121/report.json
Execution completed: '/tmp/runtime-reporting-utils-test/main.py'

Contents of runtime report file:

{
    "provenance": {
        "executable": "/tmp/runtime-reporting-utils-test/main.py",
        "hostname": "MSI",
        "outdir": "/tmp/sundaram/runtime-reporting-utils/main.py/2025-02-15-084121",
        "username": "sundaram",
        "start_time": "2025-02-15T08:41:21.573171",
        "end_time": "2025-02-15T08:41:21.575894",
        "elapsed_time": "0:00:00.002726"
    },
    "command-line arguments": [],
    "counters": {
        "gene": {
            "count": 3,
            "desc": "Number of genes processed"
        },
        "missing-annotation": {
            "count": 1,
            "desc": "Number of genes that do not have annotation"
        }
    },
    "files": {
        "/tmp/runtime-reporting-utils-test/log.txt": {
            "path": "/tmp/runtime-reporting-utils-test/log.txt",
            "name": "log file",
            "bytesize": 12,
            "is_binary": false,
            "line_count": 1,
            "md5sum": "e59ff97941044f85df5297e1c302d260"
        },
        "/tmp/runtime-reporting-utils-test/conf/config.yaml": {
            "path": "/tmp/runtime-reporting-utils-test/conf/config.yaml",
            "name": "configuration file",
            "bytesize": 64,
            "is_binary": false,
            "line_count": 6,
            "md5sum": "910974117394282bc6997ddfeb2cfa68"
        },
        "/tmp/runtime-reporting-utils-test/output.txt": {
            "path": "/tmp/runtime-reporting-utils-test/output.txt",
            "name": "main output file",
            "bytesize": 37,
            "is_binary": false,
            "line_count": 1,
            "md5sum": "3babe83376c82b909666b064284024d2"
        }
    }
}

History

0.1.0 (2025-02-08)

  • First release on PyPI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runtime_reporting_utils-0.1.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

runtime_reporting_utils-0.1.2-py2.py3-none-any.whl (9.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file runtime_reporting_utils-0.1.2.tar.gz.

File metadata

  • Download URL: runtime_reporting_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for runtime_reporting_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a21dc802a56f97019fb562b574f3136a55e6c20570e540f2c3cd4b438b19456e
MD5 6081caf87d7eb429630c9c833619a74d
BLAKE2b-256 53c5702da1829621b950b468ef66cde57e520a9516556213c5a82dfbbf6cfbfc

See more details on using hashes here.

File details

Details for the file runtime_reporting_utils-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for runtime_reporting_utils-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fe3962ad856d4d76035a16b4c0ab9054bb6dcee51c780cda9d18381df2784179
MD5 67990af337ada4e157b76c3af664df6b
BLAKE2b-256 43b3452cf3279ad0c733b07e55b969c61385b52de8c31009c9f5a24c55d19b34

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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