Python frame stack sampler for CPython
翻译准备中
开发工具C · PythonGitHub @P403n1x87自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Austin is a Python frame stack sampler for CPython written in pure C. Samples are collected by reading the CPython interpreter virtual memory space to retrieve information about the currently running threads along with the stack of the frames that are being executed. Hence, one can use Austin to easily make powerful statistical profilers that have minimal impact on the target application and that don't require any instrumentation.
The key features of Austin are:
mod_wsgi).The simplest way to turn Austin into a full-fledged profiler is to use together with the VS Code extension or combine it with FlameGraph or Speedscope. However, Austin's binary output can be piped into any other external or custom tools for further processing. Look, for instance, at the following Python TUI
Check out A Survey of Open-Source Python Profilers by Peter Norton for a general overview of Austin.
Check out the documentation for more tool ideas and examples!
The full documentation, with one version for each Austin minor release, is available at https://p403n1x87.github.io/austin/. It covers
asyncio support;Austin is available from PyPI and from the major software repositories of the most popular platforms
| Platform | Command |
|---|---|
| Any (PyPI) | pip install austin-dist |
| Linux (Snap) | sudo snap install austin --classic |
| Debian/Ubuntu | sudo apt install austin |
| macOS | brew install austin |
| Windows | choco install austin or scoop install austin |
| Linux/macOS (Conda) | conda install -c conda-forge austin |
Pre-compiled binaries and installers are available from the latest release page. See the installation page for how to build Austin from sources.
To profile a Python script, run
austin -o profile.mojo python myscript.py
To profile a running Python application, attach Austin to it with
austin -o profile.mojo -p <pid>
Austin writes its samples in the binary MOJO format. The recommended way to
visualise them is with the Austin VS Code extension, which opens .mojo files
directly. The austin-python package provides tools to convert them to other
formats, like the collapsed stacks used by FlameGraph, or Speedscope.
Coding agents can analyse Austin profiles too, either through the MCP server
that comes with the VS Code extension, or with the austin-query tool from the
austin-python package. See agentic workflows for how to set them up.
The usage page describes all the command line options, and the features page covers each of them in detail.
Austin runs on Linux, macOS and Windows. The compatibility page lists the supported Python versions and architectures for each release, and the platform-specific details to be aware of.
Austin is written in pure C, has no dependencies beyond the standard C library, and is just a sampler, so it can sample at very high rates with minimal impact on the target application. Read more about why Austin in the documentation.
See the examples in the documentation, and the ecosystem page for the tools that build on Austin.
If you like Austin and you find it useful, there are ways for you to contribute.
If you want to help with the development, then have a look at the open issues and have a look at the contributing guidelines before you open a pull request.
You can also contribute to the development of the Austin by becoming a sponsor and/or by buying me a coffee on BMC or by chipping in a few pennies on PayPal.Me.