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.1.7.tar.gz (4.1 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.1.7-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for artefacts_xray-0.1.7.tar.gz
Algorithm Hash digest
SHA256 50a3a46793273f2dbf3f8dee273de063ba0ceb1779c6ada6c84fe79a05e54209
MD5 84a9ae7c6ce180261c3478e2e711f165
BLAKE2b-256 160819cbe1c5d833c0b0ee6d13d820aa81c35e6a6544a319a77445f598356d4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for artefacts_xray-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c5750f621fd0c27a407dada8965e776c517880e529203b8ea9df108bbe20a4df
MD5 948e5af6c0d897a0e15664ae51b5fa05
BLAKE2b-256 265053524a489de82c82bd499ea1dd2c3c6ef02786ef9a6251751303c6172da4

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