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

docs: add instructions for profiling with perf/DTrace #423

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

agostbiro
Copy link
Member

Add instructions for profiling with perf/DTrace.

Copy link

changeset-bot bot commented Apr 29, 2024

⚠️ No Changeset found

Latest commit: fbafaf8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@agostbiro agostbiro self-assigned this Apr 29, 2024
@agostbiro agostbiro added the no changeset needed This PR doesn't require a changeset label Apr 29, 2024
@@ -1,5 +1,35 @@
# Profiling

## Perf/DTrace

The [cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph) tool can be used to collect performance profiling data using [perf](https://en.wikipedia.org/wiki/Perf_(Linux)) on Linux and [DTrace](https://en.wikipedia.org/wiki/DTrace) on MacOS/Windows and then visualize it as a flamegraph.
Copy link
Member

@Wodann Wodann Apr 29, 2024

Choose a reason for hiding this comment

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

Question: Why didn't this work when running from JS? If the shared library (created by N-API) is built with debug symbols, running perf should also samples from EDR, if I'm not mistaken.

That was my hope with your approach too.

Copy link
Member Author

@agostbiro agostbiro Apr 29, 2024

Choose a reason for hiding this comment

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

I got failed to sample program when trying to pass node as the binary to profile. I spent some time trying to figure it out, but gave up after a while. Possibly a custom build of node would help, but felt that was too much effort.

Copy link
Member

@Wodann Wodann left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question

@agostbiro agostbiro merged commit 48f9470 into main Apr 30, 2024
25 of 26 checks passed
@agostbiro agostbiro deleted the docs/profiling-instructions branch April 30, 2024 09:49
@Wodann Wodann added this to the EDR v0.3.8 milestone May 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no changeset needed This PR doesn't require a changeset
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants