-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit_hash:93dc5f8882e86abd56b9043bd9b85c4aff03fb5c
- Loading branch information
1 parent
6d31112
commit dfb623a
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# How to find difference betweeen two flamegraphs | ||
|
||
Perforator can help you find differences between two profiles. There can be multiple different situations where you might want to compare profiles. | ||
|
||
It can help to answer different questions such as: | ||
- did your optimization actually help? | ||
- did the service performance degrade due to recent code changes? | ||
- does the new runtime version make things faster or slower? | ||
|
||
## Selectors | ||
|
||
Fundamentally, a diff requires two selectors: baseline selector and a new one (diff) selector. | ||
|
||
A baseline will probably be using data from the past, or be the old version on blue/green deployment. | ||
|
||
## Building base selector | ||
|
||
### Option 1: There is a flamegraph that might be used as a base | ||
|
||
You have already built one profile and want to compare it. | ||
|
||
Open the flamegraph and click the "Compare with" button, you will get redirected to a comparison page. It looks like two main pages side by side. The left hand side will be pre-filled with the selector from the profile you've been seeing just yet. | ||
|
||
![Diff page with base selector](../../_assets/ui-half-baseline-diff.png) | ||
|
||
On the right hand side, enter the new selector for comparison. | ||
|
||
### Option 2: Building base selector from scratch | ||
|
||
This is the option you need if you only know the service name or the first option is not applicable for some other reason. | ||
|
||
![Diff page without any selectors](../../_assets/ui-empty-diff.png) | ||
|
||
Go to diffs page marked on the toolbar with scales icon. | ||
|
||
There you'll have to build a selector for baseline (on the left) and new (on the right). | ||
|
||
### Fine-tuning the selectors | ||
|
||
By this point, you should have both selectors and see two lists of profiles that match them. | ||
|
||
![Diff page with both selectors](../../_assets/ui-filled-diff.png) | ||
|
||
Also note, that if you have used a small sample number for the base profile you might want to adjust it on both sides. | ||
|
||
Selectors use the [perforator query language](../reference/querylang.md) format. | ||
|
||
|
||
Configure selectors on the right and on the left. | ||
|
||
Once you're happy with the selectors, click "Diff profiles" button. | ||
|
||
# Interpreting diff flamegraph | ||
|
||
Contrary to the standard flamegraph, the color carries additional information. The blue shades show decrease of the function cycles, while the shades of red show growth against baseline. The darker the color — the bigger the difference. If the difference is less than 0.1%, the color switches to white. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters