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

Add tokio-trace feature for tokio-console debug tool #4417

Merged

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Apr 14, 2024

What problem does this PR solve?

Add tokio-trace feature for ckb, then we can use https://github.com/tokio-rs/console to debug tokio related code.

There are some envs can affect this feature's behavior:

    /// | `TOKIO_CONSOLE_RETENTION`        | The duration of seconds to accumulate completed tracing data | 3600s (1h)        |
    /// | `TOKIO_CONSOLE_BIND`             | a HOST:PORT description, such as `localhost:1234`            | `127.0.0.1:6669`  |
    /// | `TOKIO_CONSOLE_PUBLISH_INTERVAL` | The duration to wait between sending updates to the console  | 1000ms (1s)       |
    /// | `TOKIO_CONSOLE_RECORD_PATH`      | The file path to save a recording                            | None              |

Multiple ckb nodes should use different TOKIO_CONSOLE_BIND. If they all use the same TOKIO_CONSOLE_BIND, the tokio-console will not display anything.

image

image

Related changes

  • Add tokio-trace feature

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • None

Release note

Title Only: Include only the PR title in the release note.

@eval-exec eval-exec requested a review from a team as a code owner April 14, 2024 05:06
@eval-exec eval-exec requested review from doitian and removed request for a team April 14, 2024 05:06
@zhangsoledad zhangsoledad added this pull request to the merge queue Apr 19, 2024
Merged via the queue into nervosnetwork:develop with commit f776c62 Apr 19, 2024
33 checks passed
@eval-exec eval-exec deleted the exec/tokio-console-trace branch April 19, 2024 06:46
@doitian doitian mentioned this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants