Skip to main content

Firmware memory budgets and size-regression checks for CI. Your binary stays local.

Project description

memprobe

Firmware memory budgets and size-regression checks for CI, from the command line.

memprobe reads the section and symbol table out of your ELF locally and sends only that metadata to the memprobe API, which returns the analysis. Your binary never leaves your machine: only the sizes and symbol names it contains are sent, the same information readelf and nm print.

pip install memprobe

Quick start

  1. Create an API key at https://memprobe.dev (Account → API keys).

  2. Point the CLI at it:

    memprobe config set --key mp_live_xxxxxxxx
    
  3. Check a build against budgets:

    memprobe init            # writes a memprobe.toml with flash/ram budgets
    memprobe check build/firmware.elf
    

    check exits non-zero when a budget is exceeded, so it gates a CI job.

Commands

Command What it does
memprobe analyze <elf> Size summary: flash/ram totals, biggest sections and symbols.
memprobe check <elf> Fail (exit 1) if a budget in memprobe.toml is exceeded. The CI gate.
memprobe diff <old> <new> Size change between two builds, with per-symbol deltas. --format markdown for PR comments.
memprobe init Scaffold memprobe.toml with flash/ram budgets.
memprobe account Show your plan and this month's usage.
memprobe config set --key <key> [--server <url>] Store your API key (in ~/.memprobe/config.json).
memprobe config show Show the current key (masked) and server.

MEMPROBE_API_KEY and MEMPROBE_SERVER environment variables override the stored config, which is convenient in CI.

CI

Because memprobe check exits non-zero when a budget is exceeded, it works as a gate in any CI system. Run it as a build step with MEMPROBE_API_KEY set as a secret:

pip install memprobe
memprobe check build/firmware.elf

On GitHub, memprobe-action wraps this and also posts a size report with symbol-level changes as a PR comment:

- uses: memprobe-dev/memprobe-action@v1
  with:
    file: build/firmware.elf
    api-key: ${{ secrets.MEMPROBE_API_KEY }}

What runs where

Local (this tool) memprobe API
Reads your ELF yes never sees the binary
Extracts sections/symbols yes (via pyelftools) no
Budget / diff / bloat analysis no yes

This package contains no analysis logic and no proprietary code: it's a thin, open-source client. The deeper analysis (call graph, dead-code, stack usage, source attribution) lives in the web app at https://memprobe.dev.

License

MIT

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

memprobe-0.1.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

memprobe-0.1.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: memprobe-0.1.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memprobe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 11ac724ce4d0cfedbec2e176c1e0470a69cbe7b0ae4b12dfcfc62a8bb4a82d7d
MD5 2612ce3f85fa497c3f32d54420eaa85d
BLAKE2b-256 835a5db7e9cb0be8bc4e556c174c7b919305a005f07b5e96d266e64618be62a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for memprobe-0.1.1.tar.gz:

Publisher: publish.yml on memprobe-dev/memprobe_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: memprobe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memprobe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3c0a04458beddef0617743afc915ff97a59ff0da6b6c517f4eb9b14da1597b3
MD5 248931cf8013b2ff2c7c6816079f92ce
BLAKE2b-256 7849e46bf108397f465af94c6c3f992331c090261c7929648c6b8f2d5dea3cbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for memprobe-0.1.1-py3-none-any.whl:

Publisher: publish.yml on memprobe-dev/memprobe_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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