Skip to content

Commit

Permalink
chore(README): Enhance README with link to Austin
Browse files Browse the repository at this point in the history
  • Loading branch information
P403n1x87 committed Jan 7, 2021
1 parent 445b8a8 commit b881786
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Publish coverage metrics
run: |
cd $GITHUB_WORKSPACE/main
poetry run codecov
nox -rs coverage
if: startsWith(matrix.os, 'ubuntu')
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
before_script:
# Install required Python versions
- sudo add-apt-repository ppa:deadsnakes/ppa -y
- sudo apt install python3.{6..8} python3.{6..8}-dev -y;
- sudo apt install python3.{6..9} python3.{6..9}-dev python3.9-venv -y;

# Clone Austin development branch
- git clone --branch devel --depth 1 https://github.com/P403n1x87/austin.git ../austin
Expand Down
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@

# Synopsis

Austin Web is a modern web interface for Austin, based on
[D3.js](https://d3js.org/) and [tailwindcss](https://tailwindcss.com/). It is
yet another example of how to use Austin to make a visual profiling tool for
Python. The flame graph is generated using
[d3-flame-graph](https://github.com/spiermar/d3-flame-graph).
Austin Web is a modern web interface for [Austin], the frame stack sampler for
CPython, based on [D3.js] and [tailwindcss]. It is yet another example of how to
use Austin to make a visual profiling tool for Python. The flame graph is
generated using [d3-flame-graph].

<p align="center">
<img src="art/austin-web-serve.gif"
Expand All @@ -76,25 +75,22 @@ seconds with newly collected data. Hence, Austin Web can also be used for
_remote_ profiling.

You can also run Austin Web in _compile_ mode to generate a static flame graph
HTML page, much like
[flamegraph.pl](https://github.com/brendangregg/FlameGraph), but with the full
Austin Web UI around it.
HTML page, much like [flamegraph.pl], but with the full Austin Web UI around it.


# Installation

Austin Web can be installed from PyPI simply with

~~~ bash
pip install austin-web
pipx install austin-web
~~~

> **NOTE** Austin Web relies on the
> [Austin](https://github.com/P403n1x87/austin) binary being available from the
> `PATH` environment variable. So make sure that Austin is properly installed on
> your system. See
> [Austin installation](https://github.com/P403n1x87/austin#installation)
> instruction for more details on how to get Austin installed on your platform.
> [Austin] binary being available from the `PATH` environment variable. So make
> sure that Austin is properly installed on your system. See [Austin
> installation](https://github.com/P403n1x87/austin#installation) instruction
> for more details on how to get Austin installed on your platform.

# Usage
Expand Down Expand Up @@ -147,6 +143,14 @@ mode, pressing `Ctrl+C` might not actually stop Austin Web.

Since Austin Web uses Austin to collect samples, the same note applies here:

> Attaching to a running process in Python requires the `cap_systrace`
> capability. To avoid running Austin Web with `sudo`, consider setting it to
> the Austin binary with, e.g.
>
> ~~~ bash
> sudo setcap cap_sys_ptrace+ep `which austin`
> ~~~
> Due to the **System Integrity Protection** introduced in **MacOS** with El
> Capitan, Austin cannot profile Python processes that use an executable located
> in the `/bin` folder, even with `sudo`. Hence, either run the interpreter from
Expand All @@ -173,3 +177,10 @@ on BMC or by chipping in a few pennies on
alt="Buy Me A Coffee" />
</a>
</p>
[Austin]: https://github.com/P403n1x87/austin
[D3.js]: https://d3js.org/
[d3-flame-graph]: https://github.com/spiermar/d3-flame-graph
[flamegraph.pl]: https://github.com/brendangregg/FlameGraph
[tailwindcss]: https://tailwindcss.com/
6 changes: 4 additions & 2 deletions austin_web/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ def run(self) -> None:
loop.run_forever()
if not austin_task.done():
austin_task.cancel()
loop.run_until_complete(austin_task)
austin_task.result()
try:
loop.run_until_complete(austin_task)
except asyncio.CancelledError:
pass
except AustinError as e:
(message,) = e.args
if message[0] == "(":
Expand Down

0 comments on commit b881786

Please sign in to comment.