Skip to main content

Python package to easily capture respource utilization and time taken for given code block or method.

Project description

smeasures - Python package for measuring resource utilization and execution time

The smeasures package provides a simple way to capture resource utilization and time taken for a given code block or method. It uses the psutil library to collect system resource usage data, and provides a decorator that can be used to wrap a function or code block to measure its execution time and resource usage.

Installation:

To install smeasures, simply run:

pip install smeasures

Usage:

To use smeasures, import the measure decorator from the smeasures package, and apply it to the function or code block you want to measure:

from smeasures import measure

@measure
def my_function():
    # code to measure here

This will print out the execution time and resource usage of the my_function code block.

Dependencies:

smeasures requires the following dependencies:

  • psutil
  • time
  • threading
  • gc

License:

smeasures is released under the MIT License.

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

smeasures-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

smeasures-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file smeasures-0.1.1.tar.gz.

File metadata

  • Download URL: smeasures-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for smeasures-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fbc4152fe4894c9b07a4b7326d5c906dc1154d7e9a97ef24ac298d40d01763e9
MD5 a6e84c5fe8cc17c6f5e75b36cba963a9
BLAKE2b-256 0bc440277d47243d67077f675357acd3dd3238d59535e9a272ab92d017b7646f

See more details on using hashes here.

File details

Details for the file smeasures-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: smeasures-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for smeasures-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1ccfa8c552dcf945862d0819912f29db55292d3e124c3ae1ba927f21e0cd29
MD5 dccd5afc17c9a1abc3d5a83fcff8d341
BLAKE2b-256 94dc107ae15c6a4de68819bd4ff2c40bbed90940518f83caf05456e2569f9d1d

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