Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport aiomonitor-ng #334

Merged
merged 50 commits into from
Apr 24, 2023
Merged

Backport aiomonitor-ng #334

merged 50 commits into from
Apr 24, 2023

Conversation

achimnol
Copy link
Member

Check out what's added in #333! 😉

achimnol and others added 30 commits August 25, 2022 18:07
* Implement creation/cancellation traceback chain using a custom task factory
* Add taskgroup example with aiotools
* NOTICE: If this fork's improvements are accepted by the original
  authors of aiomonitor, it will be merged back to the original project.
  The purpose of fork is to keep up with the release cycle of Backend.AI.
- This will help us to inspect thousands of tasks
- Add more columns to assist debugging
* feat: Adopt `prompt_toolkit` to serve concurrent telnet connections
* feat: Implement our own minimal telnet client as `aiomonitor.telnet`
  - This will make `aiomonitor.cli` to work seamlessly with `prompt_toolkit`.
  - ref: https://github.com/jquast/telnetlib3/
* feat: Migrate to Click-based command line interface
* fix: Override click's stdout/stderr with per-connection stdout
* feat: Implement the exit command
* fix: Support async Click command handlers using events
* fix: Reimplement console proxy
  - It uses an inner `prompt_toolkit.PromptSession()` to handle the user
    inputs of the aioconsole prompt.
* New commands:
  - `ps-terminated` (`pt`, `pst`)
  - `where-termianted` (`wt`)

* New options:
  - `ps`, `pt`: `-f`, `--filter` to search task logs by their names and
    coroutine summary strings
  - `aiomonitor.Monitor` now has the history limit option (default: 1000)

* Prevent memory leak of the termination logs using memray and tracemalloc
  - The memory leaked by `myself = asyncio.current_task()` in the
    coroutine wrapper.
  - Also use the weak value for task creation chains to ensure gc
    target tasks.
- We should preserve the termination log of tasks that are supposed to
  be long-running and not terminated during the entire application
  lifecycle (e.g., server apps), when there are many volatile tasks
  continuously spawned and destroyed, regardless of the history limit.
@wbarnha
Copy link
Member

wbarnha commented Apr 24, 2023

LGTM! 🤠

@achimnol achimnol merged commit b54859a into aio-libs:master Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants