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

chore: improve aggregator event queue efficiency #457

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
40e2f6f
chore: update Tonic and Prost dependencies (#364)
hawkw Aug 5, 2022
23cb6bf
feat(console): only suggest opening issues for panics (#365)
hawkw Aug 5, 2022
6646568
feat(console): init error handling before subcmds (#365)
hawkw Aug 5, 2022
523a44a
feat(console): filter out boring frames in backtraces (#365)
hawkw Aug 5, 2022
fcb54df
feat(console): include config options in autogenerated issues (#365)
hawkw Aug 5, 2022
2cb6ee5
chore(api): prepare to release v0.4.0 (#366)
hawkw Aug 10, 2022
337a972
chore: prepare to release console-subscriber v0.1.7 (#367)
hawkw Aug 10, 2022
3bf60bc
chore: prepare to release tokio-console v0.1.7 (#368)
hawkw Aug 10, 2022
faaf808
chore(api): fix clippy errors (#375)
Noah-Kennedy Sep 4, 2022
0106407
fix(subscriber): fix build on tokio 1.21.0 (#374)
Noah-Kennedy Sep 4, 2022
8fb1732
chore(subscriber): prepare to release v0.1.8 (#376)
hawkw Sep 4, 2022
da0e972
fix(console): fix ascii-only flipped input (#377)
michealkeines Sep 7, 2022
40f7971
fix(console): declare `tokio-console` bin as `default-run` (#379)
dcaba Sep 21, 2022
3248caa
fix(console): make `retain_for` default to 6s if not specfied (#383)
abusch Oct 7, 2022
06531a9
docs: fix typos and markdown lints (#369)
kianmeng Oct 7, 2022
d98f159
fix(console): enable view-switching keystrokes on details views (#387)
arifd Nov 17, 2022
c7ce40f
chore(ci): build for aarch64 (#389)
maximeborges Dec 6, 2022
70fc2c5
chore(console): upgrade parking_lot to 0.12 (#390)
Mythra Dec 6, 2022
300bd93
style: make clippy happy (#396)
Rustin170506 Jan 18, 2023
a7548d0
fix(console): fix `ViewOptions` default lang' (#394)
ymgyt Jan 18, 2023
3c668a3
fix(subscriber): fix off-by-one indexing for `callsites` (#391)
danielhenrymantilla Jan 18, 2023
f01c457
chore(console): fix ConfigFile comment typo (#392)
ymgyt Jan 19, 2023
7286d6f
fix(subscriber): bump minimum Tokio version (#397)
Rustin170506 Feb 6, 2023
57b866d
feat(console): reduce decimal digits in UI (#402)
hds Mar 8, 2023
4ec13da
chore(console): remove `tracing-subscriber` 0.2 from dependencies (#404)
hds Mar 28, 2023
001fc49
feat(console): use tokio task ids in task views (#403)
hds Mar 28, 2023
bff8b8a
feat(console): add support for Unix domain sockets (#388)
benesch Mar 28, 2023
6fa2185
fix(console): fix calculation of busy time during poll (#405)
hds Mar 30, 2023
af6693b
refac(console): factor out `Durations` widget from task view (#408)
hds Apr 13, 2023
ac20daa
feat: add scheduled time per task (#406)
hds Apr 19, 2023
36839de
chore: Use fixed Rust version for clippy (and fmt) (#413)
hds Apr 21, 2023
3b37dda
feat(console): add task scheduled times histogram (#409)
hds Apr 21, 2023
10bb2df
style(console): work around Rust 1.69 `almost_swapped` lint (#414)
hds May 8, 2023
665e5f6
chore(deps): bump h2 from 0.3.13 to 0.3.18 (#415)
dependabot[bot] May 8, 2023
17093bc
chore(release): generate changelogs with `git-cliff` (#416)
hawkw May 8, 2023
eeca672
chore(nix): unpin nixpkgs version in flake (#418)
hawkw May 9, 2023
1a94c4b
chore: add automated release script (#417)
hawkw May 9, 2023
b70c1d8
feat(console-api): update `tonic` to v0.9 (#420)
hawkw May 9, 2023
54f6be9
feat: update `tonic` to 0.9 (#420)
hawkw May 9, 2023
e3c5656
feat: update MSRV to Rust 1.60.0
hawkw May 9, 2023
4f71484
docs(console): update screenshots in README (#419)
hds May 9, 2023
7b86f7f
docs(console): revert "update screenshots in README (#419)"
hawkw May 9, 2023
f4d3213
docs(console): update screenshots in README (#421)
hds May 9, 2023
21bc85d
chore(console-api): prepare to release console-api 0.5.0
hawkw May 9, 2023
c8a69e9
chore: update `console-api` deps to v0.5.0
hawkw May 9, 2023
05cdab0
chore(console-subscriber): prepare to release console-subscriber 0.1.9
hawkw May 9, 2023
5900300
chore(tokio-console): prepare to release tokio-console 0.1.8
hawkw May 9, 2023
e81dfad
chore: update lockfile
hawkw May 9, 2023
cbf6f56
docs(README): update repository README screenshots and help text (#422)
hds May 12, 2023
2617504
fix(console): remove histogram minimum count (#424)
hds May 17, 2023
ee71e22
chore(console): migrate to `ratatui` and update `crossterm` (#425)
joshka May 31, 2023
ee0b8e2
fix(subscriber): fix self wakes count (#430)
hds Jun 1, 2023
ea00694
refac(console): generalize controls widget (#427)
hds Jun 1, 2023
dca4e9e
chore: fix some typos (#435)
striezel Jun 9, 2023
5156e8e
feat(console): help view modal (#432)
hds Jun 10, 2023
fb45ca1
console_subscriber: remove clock skew warning in start_poll (#434)
h33p Jun 10, 2023
9107562
chore: replace unmaintained actions-rs/* actions in CI workflows (#436)
striezel Jun 10, 2023
2de5b68
docs(console): add column descriptions for all tables (#431)
hds Jun 14, 2023
ce4a8cb
fix: update proc-macro2 to build on nightly (#442)
hds Jul 3, 2023
0abd0f8
chore: update Swatinem/rust-cache action in GHA workflows (#437)
striezel Jul 3, 2023
29a09ad
fix(console): remove trailing space from task/resource location (#443)
hds Jul 3, 2023
91929d0
fix(subscriber): do not report excessive polling (#378) (#440)
MatteoNardi Jul 3, 2023
daa3d51
fix(console): make long locations readable (#441)
guerinoni Jul 3, 2023
761ffca
chore: remove branch config from release action (#444)
hawkw Jul 3, 2023
abaea54
chore(console-subscriber): prepare to release console-subscriber 0.1.10
hawkw Jul 3, 2023
6402586
chore: fix lockfile pushing in release.sh
hawkw Jul 3, 2023
7c8e80a
chore(tokio-console): prepare to release tokio-console 0.1.9
hawkw Jul 3, 2023
88638f9
fix(api): add explicit `futures-core` dep to fix broken builds (#453)
weiznich Jul 24, 2023
f4536af
feat(subscriber) expose server parts (#451)
hds Jul 28, 2023
639e03b
feat(console): Add way to inspect details of task from resource view …
guerinoni Jul 28, 2023
fa9a45c
fix(subscriber): correct retain logic (#447)
hds Aug 1, 2023
426dfcf
chore: fix typo in link to documentation (#454)
Maaxxs Aug 2, 2023
f50f7bc
chore: improve aggregator event queue efficiency
h33p Aug 16, 2023
349e7bf
Apply review suggestions
h33p Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]
rustflags = ["--cfg", "tokio_unstable"]

[alias]
xtask = "run --manifest-path ./xtask/Cargo.toml --"
57 changes: 19 additions & 38 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,12 @@ jobs:
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

test_os:
name: Tests on ${{ matrix.os }} with Rust ${{ matrix.rust }}
Expand All @@ -55,9 +51,8 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
include:
# Make 1.58 MSRV due to <=1.57 failing to build console-api due to a bug
# with cargo version resolution.
- rust: 1.58.0
# Make 1.60 MSRV, as it's Tonic 0.9's MSRV.
- rust: 1.60.0
os: ubuntu-latest
# Try to build on the latest nightly. This job is allowed to fail, but
# it's useful to help catch bugs in upcoming Rust versions.
Expand All @@ -68,30 +63,24 @@ jobs:
uses: actions/checkout@v3

- name: Install ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Run cargo test (API)
uses: actions-rs/cargo@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
command: test
args: -p console-api
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run cargo test (API)
run: cargo test -p console-api

- name: Run cargo test (subscriber)
uses: actions-rs/cargo@v1
with:
command: test
args: -p console-subscriber
run: cargo test -p console-subscriber

- name: Run cargo test (console)
uses: actions-rs/cargo@v1
with:
command: test
args: -p tokio-console --locked
run: cargo test -p tokio-console --locked

lints:
name: Lints
Expand All @@ -101,22 +90,14 @@ jobs:
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings
17 changes: 15 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
prefix: "(console-subscriber)|(console-api)|(tokio-console)"
changelog: "$prefix/CHANGELOG.md"
title: "$prefix $version"
branch: main
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -32,12 +31,26 @@ jobs:
needs: create-release
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: aarch64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tokio-console
target: ${{ matrix.target }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Code of Conduct

The Tokio project adheres to the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). This describes the minimum behavior expected from all contributors.
The Tokio project adheres to the
[Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
This describes the minimum behavior expected from all contributors.

## Enforcement

Instances of violations of the Code of Conduct can be reported by contacting the project team at [moderation@tokio.rs](mailto:moderation@tokio.rs).
Instances of violations of the Code of Conduct can be reported by contacting
the project team at [moderation@tokio.rs](mailto:moderation@tokio.rs).
63 changes: 31 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
:balloon: Thanks for your help improving the project! We are so happy to have
you!

There are opportunities to contribute to Tokio at any level. It doesn't matter if
you are just getting started with Rust or are the most weathered expert, we can
use your help.
There are opportunities to contribute to Tokio at any level. It doesn't matter
if you are just getting started with Rust or are the most weathered expert, we
can use your help.

**No contribution is too small and all contributions are valued.**

Expand All @@ -20,8 +20,8 @@ not covered in this guide, please joinus!
## Conduct

The Tokio project adheres to the [Rust Code of Conduct][coc]. This describes
the _minimum_ behavior expected from all contributors. Instances of violations of the
Code of Conduct can be reported by contacting the project team at
the _minimum_ behavior expected from all contributors. Instances of violations
of the Code of Conduct can be reported by contacting the project team at
[moderation@tokio.rs](mailto:moderation@tokio.rs).

[coc]: https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md
Expand Down Expand Up @@ -156,7 +156,7 @@ The provided [example application] can be used for testing UI changes:

When opening pull requests that make UI changes, please include one or more
screenshots demonstrating your change! For bug fixes, it is often also useful to
include a screenshot showing the console *prior* to the change, in order to
include a screenshot showing the console _prior_ to the change, in order to
demonstrate the bug that's being fixed.

#### Integration tests
Expand All @@ -178,7 +178,7 @@ for a reader to understand and actually testing the API.
The type level example for `tokio_timer::Timeout` provides a good example of a
documentation test:

```
```rust
/// // import the `timeout` function, usually this is done
/// // with `use tokio::prelude::*`
/// use tokio::prelude::FutureExt;
Expand All @@ -204,7 +204,7 @@ documentation test:
/// # }
```

Given that this is a *type* level documentation test and the primary way users
Given that this is a _type_ level documentation test and the primary way users
of `tokio` will create an instance of `Timeout` is by using
`FutureExt::timeout`, this is how the documentation test is structured.

Expand All @@ -215,7 +215,7 @@ easiest way to execute a future from a test.
If this were a documentation test for the `Timeout::new` function, then the
example would explicitly use `Timeout::new`. For example:

```
```rust
/// use tokio::timer::Timeout;
/// use futures::Future;
/// use futures::sync::oneshot;
Expand Down Expand Up @@ -254,7 +254,7 @@ history**. But also, we use the git commit messages to **generate the
change log**.

Since commits are merged by [squashing](#commit-squashing), these rules are not
required for individual commits to a development branch. However, they *are*
required for individual commits to a development branch. However, they _are_
required for the final squash commit to the `main` branch. Generally, the PR
description and title are used as the commit message for the squash commit.
Therefore, please try to follow these rules when writing the description and
Expand All @@ -266,7 +266,7 @@ Each commit message consists of a **header**, a **body** and a
**footer**. The header has a special format that includes a **type**,
an (optional) **scope** and a **subject**:

```
```sh
<type>(<scope>): <subject>
<BLANK LINE>
<body>
Expand All @@ -284,6 +284,7 @@ which we use to generate changelogs.
[clog]: https://github.com/clog-tool/clog-cli

#### Type

Must be one of the following:

* **feat**: A new feature
Expand Down Expand Up @@ -335,7 +336,6 @@ is also the place to reference GitHub issues that this commit
The last line of commits introducing breaking changes should be in the
form `BREAKING CHANGE: <desc>`


### Opening the Pull Request

Open a new pull request using the GitHub web UI. Please try to follow the
Expand Down Expand Up @@ -388,7 +388,7 @@ does not land, the submitters should come away from the experience feeling like
their effort was not wasted or unappreciated**. Every Pull Request from a new
contributor is an opportunity to grow the community.

### Review a bit at a time.
### Review a bit at a time

Do not overwhelm new contributors.

Expand All @@ -407,7 +407,7 @@ Note that only **incremental** improvement is needed to land a PR. This means
that the PR does not need to be perfect, only better than the status quo. Follow
up PRs may be opened to continue iterating.

When changes are necessary, *request* them, do not *demand* them, and **do not
When changes are necessary, _request_ them, do not _demand_ them, and **do not
assume that the submitter already knows how to add a test or run a benchmark**.

Specific performance optimization techniques, coding styles and conventions
Expand All @@ -427,7 +427,7 @@ with the appropriate reason to keep the conversation flow concise and relevant.

### Be aware of the person behind the code

Be aware that *how* you communicate requests and reviews in your feedback can
Be aware that _how_ you communicate requests and reviews in your feedback can
have a significant impact on the success of the Pull Request. Yes, we may land
a particular change that makes Tokio better, but the individual might just not
want to have anything to do with Tokio ever again. The goal is not just having
Expand All @@ -440,7 +440,7 @@ check with the contributor to see if they intend to continue the work before
checking if they would mind if you took it over (especially if it just has nits
left). When doing so, it is courteous to give the original contributor credit
for the work they started (either by preserving their name and email address in
the commit log, or by using an `Author: ` meta-data tag in the commit.
the commit log, or by using an `Author:` meta-data tag in the commit.

_Adapted from the [Node.js contributing guide][node]_.

Expand All @@ -458,36 +458,35 @@ targeted at maintainers. Most contributors aren't able to set these labels.

The area label describes cross-cutting areas of work on the console project.

- **A-instrumentation**: Related to application instrumentation (such as adding
* **A-instrumentation**: Related to application instrumentation (such as adding
new instrumentation to an async runtime or other library).
- **A-warnings**: Related to warnings displayed in the console CLI. This
* **A-warnings**: Related to warnings displayed in the console CLI. This
includes changes that add new warnings, improve existing warnings, or
improvements to the console's warning system as a whole.
- **A-recording**: Related to recording and playing back console data.
* **A-recording**: Related to recording and playing back console data.

### Crate

The crate label describes what crates in the repository are involved in an issue
or PR.

- **C-api**: Related to the `console-api` crate and/or protobuf definitions.
- **C-console**: Related to the `console` command-line application.
- **C-subscriber**: Related to the `console-subscriber` crate.
* **C-api**: Related to the `console-api` crate and/or protobuf definitions.
* **C-console**: Related to the `console` command-line application.
* **C-subscriber**: Related to the `console-subscriber` crate.

### Effort and calls for participation

The effort label represents a _best guess_ for the approximate amount of effort
that an issue will likely require. These are not always accurate! :)


- **E-easy**: This is relatively easy. These issues are often good for newcomers
* **E-easy**: This is relatively easy. These issues are often good for newcomers
to the project and/or Rust beginners.
- **E-medium**: Medium effort. This issue is expected to be relatively
* **E-medium**: Medium effort. This issue is expected to be relatively
straightforward, but may require a larger amount of work than `E-easy` issues,
or require some design work.
- **E-hard** This either involves very tricky code, is something we don't know
* **E-hard** This either involves very tricky code, is something we don't know
how to solve, or is difficult for some other reason.
- **E-needs-mvce**: This bug is missing a minimal complete and verifiable
* **E-needs-mvce**: This bug is missing a minimal complete and verifiable
example.

The "E-" prefix is the same as used in the Rust compiler repository. Some
Expand All @@ -499,14 +498,14 @@ server if you want to know how difficult an issue likely is.
The severity label categorizes what type of issue is described by an issue, or
what is implemented by a pull request.

- **S-bug**: This is a bug in the console. If this label is added to an issue,
* **S-bug**: This is a bug in the console. If this label is added to an issue,
then that issue describes a bug. If this label is added to a pull request,
then this pull request *fixes* a bug.
- **S-feature**: This is adding a new feature.
- **S-performance**: Related to improving performance, either in the
then this pull request _fixes_ a bug.
* **S-feature**: This is adding a new feature.
* **S-performance**: Related to improving performance, either in the
instrumented application or in the `console` CLI. This may be added to
performance regressions that don't result in a crash or incorrect data, as
well as to pull requests that implement optimizations.
- **S-refactor**: This is a refactor. This label describes proposed or
* **S-refactor**: This is a refactor. This label describes proposed or
implemented changes that are related to improve code quality or set up for
future changes, but shouldn't effect behavior, fix bugs, or add new APIs.
Loading