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

temporary debugging aid #1192

Closed
wants to merge 2 commits into from
Closed

Conversation

klochowicz
Copy link
Contributor

This is purely for debugging. we might add it with some dart-define flag afterwards, but I didn't bother cleaning this whilst we're still bug hunting

The previous setting never worked for me.
Setting it to automatic, as the error message suggested, works when I'm
deploying locally.

If this works for others & for our fastlane / release process, it would be
    really convenient.
@klochowicz klochowicz marked this pull request as draft August 30, 2023 04:44
@@ -444,11 +444,9 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't commit this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you read the description of this PR? it's just a draft for aiding debugging of the problem we're having 🙃 none of it gets in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the name of the PR to make it less ambiguous, I realised that it would have helped to filter out the PR before you jumped into it.

let frequency = Duration::from_secs(5);
runtime.spawn(async move {
for metrics in runtime_monitor.intervals() {
tracing::debug!(?metrics, "tokio metrics");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea of how to use these metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it tells you all the information about the current runtime - descriptions of the metrics are here:

https://docs.rs/crate/tokio-metrics/latest

one of the most interesting for us are for example:

also, if the queue of tasks scheduled but not executed would be growing we could see some contention with things falling behind.

also:task metrics might be interesting too.

Copy link
Contributor

@Restioson Restioson Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maximum amount the worker thread was busy

Interesting, does this include blocking threads?

Regardless, it will be good to make sure we aren't accidentally doing blocking work on the runtime!

That being said, there are a lot of them, so we might want to only log some subset of them every 5s, and then a more detailed view e.g once every 30min-1h? Just thinking of the tracing catastrophe I accidentally caused 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not intended to be merged; I have now made it clear by renaming the PR!

this is more of a showcase of another tool that one can have on their side branch.

@klochowicz klochowicz changed the title chore: Add tokio metrics to the app temporary debugging aid Aug 31, 2023
@klochowicz klochowicz closed this Sep 4, 2023
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.

3 participants