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 documentation for runtime tracing #768

Merged
merged 9 commits into from
Jul 5, 2024
Merged

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Jul 3, 2024

New feature added in crystal-lang/crystal#14659

Resolves #766

Copy link

netlify bot commented Jul 3, 2024

Deploy Preview for crystal-book ready!

Name Link
🔨 Latest commit fb90281
🔍 Latest deploy log https://app.netlify.com/sites/crystal-book/deploys/6686652bef12f20008bacbb8
😎 Deploy Preview https://deploy-preview-768--crystal-book.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

$ crystal build -Dtracing hello-world.cr
$ CRYSTAL_TRACE=sched ./hello-world
sched.spawn 70569399740240 thread=0x7f48d7dc9740:? fiber=0x7f48d7cd0f00:main fiber=0x7f48d7cd0dc0:Signal Loop
sched.enqueue 70569399831716 thread=0x7f48d7dc9740:? fiber=0x7f48d7cd0f00:main fiber=0x7f48d7cd0dc0:Signal Loop duration=163
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nice to expand upon the structure of the output. Like duration=163; what unit is that? Probably could do that as a follow up tho.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we should, all times and durations are in nanoseconds!

Copy link
Member

Choose a reason for hiding this comment

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

I second that it's missing what output to expect

Copy link
Contributor

Choose a reason for hiding this comment

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

Especially since a 5 seconds sleep will print 5000000000 😱

docs/guides/runtime_tracing.md Outdated Show resolved Hide resolved
docs/guides/runtime_tracing.md Show resolved Hide resolved
@straight-shoota straight-shoota merged commit 4298dfa into master Jul 5, 2024
14 checks passed
@straight-shoota straight-shoota deleted the feat/runtime-tracing branch July 5, 2024 11:10
This pull request was closed.
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.

Document Tracing Feature
4 participants