Git Product home page Git Product logo

austin-tui's Introduction

Synopsis

Gabriele has a curiosity that's hard to appease. Since a early age he's always been intrigued by Science and Nature and wanted to know more about its fundamental laws. Together with his taste for abstraction as a way to find order and rigour in things, he embarked on an adventure to learn about Physics and Mathematics. He likes Technology very much too, a trait you could have guessed if you had the chance to see him crack open any gizmos he came across to see what was inside and understand how they worked.

Changelog

2016 - Upgrade to PhD Pure Mathematics

2011 - Upgrade to MSc Theoretical Physics

2009 - Upgrade to BSc Physics

1987 - Initial release

Publications

A list of all my academic publications can be found on arxiv.org.

I maintain The Hub of Heliopolis, a blog where I collect the notes of my experiments with technology.

I'm also the author of the following books

Main Projects

Currently, my main project is Austin, a frame stack sampler for CPython which can be used to build powerful statistical profilers for Python applications that don't require instrumentation and have minimal impact on the application runtime, making it ideal for profiling in production.

Contributions

My work on Austin is helping developing the profiling interface of Python. See my contributions to CPython for more details.

Growth

I always wanted to learn about Machine Learning and in 2018 I started exploring its mathematical fundamentals. You can find my personal take in my book The Mathematical Foundations of Machine Learning.

My project Marvin collects some code that I wrote as part of my experiments and applications of ML techniques that I have used to solve certain problems.

Stats

GitHub Stats
GitHub Stats
Top Language


GitHub Pages LinkedIn Stack Exchange Twitter wikipedia

visits repos gists

austin-tui's People

Contributors

alexchamberlain avatar cool-rr avatar dponkin avatar kesmit13 avatar p403n1x87 avatar siboehm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

austin-tui's Issues

cant't start austin-tui

When trying to start austin-tui, I get the following error. Any ideas why?
prompt$ austin-tui -Cp 4147221
Austin did not start properly.
/home/selim/.local/lib/python3.8/site-packages/austin_tui/main.py:178: RuntimeWarning: coroutine 'wait' was never awaited
pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Feature request: Don't require austin.exe to be on Path

austin_tui can be smart enough to figure out where austin.exe is without requiring to add it to PATH, which is a bit invasive for just another tool in the toolbelt. One way to do it is by including a file ~/.austin which defines where the austin executable is, and then having austin_tui read that.

KeyboardInterrupt used for flow control

I saw that you use KeyboardInterrupt in a bunch of places. Raising it and catching it. I've never seen it done that way in a long career of Python programming. Admittedly I haven't touched many async-await code, so maybe it's prevalent there?

In any case, are you sure it's a natural way to do flow control? Why does a quit signal need to be a KeyboardInterrupt, can't you just make an exception class for that?

Feature request: Allow choosing Python process

It would be cool if I'd be able to launch austin-tui with no arguments, and get an option to choose between the Python processes active on my system. Faster than finding the PIDs by myself.

Unable to decrease threshold

Description

Pressing - doesn't increase the threshold. Nothing happens.

Steps to Reproduce

I've tried with a couple of different examples, and threshold never seems to reduce. For example sudo austin-tui python -m rich.emoji.

Expected behavior: Threshold % reduces

Actual behavior: Nothing

Reproduces how often: 100% - Tried on 3 different modules in the rich repo, always the same result.

Versions

austin 3.3.0
Monterrey 21.1 on M1 Macbook Pro

Austin-tui won't launch on Windows

Installed using pip install austin-tui.

Versions:

austin-python==0.1.0
austin-tui==0.1.3
c:\Users\Administrator\Desktop>austin-tui.exe -p 8600
๐Ÿ Starting the Austin TUI ...
โŒ Austin failed to start. Please make sure that the Austin binary is
available from the PATH environment variable and that the command line
arguments that you have provided are correct.

c:\Users\Administrator\Desktop>python -m austin_tui -p 8600
๐Ÿ Starting the Austin TUI ...
โŒ Austin failed to start. Please make sure that the Austin binary is
available from the PATH environment variable and that the command line
arguments that you have provided are correct.
C:\Program Files\Python38\lib\site-packages\austin_tui\__main__.py:137: DeprecationWarning: Task.all_
tasks() is deprecated, use asyncio.all_tasks() instead
  for task in asyncio.Task.all_tasks():
C:\Program Files\Python38\lib\site-packages\austin_tui\__main__.py:140: DeprecationWarning: Task.all_
tasks() is deprecated, use asyncio.all_tasks() instead
  pending = [task for task in asyncio.Task.all_tasks() if not task.done()]

austin-tui now on conda-forge

Just FYI, I've packaged austin-tui (and austin-python) on conda-forge, so now conda install -c conda-forge austin-tui is probably the most convenient way to install austin-tui.

@P403n1x87 let me know if you want to be a maintainer on the feedstock, I can always add you :) Thanks for creating this package, austin is great!

Frozen on ๐Ÿ Starting the Austin TUI ...

Description

I run the following command: austin-tui python train.py [arguments...]
Then I get the following message instead of the display screen shown in the README.
๐Ÿ Starting the Austin TUI ...
I know can see that the train script is running in the background since I have an external logger.

Versions

Austin version: 3.00 and my OS is CentOS 7 on Linux

Additional Information

I'm using pytorch in this script so I wonder if that's causing any problems

Some user feedback

This is a bunch of random user feedback from my first try of austin + austin-tui.

  • The austin compile instructions miss a cd austin.
  • Tmux breaks colors (see screenshot)
  • Ctrl + C does not work
  • It works great! :-) I love that you can switch threads so easily. It just works.
  • The top-like view changes so quickly it's almost impossible to see the profile.
  • -h doesn't say what unit the -i option should be given in.
  • If you switch to full mode, it is annoying to scroll through hundreds of lines with 0.01% usage. Maybe a display threshold could help, or a way to collapse subtrees?
  • I don't know what the CPU and mem graphs on the upper right mean. Consumption relative to total system resources? Consumption relative to parent Python process?

austin

TypeError: Passing coroutines is forbidden, use tasks explicitly.

Description

I'm running Austin-tui 1.2.2 with Python 3.11.3. Any time I try to use any keyboard navigation it crashes with the following:

Traceback (most recent call last):
  File "/home/me/.pyenv/versions/3.11.3/bin/austin-tui", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/__main__.py", line 175, in main
    tui.run()
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/__main__.py", line 140, in run
    self._view.close()
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/view/__init__.py", line 248, in close
    task.result()
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/view/__init__.py", line 173, in _input_loop
    self.on_exception(exc)
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/view/austin.py", line 67, in on_exception
    self.callback(self.Event.EXCEPTION, exc)
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/__main__.py", line 115, in on_view_event
    {
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/__main__.py", line 164, in on_exception
    raise exc
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/site-packages/austin_tui/view/__init__.py", line 151, in _input_loop
    done, pending = await asyncio.wait(
                    ^^^^^^^^^^^^^^^^^^^
  File "/home/me/.pyenv/versions/3.11.3/lib/python3.11/asyncio/tasks.py", line 415, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.

Steps to Reproduce

  1. Run austin-tui test.py
  2. Hit any key such as an arrow key

Expected behavior:

Keyboard navigation to work

Actual behavior:

Crash

Reproduces how often:

100%

Versions

You can get this information from copy and pasting the output of austin --version from the command line. Also, please include the OS and what version
of the OS you're running.

Austin 3.5.0
Python 3.11.3
Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

Additional Information

Any additional information, configuration or data that might be necessary to
reproduce the issue.

austin_tui won't start even when austin is on path

c:\Users\Administrator\Desktop>austin
Usage: austin [-aCefms?V] [-i n_us] [-o FILE] [-p PID] [-t n_ms] [-x n_sec]
            [--alt-format] [--children] [--exclude-empty] [--full]
            [--interval=n_us] [--memory] [--output=FILE] [--pid=PID]
            [--sleepless] [--timeout=n_ms] [--exposure=n_sec] [--help]
            [--usage] [--version] command [ARG...]

              _   _
 __ _ _  _ __| |_(_)_ _
/ _` | || (_-<  _| | ' \
\__,_|\_,_/__/\__|_|_||_|
โ‰กฦ’รฑรด austin version: 2.0.0

c:\Users\Administrator\Desktop>
c:\Users\Administrator\Desktop>austin-tui.exe -p 8600
๐Ÿ Starting the Austin TUI ...
โŒ Austin failed to start. Please make sure that the Austin binary is
available from the PATH environment variable and that the command line
arguments that you have provided are correct.
Python version is unknown.

XMLSyntaxError when I press `S` to save

Description

Hi, thanks for your work on Austin! I'm running it on some repos now and it's been enlightening

I'm getting an XMLSyntaxError when I press S to save results.

Steps to Reproduce

I'm running sudo austin-tui python -m rich inside the repo https://github.com/Textualize/rich (on master branch), and get the following error when I press the S key to save the data:

Traceback (most recent call last):
  File "/Users/darrenburns/.local/bin/austin-tui", line 8, in <module>
    sys.exit(main())
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/__main__.py", line 179, in main
    tui.run()
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/__main__.py", line 144, in run
    self._view.close()
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/view/__init__.py", line 238, in close
    task.result()
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/view/__init__.py", line 163, in _input_loop
    self.on_exception(exc)
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/view/austin.py", line 64, in on_exception
    self.callback(self.Event.EXCEPTION, exc)
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/__main__.py", line 119, in on_view_event
    {
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/__main__.py", line 168, in on_exception
    raise exc
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/view/__init__.py", line 161, in _input_loop
    task.result()
  File "/opt/homebrew/Cellar/[email protected]/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/controller.py", line 225, in _dump_stats
    self.view.markup(f"Stats saved as <running>{filename}</running> ๐Ÿ“ ")
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/view/__init__.py", line 187, in markup
    return markup(str(text), self.palette)
  File "/Users/darrenburns/.local/pipx/venvs/austin-tui/lib/python3.10/site-packages/austin_tui/widgets/markup.py", line 162, in markup
    root = etree.fromstring(f"<amRoot>{text}</amRoot>")
  File "src/lxml/etree.pyx", line 3252, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1913, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1793, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1082, in lxml.etree._BaseParser._parseUnicodeDoc
  File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "<string>", line 1
lxml.etree.XMLSyntaxError: Char 0x0 out of allowed range, line 1, column 2

Expected behavior: Data file to be saved to my filesystem

Actual behavior: Crash, with the exception above

Reproduces how often: 100% of the time

Versions

  • austin 3.3.0
  • MacOS Monterrey 12.1 on M1 Macbook Pro

Frozen on ๐Ÿ Starting the Austin TUI ...

Description

I run the following command: austin-tui -Cp [PID].
Then I got Frozen on ๐Ÿ Starting the Austin TUI ...

Reproduces how often:
happens every time

Versions

austin version
austin 3.5.0

austin-tui version
v1.2.2

OS
Windows 10

Additional Information

I have manually installed python-curses but it didn't help.
it works, if I trigger austin-tui -p [PID].

Unable to scroll horizontally

Description

I'm unable to scroll the TUI horizontally

Expected behavior: [What you expect to happen]

I should be able to scroll to the right and left

Actual behavior: [What actually happens]

image

I can't get to the stuff on the right of the screen

Reproduces how often: [What percentage of the time does it reproduce?]

Every time

Versions

austin 3.4.1
austin-tui 1.2.0
MacOS 12.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.