From b39063bffe7561e1d523ba4c3771819f46e79b1f Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 13:44:56 +0000 Subject: [PATCH] [getsentry/action-github-commit] Auto commit --- .../profiling/differential-flamegraphs.mdx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/docs/product/profiling/differential-flamegraphs.mdx b/src/docs/product/profiling/differential-flamegraphs.mdx index ae61205a52ac4..308fee4fcabb2 100644 --- a/src/docs/product/profiling/differential-flamegraphs.mdx +++ b/src/docs/product/profiling/differential-flamegraphs.mdx @@ -12,16 +12,15 @@ Differential flamegraphs are graph visualizations that highlight how the call st In Sentry, differential flamegraphs are shown whenever a function regression is detected. When a regression happens, Sentry generates two aggregate flamegraphs. One from the period leading up to the regression, and another from the time right after it. A differential flamegraph is then used to visualize the data. +![Differential flamegraph lock contention](./differential-flamegraph.png) -In a differential flamegraph, the color red means that a function's execution time has increased or that there's a newly present function. The color blue means that the execution time has decreased. +In a differential flamegraph, the color red means that a function's execution time has increased or that there's a newly present function. The color blue means that the execution time has decreased. -Be on the lookout for red frames when interpreting differential flamegraphs. They're the reason why your application code has been performing worse. - -![Differential flamegraph lock contention](./differential-flamegraph.png) +The guiding principle when interpreting differential flamegraphs is to look for red frames - they are the reason why your application code has been performing worse. The differential flamegraph above has highlighted that the function call to `ModuleLock.acquire` has increased in duration, which hints at a lock contention problem which is now slowing down our code. @@ -33,20 +32,20 @@ We can see that new function calls to `OrganizationTeamsEndpoint.dispatch` were If you followed closely, you might have noticed that the top right corner contains a `Before -> After` and `After -> Before` toggle. This is because by default, the differential flamegraphs draw the aggregate flamegraph from after the regression as the source of truth, which means that any code which might have been removed, will no longer be drawn (after all, it's not there anymore). This is why negating the view is useful, as it allows us to compare the data from before and peek into the future of how our code will change. -Here's an example of what our module lock problem looks like when using the profiling data from after the regression has occurred as the source of truth: +Let us see an example of how our module lock problem looks like when using the profiling data from after the regression as the source of truth: ![Differential flamegraph new functions](./differential-flamegraph-regular.png) -And here's what it looks like if we're using the data from before the regression occurred as our source of truth: +And now lets switch to using the data from before the regression as our source of truth ![Differential flamegraph new functions](./differential-flamegraph-inverted.png) -By using the `Before -> After` toggle we can see that `ModuleLock.acquire` was faster before the regression, but we can also see some of the function calls inside our `ChunkUploadEndpoint`, which are no longer being called. +We can see here that `ModuleLock.acquire` was faster before the regression, but we can also see some of the function calls inside our `ChunkUploadEndpoint`, which are no longer being called. -While differential flamegraphs in Sentry use a different color scheme and pull from a different source of data than regular flamegraphs, you can pan and zoom around the chart and search for frames the same way you do with regular flamegraph. +Besides the color scheme and a different source of data, differential flamegraphs follow a similar UI pattern as aggregated flamegraphs. You can pan/zoom around the chart and search for frames like in a regular flamegraph. -The table under the differential flamegraph shows both the largest increases and the largest decreases in function duration. +The table under the differential flamegraph represents the largest changes in function durations. The functions on the left have increased in duration while the functions on the right have improved in duration. ![Differential flamegraph table](./differential-flamegraph-table.png) -Differential flamegraphs are a good way to quickly visualize potential sources of performance regressions or improvements. Currently, they're only available as part of the automated function regression workflow, but we're working on adding them to other parts of the profiling workflow. +Differential flamegraphs are a powerful feature that allow us to quickly visualize potential sources of performance regressions or improvements and while they are currently only available as part of the automated function regression workflow, we will be adding them to other parts of the profiling workflow.