From py-spy to an answer

Sample a running Python process, upload the output, and read findings instead of scrolling a flame graph.

py-spy is the right way to profile Python — it samples a running process without modifying it or restarting it. What it gives you is a flame graph, which is a picture of the truth rather than a statement of it. flamelens turns the sample set into ranked findings.

The output py-spy already writes

No wrapper, no instrumentation, no code change.

  • speedscope JSON from `py-spy record -f speedscope`
  • Raw folded stacks
  • Profiles from a process you attached to in production

Native frames kept honest

Time inside a C extension is time, and it gets reported as such.

  • Interpreter frames and native frames distinguished
  • Library time attributed to the library

Findings in the language you wrote

The report names your functions, not sample counts.

  • Ranked by cost, with the stacks as evidence
  • A suggested change per finding

Report history and PDF

Same artefacts as every other supported runtime.

  • Keep a before and after for the same workload

How to capture a Python profile →

Frequently asked questions

How do I produce a profile py-spy can export?

`py-spy record -f speedscope -o profile.json --pid <pid>` attaches to a running process and writes a speedscope file. It needs no changes to the program and does not restart it.

Can flamelens profile my Python process directly?

No — and this is a deliberate limit rather than a missing feature. The live-scanning path works by attaching to a JVM's management interface; Python has no equivalent flamelens can safely reach. Python is upload-only.

Does it handle a profile with native extensions in it?

Yes. py-spy can capture native frames, and flamelens reads them as part of the same stack rather than collapsing them into an opaque block.

Upload a profile. Leave with a plan.

Free to start — 10MB recordings, full reports, no card.

Create a free account