{"id":17654375,"url":"https://github.com/chrisjsewell/process-plot","last_synced_at":"2025-07-02T04:37:33.901Z","repository":{"id":46581810,"uuid":"408648512","full_name":"chrisjsewell/process-plot","owner":"chrisjsewell","description":"Create plots of resource usage for a process (memory, CPU, etc).","archived":false,"fork":false,"pushed_at":"2025-06-30T20:21:51.000Z","size":216,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T21:28:32.377Z","etag":null,"topics":["profiling","psutil","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisjsewell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-21T01:06:45.000Z","updated_at":"2024-06-03T22:53:29.000Z","dependencies_parsed_at":"2024-03-25T23:28:27.012Z","dependency_job_id":"b745ab60-ee00-4a83-a342-9fe06d3677de","html_url":"https://github.com/chrisjsewell/process-plot","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"5b30eb8b19cf7ec3edde21862476cab2f781ea7f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/chrisjsewell/process-plot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjsewell%2Fprocess-plot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjsewell%2Fprocess-plot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjsewell%2Fprocess-plot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjsewell%2Fprocess-plot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisjsewell","download_url":"https://codeload.github.com/chrisjsewell/process-plot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisjsewell%2Fprocess-plot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263076935,"owners_count":23410164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["profiling","psutil","python"],"created_at":"2024-10-23T12:14:01.151Z","updated_at":"2025-07-02T04:37:33.871Z","avatar_url":"https://github.com/chrisjsewell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# process-plot\n\n[![codecov.io][cov-badge]][cov-link]\n[![PyPI version][pypi-badge]][pypi-link]\n\nCreate plots of resource usage for a process (memory, CPU, etc).\n\nProcess statistics are polled at a set interval, in a cross-platform manner (i.e. supports Linux, OSX and Windows).\n\nInformation is collected on both the main process and any child processes, and can be plotted in a single graph.\n\n## Usage\n\nInstall the package with [pip](https://pip.pypa.io) or [pipx](https://github.com/pypa/pipx):\n\n```console\n$ pipx install process-plot\n```\n\nthen run:\n\n```console\n$ pplot exec \"sleep 1\" -i 0.1\nPPLOT INFO: Output files will be written to: /user/pplot_out, with basename: 20210921125420\nPPLOT INFO: Running process as PID: 5379\nPPLOT INFO: Total run time: 0 hour(s), 00 minute(s), 01.034680 second(s)\nPPLOT INFO: Plotting results to: pplot_out/20210921125420.png\nPPLOT SUCCESS!\n```\n\nYou will then find the output files in `/user/pplot_out`, with a plot for the process like:\n\n![example plot](example.png)\n\nIf the process spawns child processes, by default, the values for the main process and all child processes are summed together.\nWhen called with `--stack-processes`, the plot will stack the values per process:\n\n```console\n$ pplot exec \"parallel sleep ::: 2 2 2\" -i 0.2 --stack-processes --legend\n```\n\n![example parallel plot](example_parallel.png)\n\nAdditional options are available:\n\n```console\n$ pplot exec --help\n\n Usage: pplot exec [OPTIONS] COMMAND\n\n Execute a command and profile it.\n\n╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ *    command      TEXT  [default: None] [required]                                                            │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --interval        -i                FLOAT               Polling interval (seconds) [default: 1]               │\n│ --timeout         -t                FLOAT               Timeout process (seconds)                             │\n│ --child               --no-child                        Collect child process data [default: child]           │\n│ --command-output  -c                [hide|screen|file]  Mode for stdout/stderr of command [default: file]     │\n│ --outfolder       -o                DIRECTORY           Folder path for output files [default: pplot_out]     │\n│ --basename        -n                TEXT                Basename for output files (defaults to datetime)      │\n│ --quiet           -q                                    Quiet mode                                            │\n│ --help            -h                                    Show this message and exit.                           │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Plot ────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --plot-cols        -p                           COMMA-DELIMITED  Columns to plot                              │\n│                                                                  [default: memory_rss, cpu_percent]           │\n│ --stack-processes       --no-stack-processes                     Stack values per process in plot             │\n│                                                                  [default: no-stack-processes]                │\n│ --title                                         TEXT             Plot title (defaults to command)             │\n│ --grid                  --no-grid                                Add grid to plots [default: grid]            │\n│ --legend                --no-legend                              Add legend to figure [default: no-legend]    │\n│ --size-width       -sw                          FLOAT            Width of plot in cm [default: None]          │\n│ --size-height      -sh                          FLOAT            Height of plot in cm [default: None]         │\n│ --format           -f                           [png|pdf|svg]    Plot file format [default: png]              │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\n```\n\n## Acknowledgements\n\nInitially adapted from: \u003chttps://github.com/jeetsukumaran/Syrupy\u003e\n\n[ci-badge]: https://github.com/chrisjsewell/process-plot/workflows/CI/badge.svg?branch=main\n[ci-link]: https://github.com/chrisjsewell/process-plot/actions?query=workflow%3ACI+branch%3Amain+event%3Apush\n[cov-badge]: https://codecov.io/gh/chrisjsewell/process-plot/branch/main/graph/badge.svg\n[cov-link]: https://codecov.io/gh/chrisjsewell/process-plot\n[pypi-badge]: https://img.shields.io/pypi/v/process-plot.svg\n[pypi-link]: https://pypi.org/project/process-plot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisjsewell%2Fprocess-plot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisjsewell%2Fprocess-plot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisjsewell%2Fprocess-plot/lists"}