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
-
Create an API key at https://memprobe.dev (Account → API keys).
-
Point the CLI at it:
memprobe config set --key mp_live_xxxxxxxx
-
Check a build against budgets:
memprobe init # writes a memprobe.toml with flash/ram budgets memprobe check build/firmware.elf
checkexits 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 or watched symbol limit in memprobe.toml is exceeded. The CI gate. |
memprobe diff <old> <new> |
Size change between two builds, with per-file and per-symbol deltas. --format markdown for PR comments. |
memprobe diff <elf> --project <name> |
Diff against the project's saved baseline build, no second file needed. |
memprobe init |
Scaffold memprobe.toml with flash/ram budgets. --from-ld <script.ld> fills part capacity from the linker script. |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memprobe-0.1.2.tar.gz.
File metadata
- Download URL: memprobe-0.1.2.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28a6092261edb167c8772b785d211afdbf005024f68068bed4537cf50c59171c
|
|
| MD5 |
652c3be14cd80198bdcc8154d739fa25
|
|
| BLAKE2b-256 |
b79af792eb2979042c0ddff841835182228fe583eb0935fe70ba51022cf9e4ba
|
Provenance
The following attestation bundles were made for memprobe-0.1.2.tar.gz:
Publisher:
publish.yml on memprobe-dev/memprobe_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memprobe-0.1.2.tar.gz -
Subject digest:
28a6092261edb167c8772b785d211afdbf005024f68068bed4537cf50c59171c - Sigstore transparency entry: 1803753296
- Sigstore integration time:
-
Permalink:
memprobe-dev/memprobe_api@950f16735e2451f139f317bcdeaddea681ed0a27 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/memprobe-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@950f16735e2451f139f317bcdeaddea681ed0a27 -
Trigger Event:
release
-
Statement type:
File details
Details for the file memprobe-0.1.2-py3-none-any.whl.
File metadata
- Download URL: memprobe-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5319fa7d4209eb533c85168c782be1050463efe23ff0e1433dfbad49a2b14e99
|
|
| MD5 |
c65a3eb754f9af4ec12a135caaeb2e3d
|
|
| BLAKE2b-256 |
2ad29f9250688bc4e70516f5f8d5d46d3f2ca8de7e263edd0722d9d072420819
|
Provenance
The following attestation bundles were made for memprobe-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on memprobe-dev/memprobe_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memprobe-0.1.2-py3-none-any.whl -
Subject digest:
5319fa7d4209eb533c85168c782be1050463efe23ff0e1433dfbad49a2b14e99 - Sigstore transparency entry: 1803753325
- Sigstore integration time:
-
Permalink:
memprobe-dev/memprobe_api@950f16735e2451f139f317bcdeaddea681ed0a27 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/memprobe-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@950f16735e2451f139f317bcdeaddea681ed0a27 -
Trigger Event:
release
-
Statement type: