Who it is forA developer who has a slow Python script or benchmark and wants to see where time goes before changing code.
The problemProfiling output is hard to read and easy to over-interpret, and a manual profiling setup takes time.
The outcomeA bounded evidence result for the run that points to hotspots, with its limitations stated, ready for a hypothesis to be tested.
What you need first
- Node.js (for npx) or uv (for uvx) installed
- Python 3.12 or newer for the local development path
- An absolute path to an existing artifact file, or an explicit command to run from an absolute working directory
Steps
- Open a terminal in the project folder and note its absolute path with
pwd. - Run
uvx flameox capture --provider direct --cwd "$PWD" -- python benchmark.pywith your own benchmark script in place of benchmark.py. - Read the returned evidence and any
next_pagevalue; replay anext_pagecontinuation using its named analysis tool and arguments unchanged. - Treat the hotspots as exploration leads only; plan a separate experiment before claiming any speedup.
Prompt for your agent
Using the flameox repo, capture a profile of <benchmark command> run from the absolute working directory <project path> with `uvx flameox capture --provider direct --cwd <project path> -- <benchmark command>`. Return the bounded hotspot evidence and its stated limitations. Verify that the result states what was observed versus inferred and does not claim causality.
Caveat. Flameox records what the profile shows and does not establish causality or performance improvement, so any fix still needs its own measured experiment.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for morluto/flameox and "Profile a Python benchmark for runtime hotspots"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer