{"id":28713571,"url":"https://github.com/charmitro/peak-mem","last_synced_at":"2025-09-14T07:04:01.124Z","repository":{"id":298277098,"uuid":"989600150","full_name":"charmitro/peak-mem","owner":"charmitro","description":"A lightweight, cross-platform memory usage monitor for any process. Mirror of https://sr.ht/~charmitro/peak-mem/","archived":false,"fork":false,"pushed_at":"2025-07-13T17:35:55.000Z","size":103,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-13T19:30:23.841Z","etag":null,"topics":["cli","memory","monitoring","performance","profiler"],"latest_commit_sha":null,"homepage":"https://blog.charmitro.gr/blog/peak-mem-a-lightweight-memory-usage-monitor/","language":"Rust","has_issues":false,"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/charmitro.png","metadata":{"files":{"readme":"README","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":"2025-05-24T12:39:22.000Z","updated_at":"2025-07-13T17:35:42.000Z","dependencies_parsed_at":"2025-07-13T19:18:08.212Z","dependency_job_id":"50927cdc-4108-4468-a6a2-2cf081ee4545","html_url":"https://github.com/charmitro/peak-mem","commit_stats":null,"previous_names":["charmitro/peak-mem"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/charmitro/peak-mem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmitro%2Fpeak-mem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmitro%2Fpeak-mem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmitro%2Fpeak-mem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmitro%2Fpeak-mem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charmitro","download_url":"https://codeload.github.com/charmitro/peak-mem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmitro%2Fpeak-mem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275071685,"owners_count":25400442,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","memory","monitoring","performance","profiler"],"created_at":"2025-06-15T00:10:49.624Z","updated_at":"2025-09-14T07:04:01.109Z","avatar_url":"https://github.com/charmitro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"peak-mem\n\nMonitor peak memory usage of processes.\n\nINSTALLATION\n\n    Install from a local path:\n    cargo install --path .\n\n    Or install directly from https://crates.io/crates/peak-mem:\n    cargo install peak-mem\n\nUSAGE\n\n    peak-mem [OPTIONS] -- COMMAND [ARGS...]\n\nOPTIONS\n\n    -h, --help              Show help\n    -V, --version           Show version\n    -j, --json              Output JSON\n    -c, --csv               Output CSV\n    -q, --quiet             Output only RSS in bytes\n    -v, --verbose           Show process breakdown\n    -w, --watch             Show real-time usage\n    -t, --threshold SIZE    Set memory threshold\n    --no-children           Don't track child processes\n    --timeline FILE         Record timeline\n    --interval MS           Sampling interval (default: 100)\n    --units UNIT            Force memory units (B, KB, MB, GB, KiB, MiB, GiB)\n\n    Memory Regression Detection:\n    --save-baseline NAME    Save current run as baseline\n    --compare-baseline NAME Compare against saved baseline\n    --regression-threshold % Memory increase threshold (default: 10%)\n    --baseline-dir DIR      Baseline storage directory\n    --list-baselines        List all saved baselines\n    --delete-baseline NAME  Delete a saved baseline\n\nEXAMPLES\n\n    Basic usage:\n    peak-mem -- cargo build\n\n    JSON output:\n    peak-mem --json -- ./myapp\n\n    Set 1GB threshold:\n    peak-mem --threshold 1G -- ./test\n\n    Force output in megabytes:\n    peak-mem --units MB -- ./myapp\n\n    Memory regression detection:\n    # Save a baseline\n    peak-mem --save-baseline v1.0 -- ./myapp\n\n    # Compare against baseline\n    peak-mem --compare-baseline v1.0 -- ./myapp\n\n    # Use stricter threshold (5% increase = regression)\n    peak-mem --compare-baseline v1.0 --regression-threshold 5 -- ./myapp\n\n    # List and manage baselines\n    peak-mem --list-baselines\n    peak-mem --delete-baseline v1.0\n\nBUILDING\n\n    cargo build --release\n\nINSTALLING MANPAGE\n\n    System-wide installation:\n    sudo install -Dm644 man/man1/peak-mem.1 /usr/share/man/man1/peak-mem.1\n\n    Local installation:\n    install -Dm644 man/man1/peak-mem.1 ~/.local/share/man/man1/peak-mem.1\n\n    View the manpage:\n    man peak-mem\n\nMEMORY REGRESSION DETECTION\n\n    Peak-mem can save memory usage baselines and compare subsequent runs\n    to detect memory regressions. This is useful for:\n\n    - CI/CD pipelines to catch memory regressions\n    - Comparing memory usage before/after optimizations\n    - Tracking memory usage across releases\n\n    Baselines are stored in ~/.cache/peak-mem/baselines/ by default.\n    When comparing, peak-mem will:\n\n    1. Report percentage changes in RSS, VSZ, and duration\n    2. Exit with code 1 if RSS increases exceed the threshold\n    3. Support multiple output formats (human, JSON, CSV, quiet)\n\nPLATFORM SUPPORT\n\n    Linux    - Implemented via /proc\n    macOS    - Implemented via proc_pidinfo\n    FreeBSD  - Implemented via sysinfo\n    Windows  - Not implemented\n\nLICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmitro%2Fpeak-mem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharmitro%2Fpeak-mem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmitro%2Fpeak-mem/lists"}