Skip to main content

Add your description here

Project description

Artefacts X-Ray

Resource tracker for process trees rooted in a Python process.

Usage

The tracker is a context manager:

from axray import resource_tracking

with resource_tracking():
    work()

By default it tracks the process tree executed in the context, here everything that happens inside work().

Comprehensive Demo

A demo script in this repository can report on a range of situations:

  • Single process CPU only usage
  • Single process memory only usage
  • Single process CPU and memory usage
  • Multi process CPU only usage
  • Multi process memory only usage
  • Multi process CPU and memory only usage

With some extras like reporting the time overhead of tracking (but indicative only, not statistically confirmed).

Assuming the uv tool is available:

./bin/demo

In the absence of uv the script requires Numpy and can be run with python bin/demo.

Test Suite

The test suite uses PyTest and tries to cover relevant situations in resource tracking (over time it should go beyond what bin/demo covers).

Some tests are slow because they try to validate somewhat realistic situations (child processes not too short), as well as statistical relevance of reporting. Most tests can be run with:

uv run pytest -m "not slowest"   # Remove `uv run` if `pytest` available

This runs excluding the really slow tests. As the project progresses, other tests get marked as slow/slower/slowest to try to find good balance and configurability.

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

artefacts_xray-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

artefacts_xray-0.2.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file artefacts_xray-0.2.0.tar.gz.

File metadata

  • Download URL: artefacts_xray-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for artefacts_xray-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fd678ca4f321613886f772fbb26668e82447aab6c48ff4bc41e393b6daebdfb2
MD5 ae6379bae22fe436bb0c8edc14f0bd66
BLAKE2b-256 18b65925e4c0e75291ce0f3c17c250113e4505edf803ecbcba63c297712b20dc

See more details on using hashes here.

File details

Details for the file artefacts_xray-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for artefacts_xray-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a7bbf1f6a8dbc30cf95a2a0814e5beacf4b5deec3dfe5fac7016908efc42d89
MD5 96ed715c408252dc85a76a7506d6c86d
BLAKE2b-256 1e9dcafb7967ab0ae8389c04ad26ebbaa064c53f38dfa0cc889a3ff22cb55dd7

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