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

feat(profiling): Convert profile output to the sample format #1611

Merged
merged 27 commits into from Sep 27, 2022

Conversation

phacops
Copy link
Contributor

@phacops phacops commented Sep 13, 2022

We're looking to introduce a new profile format referred to as the Sample format (getsentry/relay#1462). This PR implements this format.

sentry_sdk/profiler.py Outdated Show resolved Hide resolved
current_stack.append(frames[frame])

try:
stack_idx = stacks.index(current_stack)
Copy link
Member

Choose a reason for hiding this comment

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

I have no clue what the sizes of these are, but why not do the same optimization as with frames and frames_list, so have a dict stacks_dict and a list stacks_list instead of walking the current stacks list with index?

Copy link
Member

Choose a reason for hiding this comment

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

oh ok @Zylphrex said the same, did not refresh

Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

lgtm except for that one comment

sentry_sdk/profiler.py Show resolved Hide resolved
sentry_sdk/profiler.py Show resolved Hide resolved
sentry_sdk/profiler.py Outdated Show resolved Hide resolved
sentry_sdk/profiler.py Outdated Show resolved Hide resolved
app.py Fixed Show fixed Hide fixed
@phacops phacops enabled auto-merge (squash) September 26, 2022 17:55
sentry_sdk/tracing.py Outdated Show resolved Hide resolved
sentry_sdk/tracing.py Outdated Show resolved Hide resolved
@phacops phacops merged commit 5348834 into master Sep 27, 2022
@phacops phacops deleted the pierre/profiling-convert-to-sample-format branch September 27, 2022 19:21
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.

None yet

3 participants