Unity-jump-proj

This commit is contained in:
2024-09-09 11:07:16 +03:00
parent 2c29906bbf
commit fd96a5627d
13707 changed files with 866380 additions and 0 deletions

View File

@ -0,0 +1,17 @@
* [About Profile Analyzer](index.md)
* [What's new](whats-new.md)
* [Upgrade guide](upgrade-guide.md)
* [Profile Analyzer window](profile-analyzer-window.md)
* [Single view](single-view.md)
* [Compare view](compare-view.md)
* [Frame Control pane](frame-range-selection.md)
* [Filters pane](filtering-system.md)
* [Frame Summary](frame-summary.md)
* [Thread Summary](thread-summary.md)
* [Marker Summary](marker-summary.md)
* [Statistics in the Profile Analyzer](statistics.md)
* Workflows
* [Collecting and viewing data](collecting-and-viewing-data.md)
* [Comparing frames from the same data set](comparing-frames-same-dataset.md)
* [Comparing frames from different data sets](analyzing-mulitple-datasets.md)
* [Ordering frames by length](ordering-frames-by-cost.md)

View File

@ -0,0 +1,21 @@
# Comparing frames from different data sets
This workflow explains how to compare two frames from different data sets. In this example, it shows how to compare the median frames from each data set. Comparing the median frames helps you understand what might be happening in a frame that is central to the distribution for each data set.
## Step 1: Collect performance data to analyze
1. Open the Profile Analyzer window (menu: **Window > Analysis > Profile Analyzer**). Click the **Compare** button in the toolbar to enter the Compare view.
1. Collect some profiling data. To pull data from an active profiling session, click the **Pull Data** button. This pulls in the current set of available frames from the Profiler. If you don't have an active profile session, click the **Open Profiler Window** button, then load or record some data. For more information on how to collect data, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
1. Pull a different data set that you want to analyze into each graph in the [Frame Control](frame-range-selection.md) pane.
## Step 2: Select frames of interest
Enable **Pair Graph Selection**. Right-click on one of the graphs in the Frame Control pane and then choose **Select Median Frame** from the context menu.
The Profile Analyzer then analyzes the two median frames of the data sets like this:
![Two data sets compared](images/profile-analyzer-compare-different-data-sets.png)
You can then look further and compare the differences between the median frames of each data set.
For further information, see the [Ordering frames by length](ordering-frames-by-cost.md) workflow, which extends the selected range and number of frames used from the middle of the frame distribution.

View File

@ -0,0 +1,37 @@
# Collecting and viewing data
This workflow explains how to populate the [Unity Profiler](https://docs.unity3d.com/Manual/Profiler.html) and Profile Analyzer with data. Note that the Profile Analyzer only analyzes CPU data from the Profiler.
## Step 1: Open the Unity Profiler
Go to the menu: **Window > Analysis > Profiler** or press Ctrl+7 (Command+7 on macOS). If you have the Profile Analyzer window open, you can click the **Open Profiler Window** button.
## Step 2: Populate the Profiler with data
To use the Profile Analyzer, you must populate it with data from the Profiler. To add data to the Profiler, you can either record some new data, or load a Profiler capture file in the .data file format.
### a) Record new data
Click the **Attach to Player** dropdown at the top of the window (next to the Record button) and select a player to profile. By default this is set to **Playmode**. Click the **Record** button to start recording data. If you enabled **Autoconnect to Profiler** in the Build Settings, the Profiler automatically collects data when you start a built player.
For more information on how to record data in the Profiler, see the documentation on [Profiling your application](https://docs.unity3d.com/Manual/profiler-profiling-applications.html) in the Unity User Manual.
### b) Load data
To load a saved .data file, in the top right of the Profiler window, select the **Load** button.
## Step 3: Pull the data into the Profile Analyzer window
Open the Profile Analyzer window (menu: **Window > Analysis > Profile Analyzer**) and then select the **Pull Data** button in the [Frame Control](frame-range-selection.md) pane. The Profile Analyzer then pulls in the data that is loaded in the Profiler window.
>[!TIP]
>The Profiler window and the Profile Analyzer window require a lot of screen real-estate. Docking the two windows together in a single tabbed window lets you navigate between the two views quickly.
![Profiler and Profile Analyzer](images/profile-analyzer-profiler-docked.png)<br/>*The Profile Analyzer in the Compare mode docked next to the Profiler in one window*
## Step 4: Load and save Profile Analyzer data
To save the data from the Profile Analyzer, click the **Save** button in any view. Select where you would like to save your data, and then Unity saves the data in the .pdata format. To load this data, click the **Load** button in any view.
>[!NOTE]
>When you load data into the Profile Analyzer, the data must be in the Profile Analyzer .pdata format. If you have data from the Profiler in the .data file format, open it in the Profiler first, and in the Profile Analyzer select the **Pull Data** button.

View File

@ -0,0 +1,119 @@
# Compare view
In the **Compare** view you can load two data sets, which the Profiler Analyzer displays in two different colors. It displays the information from both data sets in a similar way to the [Single view](single-view.md) and has the same panes and panels.
For information on navigating the window, see the [Profile Analyzer window navigation](profile-analyzer-window.html/#window-navigation) documentation.
![Compare View](images/profile-analyzer-compare-view.png)<br/>*The Compare view with two data sets loaded.*
## Loading data
To load data into the **Compare** view, select the **Pull Data** button in the frame control pane, and the Profile Analyzer pulls in any data in the [Profiler](https://docs.unity3d.com/Manual/Profiler.html) window. Alternatively, select the **Load** button to load Profile Analyzer (.pdata) data you have saved from a previous session.
>[!NOTE]
>If you select the **Load** option, the data must be in the Profile Analyzer .pdata format. If you have data from the Profiler in the .data file format, open it in the Profiler first, and then select the **Pull Data** button in the Profile Analyzer.
For more information on how to pull data into the Profile Analyzer, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
## Marker Comparison list
The **Marker Comparison** pane contains a sortable list of markers with a number of useful statistics, including the difference between the two sets. The proportional graphs with the `<` and `>` labels visualize the values of each marker, so you can see the difference between the timings of both samples.
If you select a marker in the list, the **Marker Summary** panel displays in depth information on the marker. Each marker in the list is an aggregation of all the instances of that marker, across all filtered threads and in all ranged frames.
You can filter the columns in the **Marker Comparison** list to a more relevant set. This is particularly useful if you want to filter out irrelevant data when you look for **Time** or **Count** values. To filter the columns, select the **Marker columns** dropdown from the **Filters** pane. For more information on how to filter data, see the [Filters](filtering-system.md) documentation.
### Marker Comparison columns and groups
By default, the **Marker columns** dropdown in the **Filters** pane has six preset column layouts that you can use to adjust the layout of the **Marker Comparison** pane. They are:
* **Time and count:** Displays information on the average timings and number of times the markers were called.
* **Time:** Displays information on the average timings of the markers.
* **Totals:** Displays information about the total amount of time the markers took on the whole data set.
* **Time with totals:** Displays information about both the average and total times of the markers.
* **Count totals:** Displays information about the total number of times the markers were called.
* **Count per frame:** Displays information on the average total per frame the markers were called.
* **Depths:** Displays information on where the markers are in the Hierarchy. For more information, see the documentation on Depth Slices in [Filters pane](filtering-system.html#depth-slice).
* **Threads:** Displays the name of the thread that the markers appear on. For more information, see the documentation on the Thread window in [Filters pane](filtering-system.html#thread-window).
You can also use the **Custom** column layout to select your own custom mix of columns to add to the layout. To do this, right click on the header of any column, and manually enable or disable any of the columns as necessary.
>[!NOTE]
>In this pane, the **Left** label refers to the first data set loaded into the **Frame Control** pane, which is colored blue. The **Right** label refers to the second data set, which is colored orange.
The following table shows the columns that the Profile Analyzer displays when you select that layout.
||**Time and count**| **Time**| **Totals**| **Time with totals**| **Count totals**| **Count per frame** |**Depths**|**Threads**|
|---|---|---|---|---|---|---|---|---|
|**Marker Name**|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
|**Left Median**<br/> **Right Median**|&#10003;|&#10003;||&#10003;|||||
|`<`<br/> `>`|&#10003;|&#10003;||&#10003;|||||
|**Diff**|&#10003;|&#10003;|||||||
|**Diff Percent**|||||||||
|**Abs Diff**|&#10003;|&#10003;||&#10003;|||||
|**Count Left** <br/> **Count Right**|&#10003;||||&#10003;||||
|`<` **Count** <br/> `>` **Count**|||||&#10003;||||
|**Count Delta**|&#10003;||||&#10003;||||
|**Count Delta Percent**|||||||||
|**Abs Count**|||||&#10003;||||
|**Count Left Frame** <br/> **Count Right Frame**||||||&#10003;|||
|`<` **Frame Count** <br/> `>` **Frame Count**||||||&#10003;|||
|**Count Delta Frame**||||||&#10003;|||
|**Count Delta Percent Frame**|||||||||
|**Abs Frame Count**||||||&#10003;|||
|**Total Left** <br/> **Total Right**|||&#10003;|&#10003;|||||
|`<` **Total** <br/> `>` **Total**|||&#10003;|&#10003;|||||
|**Total Delta**|||&#10003;||||||
|**Total Delta Percent**|||||||||
|**Abs Total**|||&#10003;|&#10003;|||||
|**Depth Left** <br/> **Depth Right**|||||||&#10003;||
|**Depth Diff**|||||||&#10003;||
|**Threads Left** <br/> **Threads Right**||||||||&#10003;|
The following table explains what each column does:
|**Column**|**Description**|
|---|---|
|**Marker Name**| Displays the name of the marker.|
|**Left Median** <br/> **Right Median** | The sum of activity for the marker. **Left Median** displays the first data set loaded into the **Frame Control** pane, colored blue. **Right Median** displays the second data set loaded into the **Frame Control** pane, colored orange.|
|`<` <br/> `>`|A visual representation of the **Left Median** (`<`) and **Right Median** (`>`) data.|
|**Diff**|The difference between the summed values in each data set. Negative values mean that the left (blue) set of data is bigger, positive means the right (orange) set of data is bigger.|
|**Diff Percent**|The difference relative to the first data set.|
|**Abs Diff**|The absolute difference between the summed values in each data set.|
|**Count Left**<br/>**Count Right**|The number of times the marker started or stopped. **Count Left** displays the first data set loaded into the **Frame Control** pane, colored blue. **Count Right** displays the second data set loaded into the **Frame Control** pane, colored orange.|
|`<` **Count** <br/> `>` **Count**|A visual representation of the **Count Left** and **Count Right** data.|
|**Count Delta**|The difference between the **Count** values in each data set. Negative values mean that the left (blue) set of data is bigger, positive means the right (orange) set of data is bigger.|
|**Count Delta Percent**|The difference in count relative to the first data set.|
|**Abs Count**|The absolute difference between the **Count** values for the selected frames. Negative values mean that the left (blue) set of data is bigger, positive means the right (orange) set of data is bigger.|
|**Count Left Frame** <br/> **Count Right Frame**| The average count of the marker over all non-zero frames. **Count Left Frame** displays the first data set loaded into the **Frame Control** pane, colored blue. **Count Right Frame** displays the second data set loaded into the **Frame Control** pane, colored orange.|
|`<` **Frame Count** <br/> `>` **Frame Count**|A visual representation of the **Count Left Frame** and **Count Right Frame** data.|
|**Count Delta Frame**|The difference between the **Count Left Frame** and **Count Right Frame** values. Negative values mean that the left (blue) set of data is bigger, positive means the right (orange) set of data is bigger.|
|**Count Delta Percent Frame**|The difference in average count relative to the first data set.|
|**Abs Frame Count**|The absolute difference between the number of times the marker started or stopped in each data set.|
|**Total Left** <br/> **Total Right**|The total time for the marker over the selected frames. **Total Left** displays the first data set loaded into the **Frame Control** pane, colored blue. **Total Right** displays the second data set loaded into the **Frame Control** pane, colored orange.|
|`<` **Total** <br/> `>` **Total**|A visual representation of the **Total Left** and **Total Right** data.|
|**Total Delta**|The difference between the total times over the selected frames in each data set. Negative values mean that the left (blue) set of data is bigger, positive means the right (orange) set of data is bigger.|
|**Total Delta Percent**|The difference in total time relative to the first data set.|
|**Abs Total**|The absolute difference between the total times over all of the selected frames in each data set.|
|**Depth Left** <br/> **Depth Right**|The level, or depth, that the marker appears at. The marker might appear on multiple depth levels. **Depth Left** displays the first data set loaded into the **Frame Control** pane, colored blue. **Depth Right** displays the second data set loaded into the **Frame Control** pane, colored orange.|
|**Depth Diff**|The difference between the **Depth Left** and **Depth Right** values.|
|**Threads Left** <br/> **Threads Right**|The name of the thread that the marker appears on. **Threads Left** displays the first data set loaded into the **Frame Control** pane, colored blue. **Threads Right** displays the second data set loaded into the **Frame Control** pane, colored orange.|
### Marker Comparison context menu commands
If you right-click on a marker in the **Marker Comparison** list you can control the filter and list even further.
|**Command**|**Function**|
|---|---|
|**Select Frames that contain this marker (within whole data set)**| Select all the frames from the entire data set that contain an instance of this marker.|
|**Select Frames that contain this marker (within current selection)**| Select all the frames from a selected range of data that contain an instance of this marker.|
|**Select All**| Selects the entire data set, if you have a range of data selected.|
|**Add to / Remove From Include Filter**| Add or remove the selected marker to the **Include** filter. This filters the marker list to only markers that match.|
|**Add to Exclude Filter**| Add the selected marker to the **Exclude** filter. This removes the marker from the marker list. This is useful if you want to remove markers that are using up resources and skewing the markers that you are interested in.|
|**Set as Parent Marker Filter**| Limit the analysis to this marker and markers included below it on the callstack. For more information, see the [Parent Marker](filtering-system.html#parent-marker) documentation on the Filters page.|
|**Clear Parent Marker Filter**| Select this to clear the marker as a parent marker filter.|
|**Copy To Clipboard**| Copies the selected value to the clipboard.|
## Analyzing data in Compare view
For further information on how to analyze data in Compare view, see the workflow documentation on [Comparing frames from different data sets](comparing-frames-same-dataset.md) and [Comparing frames from the same data set](comparing-frames-same-dataset.md).

View File

@ -0,0 +1,22 @@
# Comparing frames from the same data set
This workflow explains how to compare two frames from the same data set. In this example, it explains how to compare the median and longest frames in a data set. Comparing the median and longest frames is useful to help understand what is happening in the longest frame that is not happening in an average frame, or what is taking longer than average to complete.
## Step 1: Collect performance data to analyze
Open the Profile Analyzer window (menu: **Window &gt; Analysis &gt; Profile Analyzer**) and collect some profiling data. To pull data from an active profiling session, click the **Pull Data** button. This pulls in the current set of available frames from the Profiler. If you don't have an active profile session, click the **Open Profiler Window** button, then load or record some data.
For more information on how to collect data, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
## Step 2: Open Compare view
Click the **Compare** button in the toolbar to switch to the [Compare View](compare-view.md).
## Step 3: Select the median and longest frames
1. In the [Frame Control](frame-range-selection.md) pane, right click on the top graph and choose **Select Median Frame** from the context menu.
1. Next, right click on the lower graph and choose **Select Longest Frame** in the context menu.
The Profile Analyzer then analyzes the two frames and displays the data for the median and longest frames:
![Data comparison on same set](images/profile-analyzer-compare-same-data-set.png)<br/>*The Profile Analyzer window with the median and longest frames of the same data set selected*

View File

@ -0,0 +1,43 @@
apiRules:
- exclude:
# inherited Object methods
uidRegex: ^System\.Object\..*$
type: Method
- exclude:
# mentioning types from System.* namespace
uidRegex: ^System\..*$
type: Type
- exclude:
# mentioning types from NiceIO.* namespace
uidRegex: ^NiceIO\..*$
type: Type
- exclude:
# mentioning types from Format.* namespace
uidRegex: ^Format\..*$
type: Type
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
type: Member
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
type: Type
- exclude:
uidRegex: ^$
type: Namespace
- exclude:
uidRegex: .*Tests$
type: Type
- exclude:
uidRegex: .*Test$
type: Type
- exclude:
uidRegex: .*Fixture$
type: Type
- exclude:
uidRegex: UnityEditor.Performance.ProfileAnalyzer.DepthSliceUI
type: Type
- exclude:
uidRegex: GetUIThreadName
type: Method

View File

@ -0,0 +1,48 @@
# Filters pane
You can use the **Filters** pane in the [Single](single-view.md) and [Compare](compare-view.md) view to reduce and filter the working data set. You can limit the data set by filters such as partial marker name match, a specific thread, or a specific stack level. As well as filtering by match, you can set the filter to exclude any markers by name. This is particularly useful to exclude markers the might distort the view, or aren't statistically relevant.
![Filter pane](images/profile-analyzer-filters-pane.png)<br/>*Single view Filters pane (above) and Compare view Filters pane (below). Note the addition of further Depth Slice controls in the Compare view.*
The pane has the following controls:
|**Control**|**Function**|
|---|---|
|**Name Filter**|Enter the name of a marker you would like to filter the data set by. Once you start typing, the Profile Analyzer automatically filters the **Marker details** pane to display the matching markers. You can also right click on a marker in the **Marker details** pane and select **Add to Include Filter** to add it to the filter. To include a marker name with a space, surround it in quotation marks <br/><br/> Choose **Any** from the dropdown to match any of the terms to the markers in the list. Select **All** from the dropdown to match all of the listed terms to the markers in the list.|
|**Exclude Names**|Enter the name of a marker you would like to exclude from the data set. Once you start typing, the Profile Analyzer automatically filters the **Marker details** pane to display the matching markers. You can also right click on a marker in the **Marker details** pane and select **Add to Exclude Filter** to exclude it from the filter. <br/><br/> Select **Any** from the dropdown to match any of the terms to the markers in the list. Select **All** from the dropdown to match all of the listed terms to the markers in the list.|
|**Thread**|Select which thread or threads to filter the data set by. Click the **Select** button to open the **Thread** window and filter the data set further. For more information, see the [Thread window](#thread-window) section of this page.|
|**Depth Slice**|Set the depth level of the [Hierarchy](https://docs.unity3d.com/Manual/ProfilerCPU.html#hierarchy) to display. The **Marker Details/Comparison** view then displays all the markers on this level only. In the **Compare** view, the **Auto Right** checkbox is enabled by default, which automatically aligns the depth of the two data sets. For more information, see the [Depth Slice](#depth-slice) section of this page. |
|**Parent Marker**|Displays the parent marker the data set is filtered by. To filter by a parent marker, right click on it in the **Marker Details/Comparison** list and then select **Set As Parent Marker Filter**. For more information, see the [Parent Marker](#parent-marker) section of this page.|
|**Analyze** (Single view)<br/>**Compare** (Compare view)|Contains details of the number of markers and threads in the data set. **Note:** The button is redundant, because the Profile Analyzer automatically updates the marker pane with the filters you set. However, you can hover on the button to see timings of the analysis or comparison.|
|**Analysis type**|Select what times the Profile Analyzer includes in its analysis, from either **Total** or **self**. The **Total** option sets the marker times to inclusive, which means the time spent in the marker and its children is included in the filter. The **Self** option sets the marker times to exclusive, which means that the the time in the marker's children is excluded from the filter. |
|**Units**|Select the unit of measurement of time to display in the Profile Analyzer. Choose between **Milliseconds** (default) or **Microseconds**. <br/><br/>**Note:** If you select **Microseconds**, the Profile Analyzer displays larger timings in milliseconds.|
|**Marker Columns**|Select a layout for the **Marker Details/Comparison** pane. For more information on the columns in this pane, see the documentation on [Single view Marker Details list](single-view.html#marker-details-list) and [Compare view Marker Comparison list](compare-view.html#marker-comparison-list).|
## Thread window
By default, the Profile Analyzer displays the markers on the main thread in the **Marker Details/Comparison** pane. To analyze the markers on other threads, under **Threads**, click the **Select** button, and the Threads window opens.
![Thread window](images/profile-analyzer-filter-threads-window.png)<br/>*The Thread window*
To add more threads to the analysis, enable the checkboxes next to their names, then click the **Apply** button. The Profile Analyzer then updates the data set. There are two pre-defined sets of threads: **Main Only** and **Common Set**. **Main Only** selects just the Main Thread, and the **Common Set** selects the Main Thread, plus the Render and Jobs threads.
Click the **Clear** button to clear all of the threads you've selected, and **Reset** to reset the selection back to the previous thread set.
## Depth Slice
When you select a **Depth Slice** level in the dropdown, it corresponds to the level of the marker within the hierarchy of the thread. You can visualize this in the Profiler window as follows:
![Depth Slice](images/profile-analyzer-depth-slice-highlight.png)<br/>*The Profile Analyzer in the Single view with a Depth Slice of 3 selected in the Filters pane.*
![Depth Slice](images/filters-depth-slice-comparison-profiler-window.png)<br/>*The Profiler window with the CPU Usage module selected, in Timeline view. Note that the markers in the Marker Details list correspond to the markers in the third level of the Main Thread's hierarchy.*
In the Compare view, the Profile Analyzer automatically aligns the depth of the two data sets so that the top level markers are aligned correctly. The value of the offset is displayed in brackets after the **Auto Right** checkbox.
To override the automatic depth alignment, disable the **Auto Right** checkbox and then manually set the depth levels for the left (blue) and right (orange) sets. This is useful if you're comparing data sets from different versions of Unity.
## Parent Marker
To filter the dataset by a specific marker and its children, right click on the marker in the **Marker Details/Comparison** pane and then select **Set As Parent Marker Filter**. You can visualize this in the Profiler window as follows:
![Parent marker](images/filters-parent-marker-comparison-profile-analyzer.png)<br/>*The Profile Analyzer in the Single view with the data filtered by the parent marker of BehaviourUpdate.*
![Parent marker](images/filters-parent-marker-comparison-profiler.png)<br/>*The same frame opened in the Profiler window, with this thread highlighted. Note that the markers in the Timeline view correspond to those filtered in the Profile Analyzer.*

View File

@ -0,0 +1,71 @@
# Frame Control pane
You can use the **Frame Control** pane in both the [Single](single-view.md) and [Compare](compare-view.md) views to select a range of frames to reduce the working set. The Frame Control pane is laid out as follows:
![Frame Control pane](images/profile-analyzer-frame-control-pane.png)<br/>*The Frame Control in the Single view (top), and in the Compare view (bottom)*
|**Control**|**Function**|
|---|---|
|**A:** Pull Data / Load / Save| Click the **Pull Data** button to pull any data that is loaded in the [Profiler](https://docs.unity3d.com/Manual/Profiler.html) window.<br/>Click the **Save** button to save the data as a .pdata file.<br/>Click the **Load** button to load a .pdata file. **Note:** You can only load a .pdata file. If you have data from the Profiler in the .data file format, open it in the Profiler first, and then select the **Pull Data** button in the Profile Analyzer.|
|**B:** Frame control scale| You can adjust the scale of the y-axis of the Frame Control graph by selecting this dropdown. By default, it scales to the maximum value of the data set. You can also choose from traditional frame boundaries. 16.67ms is equivalent to 60Hz/FPS, 33.33ms is equivalent to 30Hz/FPS, and 66.67ms is equivalent to 15Hz/FPS.|
|**C:** Selected thread| This displays the name of the marker which is selected in the **Marker Details** pane. When you select a thread from this list, the Profile Analyzer highlights its corresponding timings on the Frame Control graph in a green-blue color.|
|**D:** Pair Graph Selection<br/>*(Compare view only)*| When you enable this checkbox, the Profile Analyzer reflects any changes you make in the range selection of a data set in both data sets. This is important to ensure you compare the exact same number of frames in both data sets and get an accurate comparison. |
## Selecting a frame range
The Profile Analyzer uses all the frames in the data sets unless you select a sub-range. When you select a sub-range, it limits the analysis to just those frames which lets you focus on a specific frame or set of frames. To select a range of frames, click and drag on the Frame Control graph. To clear the selection, right click on the Frame Control graph and select **Clear Selection**.
To help visualize which frames are in the current selection, the start and end frame number, plus the frame count in square brackets appears on the x-axis of the graph.
![Frame Control pane with selected item](images/profile-analyzer-frame-control-selection.png)<br/>*The Frame Control in the Single view (top), with 187 frames selected, starting on frame 37 and ending on frame 224. The Compare view (bottom) has Pair Graph Selection enabled, with the same 237 frames selected on both graphs, starting on frame 135 and ending on frame 371.*
## Frame range controls
You can control the selection of data in both the **Single** and **Compare** views by using the following shortcuts, or by right-clicking and selecting an option from the context menu.
>[!NOTE]
>In **Compare** view, make sure you enable the **Pair Graph Selection** checkbox to carry out the following commands on both graphs at the same time.
### Shortcuts
|**Shortcut**|**Function**|
|---|---|
|**Shift+click**|Hold down the Shift key while clicking on the selection on the Frame Control graph to move the selection around freely.|
|**Left/Right arrow**|Move the selection forward or backwards by one frame.|
|**Ctrl + click**<br/>(**Command + click** on macOS)| Selects multiple parts of the data set. Hold down the Ctrl key (Command key on macOS) while making a selection and then click, and optionally drag, on different sections of the chart to select multiple parts of the data set.|
|**Equals (=)**| Extend the selection by one frame on each end of the selection.|
|**Alt+Equals**<br/>(**&#8997; + Equals** on macOS)|Reduce the selection by one frame on each end of the selection.|
|**Shift+Equals**| Extend the selection by 10 frames on each end of the selection.|
|**Hyphen (-)**|Reduce the selection by one frame on each end of the selection.|
|**Alt+Hyphen**<br/>(**&#8997; + Hyphen** on macOS)|Extend the selection by one frame on each end of the selection.|
|**Shift+Hyphen**| Reduce the selection by 10 frames on each end of the selection.|
|**Comma (,)**| Extend the start of the selection by one frame.|
|**Alt+Comma**<br/>(**&#8997; + Comma**) on macOS|Reduce the start of the selection by one frame.|
|**Shift+Comma**|Extend the start of the selection by 10 frames.|
|**Period (.)**| Extend the end of the selection by one frame.|
|**Alt+Period**<br/>**(&#8997; + Period on macOS)**|Reduce the end of the selection by one frame.|
|**Shift+Period**|Extend the end of the selection by 10 frames.|
|**1**<br/>**2**<br/>*Compare view only*|In **Compare** view, with **Pair Graph Selection** disabled, use the 1 or 2 key on your keyboard to switch between frames. 1 selects the top data, and 2 selects the bottom data. |
### Context menu commands
Right click on the Frame Control graph to bring up the context menu.
|**Menu item**|**Function**|
|---|---|
|**Clear Selection**|Clears the selected range. The Profile Analyzer then performs the analysis on the whole data set.|
|**Invert Selection**|Inverts the selected range.|
|**Select Shortest Frame**|Selects the frame with the shortest time.|
|**Select Longest Frame**|Selects the frame with the longest time.|
|**Select Median Frame**| Selects the frame with the Median time. |
|**Move selection left / right**|Move the whole selection one frame backwards, or one frame forwards. |
|**Grow selection**|Extend the selection by one frame on each end of the selection. Select the **(fast)** operation to extend the selection by 10 frames at each end.|
|**Shrink selection**|Reduce the selection by one frame on each end of the selection. Select the **(fast)** operation to reduce the selection by 10 frames at each end.|
|**Grow selection left / right**|Extend the start or the end of the selection by one frame. Select the **(fast)** operation to extend the start or the end of the selection by 10 frames.|
|**Shrink selection left /right**|Reduce the selection by one frame at the beginning or the end of the selection. Select the **(fast)** operation to reduce the start or the end of the selection by 10 frames.|
|**Zoom Selection**| Zoom the Frame Control graph to display the selected range only.|
|**Zoom All**| Zoom out to show all frames. The current selection range is highlighted.|
|**Show Selected Marker**| Enable this setting to highlight the selected marker's time on the Frame Control graph. By default, this setting is enabled and the Profile Analyzer highlights the marker's timings in green on the graph.|
|**Show Filtered Threads**|Enable this setting to highlight the current filtered thread times on the Frame Control graph. The Profile Analyzer highlights the timings in purple. This setting is disabled by default.|
|**Show Frame Lines**| Enable this setting to display the common frame boundaries as a horizontal line on the Frame Control graph. This setting is enabled by default.|
|**Order By Frame Duration**| Enable this setting to display the order of the frames by their duration from smallest to largest on the Frame Control graph, rather than by frame index. By default, this setting is disabled. This setting is particularly useful to group similar performant frames together.|

View File

@ -0,0 +1,23 @@
# Frame Summary
The Frame Summary pane displays a summary of the frame times for the range of data selected. This pane provides useful information about the frames in the data selection, including the maximum, minimum, upper and lower quartile, mean, and median timings.
![Frame Summary](images/frame-summary-pane.png)<br/>*The Frame Summary pane in Single view (left,) and Compare view (right)*
The Frame Summary pane is a good way for you to see at an overview what frames might be an outlier and how evenly distributed the timings are in the data set. For example, in the above screenshot, in the Compare view, while the median values are fairly similar, with little difference, the maximum frame value differs greatly, which suggests that the Right data set had more spikes in performance, that you could focus investigating further.
## Statistics
|**Statistic**|**Description**|
|---|---|
|**Frame Count**|The number of frames selected in the [Frame Control pane](frame-range-selection.md).<br/><br/>In Compare view, the **Left** count corresponds to the first data set loaded into the Profile Analyzer, colored blue, and the **Right** count corresponds to the second data set loaded into the Profile Analyzer, colored orange. <br/><br/>The **Diff** count is the difference in frame count between the Right and Left values. When this number is negative, it indicates that the Left frame count is larger than the Right frame count. When the Diff is a positive number, it means that the Right frame count is larger than the Left frame count.|
|**Start**|The frame number that the data selection starts on. In Single view, you can click the button next to this number to jump to the relevant frame in the Profiler window.|
|**End**|The frame number that the data selection ends on. In Single view, you can click the button next to this number to jump to the relevant frame in the Profiler window.|
|**Max**|The largest (maximum) frame time in the data selection. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Upper Quartile**|Displays the upper [quartile](https://en.wikipedia.org/wiki/Quartile) of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Median**|Displays the [median](https://en.wikipedia.org/wiki/Median) value of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Mean**|Displays the [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) value of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Lower Quartile**|Displays the lower [quartile](https://en.wikipedia.org/wiki/Quartile) of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Min**|The smallest (minimum) frame time in the data selection. In Compare view, the Diff column shows the difference between the Right and Left timings.|
Underneath the statistics, the Profile Analyzer displays the timings as a histogram and box and whisker plot. For further information on the statistics available and how to analyze them, see the documentation on [Statistics in the Profile Analyzer](statistics.md).

View File

@ -0,0 +1,31 @@
# About the Profile Analyzer package
The Profile Analyzer aggregates and visualizes frame and marker data from a set of [Unity Profiler](https://docs.unity3d.com/Manual/Profiler.html) frames to help you understand their behavior. You can use the Profile Analyzer to compare two sets of data side-by-side, which complements the single frame analysis already available in the Unity Profiler.
For information on how to use the Profile Analyzer, see the documentation on the [Profile Analyzer window](profile-analyzer-window.md)
![The Profile Analyzer window](images/profile-analyzer-compare-view.png)<br/>*The Profile Analyzer window, with two sets of data loaded*
## Installing the Profile Analyzer
To install this package into versions of Unity that support the package manager follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest/index.html).
When using any Unity version newer than 2021.2.0a5, you can just click __[this link to install it by name](com.unity3d.kharma:upmpackage/com.unity.performance.profile-analyzer)__.
### Earlier versions of Unity
For earlier versions, follow this link to the Profile Analyzer [download](https://download.packages.unity.com/com.unity.performance.profile-analyzer/-/com.unity.performance.profile-analyzer-1.1.1.tgz) and place the contents into your Project's Assets folder.
## Requirements
This version of the Profile Analyzer is compatible with the following versions of the Unity Editor:
* 5.6 and later
## Known limitations
The Profile Analyzer has the following known limitations:
* The original Profile data is not saved in the Profile Analyzer .pdata file. Therefore, you should store both the Unity Profiler .data file (or the .raw file exported from a stand alone player) along with the .pdata file.
* When you click on a marker, the Profile Analyzer attempts to jump to the same marker in the Unity Profiler if the same data is loaded. You must make a selection in the Unity Profiler beforehand for this to work. In the Unity Profiler in the UI view, the vertical height is not correct.
* On Unity 5.6 and 2017.4, the Thread Select Window allows you to collapse the 'All' threads item, which has no purpose.

View File

@ -0,0 +1,22 @@
# Marker Summary
The Marker Summary pane summarizes the marker data of the current selected item in the **Marker Details** list. You can use this pane to get an overview of the markers that contribute the most amount of time to the data set. For more information on the statistics in this pane, see the [Statistics](statistics.md) documentation.
![Marker summary](images/marker-summary-pane.png)<br/>*The Marker Summary pane, in Single View (left), and Compare View (right)*
## Statistics
|**Statistic**|**Description**|
|---|---|
|**Marker name**|Displays the name of the selected marker.|
|**Mean frame contribution**|Visualization of the marker's mean frame contribution as a percentage of the data set's total time.|
|**First frame**|Link to the frame that the marker first appeared in. Click the button to jump to the relevant frame in the Profiler window.|
|**Top by frame costs**|Displays the longest occurrences of the marker in the data set. Use the dropdown to display up to 10 entries in the list.|
|**Max**|The largest (maximum) frame time in the data selection. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Upper Quartile**|Displays the upper [quartile](https://en.wikipedia.org/wiki/Quartile) of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Median**|Displays the [median](https://en.wikipedia.org/wiki/Median) value of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Mean**|Displays the [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) value of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Lower Quartile**|Displays the lower [quartile](https://en.wikipedia.org/wiki/Quartile) of the data set. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Min**|The smallest (minimum) frame time in the data selection. In Compare view, the Diff column shows the difference between the Right and Left timings.|
|**Individual Max**|The maximum value of an individual marker instance.|
|**Individual Min**|The minimum value of an individual marker instance.|

View File

@ -0,0 +1,25 @@
# Ordering frames by length
This workflow explains how to order the frame data in the Profile Analyzer by frame length, shortest to longest, which results in an s-curve style graph. The Profile Analyzer groups frames with similar performance together, which enables you to create sub-ranges over a set of similar performing frames without including any outliers. This is particularly useful to normalize the data and to focus on only the shortest, longest, or average frames in the data set.
This workflow applies for both [Single view](single-view.md) and [Compare view](compare-view.md).
## Step 1: Collect performance data to analyze
Open the Profile Analyzer window (menu: **Window &gt; Analysis &gt; Profile Analyzer**) and collect some profiling data. To pull data from an active profiling session, click the **Pull Data** button. This pulls in the current set of available frames from the Profiler. If you don't have an active profile session, click the **Open Profiler Window** button, then load or record some data.
For more information on how to collect data, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
## Step 2: Order the data set
If you are in the Compare view, enable the **Pair Graph Selection** checkbox. By default, the data set is ordered by frame number. To order the frames by their length, right click on a graph in the Frame Control pane, and select **Order by Frame Duration**.
The Profile Analyzer then orders the graph from shortest to longest frame.
## Step 3: Select frames of interest
Click and drag on the graph to select a range of frames with similar performance from the middle of the distribution.
![Frames ordered by duration](images/profile-analyzer-frame-duration.png)<br/>*Top, the Frame Control pane in Single view, with the graph ordered by frame duration, and a range of frames selected. Bottom, the Frame Control pane in Compare view, with the graph ordered by frame duration, and a range of frames selected.*
You can now use the Profile Analyzer to analyze data from frames that have a similar performance.

View File

@ -0,0 +1,76 @@
# Profile Analyzer window
The Profile Analyzer window visualizes frame, thread, and marker data from the [Unity Profiler](https://docs.unity3d.com/Manual/Profiler.html) window. You can use it to analyze the performance of specific markers, threads, and frames.
To open the Profile Analyzer window, in the Unity Editor go to menu: **Window &gt; Analysis &gt; Profile Analyzer**.
![Profile Analyzer Window](images/profile-analyzer-window.png)<br/>*The Profile Analyzer window on start up, with no data loaded.*
The Profile Analyzer has two views:
* **Single:** The [Single view](single-view.md) displays one set of Profiler data. You can use this view to analyze specific events on one set of profiling data.
* **Compare:** In the [Compare view](compare-view.md), you can load two sets of Profiler data to compare. You can use the Compare view to compare two different sets of profiling data, or to compare different events in the same data set.
In both views, the Profile Analyzer displays min, max, median, mean, and lower/upper quartile values of the selected frame range. It also displays information on the distribution of each profiler marker in histograms and box and whisker plots.
## Pulling and analyzing performance data
The Profile Analyzer only analyzes CPU data. It can either analyze data from the active set of frames loaded into the Profiler, or from a saved Profile Analyzer .pdata file.
The Profile Analyzer aggregates the activity of each marker, and generates useful statistics to help you analyze the marker costs over a number of threads and frames. This includes summing the runtime and counts of each occurrence of every marker for all active threads and frames the Profile captured.
### Pulling data from the Profiler window
To pull data from an active profiling session, click the **Pull Data** button. This pulls in the current set of available frames from the Profiler and visualizes the analyzed results.
If you don't have an active profile session, click the **Open Profiler Window** button, then load or record some data.
### Loading and saving a data set
You can save or reload any data that the Profile Analyzer analyzes at any point in time. This means you can share your analysis with others and load the results into the **Single** or **Compare** view at any time. To save the data from the Profile Analyzer, click the **Save** button in any view. This saves the data in the .pdata format. To load this data, click the **Load** button in any view.
>[!NOTE]
>If you select the **Load** option, the data must be in the Profile Analyzer .pdata format. If you have data from the Profiler in the .data file format, open it in the Profiler first, and then select the **Pull Data** button in the Profile Analyzer.
For more information on how to pull data into the Profile Analyzer, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
## Window navigation
The controls and navigation for the Profile Analyzer window are very similar in both the Single and Compare view.
The Profile Analyzer window has the following controls across both views, which you can access at the top of the window:
|**Control**|**Function**|
|---|---|
|**Single**|Enter the [Single view](single-view.md) mode. This is the default view mode.|
|**Compare**|Enter the [Compare view](compare-view.md) mode. You can compare two sets of profiling data in this mode.|
|**Export**|Export the data into a .csv format. When you click this button, a dialog box opens and you can choose from:<br/> **Marker table:** Exports the marker data visible in [Single view](single-view.md)<br/>**Single Frame Times:** Exports the frame data visible in the Single view<br/>**Comparison Frame Times:** Exports both sets of data visible in the [Compare view](compare-view.md).<br/><br/>This button is disabled if you haven't imported any data into the Profile Analyzer window.|
|**Open Profiler Window**|Click this button to open the [Profiler window](https://docs.unity3d.com/Manual/ProfilerWindow.html). When the Profiler window is open, this button changes to **Close Profiler Window**.|
When you load some data into the Profile Analyzer window, the window populates with the profiling data, and is laid out as follows:
![Profile Analyzer Window](images/profile-analyzer-single-view-annotated.png)<br/>*The Profile Analyzer window in Single view
|Pane|Description|
|---|---|
|**A:** Frame control| Displays individual frame timings, ordered by frame index or frame duration. You can also use this pane to select a range of frames for the Profile Analyzer to analyze. For more information on this pane, see the [Frame control](frame-range-selection.md) documentation. <br/><br/> In Compare View, to select the same range on both sets of data, enable **Pair Graph Selection** underneath the charts and then click and drag a selection on either of the charts. For more information on this pane, see the [Frame control](frame-range-selection.md) documentation.|
|**B:** Filters| Use the filter pane to limit the data that the Profile Analyzer displays. You can filter by partial match name, thread, or depth slice. You can also exclude markers to remove any markers that aren't relevant from the filtered view. For more information on how to use the filter pane, see the [Filter](filtering-system.md) documentation.|
|**C:** Top 10 markers on median frame(s)| Visualizes the ten highest duration markers that contributed to the frame. In Compare view, this shows the ten highest markers for both sets of data. You can select any of the markers in this pane to see more information on them. The Profile Analyzer reflects changes you make to the Depth filter in this pane.<br/><br/>In Compare view, to adjust how the Profile Analyzer draws the markers against each other, use the **Ratio** dropdown.<br/> **Normalised** displays the two data sets relative to their own time at the selected depth. <br/>**Longest** displays the absolute difference between the two sets at the selected depth.|
|**D:** Marker details for currently selected range *(Single view)*<br/>Marker Comparison for currently selected range *(Compare view)*| A sortable list of markers, with detailed information on their timings. For more information on the particular statistics available in these panes, see the documentation on [Single view marker details list](single-view.html#marker-details-list) and [Compare view Marker Comparison list](compare-view.html#marker-comparison-list).|
|**E:** Frame summary| Displays a summary of frame times. For more information on this pane, see the documentation on [Frame Summary](frame-summary.md).|
|**F:** Thread summary|Displays information about the threads in the data set. For more information, see the documentation on the [Thread Summary pane](thread-summary.md).|
|**G:** Marker summary| Summarizes the marker data of the current selected item in the **Marker Details** list. For more information, see the [Marker summary](marker-summary.md) documentation.|
### Frame buttons
If the data you analyze in the Profile Analyzer is also loaded into the Profiler window, you can click on the frame buttons in the Profile Analyzer window to jump to the relevant frames in the Profiler.
![Jump to frame button](images/jump-to-frame-button.png)<br/>*The Frame Summary pane with the frame buttons highlighted.*
## Frame range selection
You can limit the analysis to a subset or selection of frames. To do this, you can click and drag on the chart in the Frame Control pane at the top of the **Single** and **Compare** views and select a range, or use the context menu commands to select a range. For more information on using the frame range pane, see the [Frame Control pane](frame-range-selection.md) documentation.
## Filtering
You can also filter the data to limit the number of markers the Profile Analyzer displays. This includes filtering by thread, call depth and name substrings. You can order the remaining markers by any of the available metrics in the marker list control. For more information on how to use the filter system, see the [Filters pane](filtering-system.md) documentation.

View File

@ -0,0 +1,100 @@
# Single view
The **Single** view displays information about a single set of profiling data. You can use it to analyze how markers perform across frames. The view is divided into several frames, which contain information on frame timings, as well as min, max, median, mean, and lower / upper quartile values for frames, threads, and markers.
For information on navigating the window, see the [Profile Analyzer window navigation](profile-analyzer-window.html/#window-navigation) documentation.
![Single View](images/profile-analyzer-single-view.png)<br/> *The Single view in the Profile Analyzer window, with some data loaded*
## Loading data
To load data into the **Single** view, select the **Pull Data** button in the frame control pane, and the Profile Analyzer pulls in any data in the [Profiler](https://docs.unity3d.com/Manual/Profiler.html) window. Alternatively, select the **Load** button to load Profile Analyzer (.pdata) data you have saved from a previous session.
>[!NOTE]
>If you select the **Load** option, the data must be in the Profile Analyzer .pdata format. If you have data from the Profiler in the .data file format, open it in the Profiler first, and then select the **Pull Data** button in the Profile Analyzer.
For more information on how to pull data into the Profile Analyzer, see the workflow documentation on [Collecting and viewing data](collecting-and-viewing-data.md).
## Marker details list
The **Marker details** pane contains a sortable list of markers with a number of useful statistics. If you select a marker in the list, the **Marker Summary** panel displays in depth information on the marker. Each marker in the list is an aggregation of all the instances of that marker, across all filtered threads and in all ranged frames.
You can filter the columns in the **Marker details** to a more relevant set. This is particularly useful if you want to filter out irrelevant data when you look for **Time** or **Count** values. To filter the columns, select the **Marker columns** dropdown from the **Filters** pane. For more information on how to filter data, see the [Filters](filtering-system.md) documentation.
### Marker details columns and groups
By default, the **Marker columns** dropdown in the **Filters** pane has six preset column layouts that you can use to adjust the layout of the **Marker details** pane. They are:
* **Time and count:** Displays information on the average timings and number of times the markers were called.
* **Time:** Displays information on the average timings of the markers.
* **Totals:** Displays information about the total amount of time the markers took on the whole data set.
* **Time with totals:** Displays information about both the average and total times of the markers.
* **Count totals:** Displays information about the total number of times the markers were called.
* **Count per frame:** Displays information on the average total per frame the markers were called.
* **Depths:** Displays information on where the markers are in the Hierarchy. For more information, see the documentation on Depth Slices in [Filters pane](filtering-system.html#depth-slice).
* **Threads:** Displays the name of the thread that the markers appear on. For more information, see the documentation on the Thread window in [Filters pane](filtering-system.html#thread-window).
You can also use the **Custom** column layout, to select your own custom mix of columns to add to the layout. To do this, right-click on the header of any column, and manually enable or disable any of the columns as necessary.
The following table shows the columns that the Profile Analyzer displays when you select that layout.
||**Time and count**|**Time**|**Totals**|**Time with totals**|**Count totals**|**Count per frame**|**Depths**|**Threads**|**Custom only**|
|---|---|---|---|---|---|---|---|---|---|
|**Marker Name**|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;||
|**Depth**|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|||
|**Median**|&#10003;|&#10003;||&#10003;||||||
|**Median Bar**|&#10003;|&#10003;||&#10003;||||||
|**Mean**|&#10003;|||||||||
|**SD**|||||||||&#10003;|
|**Min**|&#10003;|&#10003;||&#10003;||||||
|**Max**|&#10003;|&#10003;||&#10003;||||||
|**Range**|&#10003;|&#10003;||&#10003;|||||
|**Count**|&#10003;||||&#10003;|||||
|**Count Bar**|||||&#10003;|||||
|**Count Frame**|&#10003;|||||&#10003;||||
|**Count Frame Bar**||||||&#10003;||||
|**Count SD**|||||||||&#10003;|
|**1st**|||||||&#10003;||||
|**At Median Frame**|&#10003;|&#10003;||&#10003;||||||
|**Total**|||&#10003;|&#10003;||||||
|**Total Bar**|||&#10003;|&#10003;||||||
|**Threads**||||||||&#10003;||
The following table explains what each column does:
|**Column**|**Description**|
|---|---|
|**Marker Name**| Displays the name of the marker.|
|**Depth**|The depth in the hierarchy that the marker appears on.|
|**Median**| The median value of the marker's time distribution.|
|**Median Bar**| A visualization of the **Median** value.|
|**Mean**| The average value of the marker's time distribution.|
|**SD**| The standard deviation of the marker's time distribution.|
|**Min**| The minimum value of the marker's time distribution.|
|**Max**| The maximum value of the marker's time distribution.|
|**Range**| The difference between the marker's **Min** and **Max** timings.|
|**Count**| The number of times the marker was pushed / popped.|
|**Count Bar**|A visualization of the **Count** value. |
|**Count Frame**|The average number of times per frame that the marker was pushed/popped.|
|**Count Frame Bar**|A visualization of the **Count Frame** value.|
|**Count SD**|The standard deviation of **Count** value.|
|**1st**| The frame number in which the marker first was pushed / popped.|
|**At Median Frame**| The sum of activity for the marker in the median frame.|
|**Total**| The total time spent for this marker in all selected frames.|
|**Total Bar**|A visualization of the **Total** value.|
|**Threads**|The name of the thread that the marker appears on.|
### Marker Details context menu commands
If you right click on a marker in the **Marker Details** list you can control the filter and list even further.
|**Command**|**Function**|
|---|---|
|**Select Frames that contain this marker (within whole data set)**| Select all the frames from the entire data set that contain an instance of this marker.|
|**Select Frames that contain this marker (within current selection)**| Select all the frames from a selected range of data that contain an instance of this marker.|
|**Select All**| Selects the entire data set, if you have a range of data selected.|
|**Add to / Remove From Include Filter**| Add or remove the selected marker to the **Include** filter. This filters the marker list to only markers that match.|
|**Add to Exclude Filter**| Add the selected marker to the **Exclude** filter. This removes the marker from the marker list. This is useful if you want to remove markers that are using up resources and skewing the markers that you are interested in.|
|**Set as Parent Marker Filter**| Limit the analysis to this marker and markers included below it on the callstack. For more information, see the [Parent Marker](filtering-system.html#parent-marker) documentation on the Filters page.|
|**Clear Parent Marker Filter**| Select this to clear the marker as a parent marker filter.|
|**Copy To Clipboard**| Copies the selected value to the clipboard.|

View File

@ -0,0 +1,52 @@
# Statistics in the Profile Analyzer
The Profile Analyzer displays a number of statistics about the data you're analyzing in the Frame, Thread, and Marker Summary panes..
## Available statistics
|**Statistic**|**Description**|
|---|---|
|**Min**| Min represents the lowest (minimum) value for the marker or frame time.|
|**Max**| Max represents the largest (maximum) value for the marker or frame time.|
|**Median**|[Median](https://en.wikipedia.org/wiki/Median) is the middle value of a data set, and separates the higher half from the lower half of a data set. |
|**Mean**| [Mean](https://en.wikipedia.org/wiki/Arithmetic_mean) is the average value in a data set. It represents the sum of all of the values in the data set divided by the number of values in the data set.|
|**Lower and Upper Quartiles**|The lower [quartile](https://en.wikipedia.org/wiki/Quartile) is the middle number between the smallest number and the median of the data set. The upper quartile is the middle value between the median and the highest value of the data set.|
|**Interquartile Range**| The [interquartile range](https://en.wikipedia.org/wiki/Interquartile_range) shows the range of values in the central 50% of the data. The range is equal to the difference between the upper and lower quartile values. |
## How the statistics are represented
The statistics are displayed in several ways in the Profile Analyzer. In the Frame, Thread, and Marker summary panes, the statistics are displayed as raw numbers as well as in [histograms](https://en.wikipedia.org/wiki/Histogram) and [box and whisker plots](https://en.wikipedia.org/wiki/Box_plot) to give a visual representation of time distribution. The following section gives some examples of some common distributions you might find in your analysis.
## Single view
### Even distribution
![Even distribution](images/even-distribution.png)
In this example, the graphs display a distribution of marker calls that range from 16.75ms to 17.26ms. The histogram on the left shows that a lot of the buckets are being hit at a fairly even amount. This is also evident in the box and whisker plot on the right where the box is large and is towards the middle of the upper and lower bounds.
### Outlier
![Outlier distribution](images/outlier.png)
In this example, the graphs display a distribution of marker calls that range from 0.67ms to 5.32ms. The histogram on the left shows that the lower end buckets are used the most and only some of the more expensive buckets are hit. This is also reflected in the box and whisker plot, where the box appears towards the bottom of the range but the whisker, or upper bound of the range, is high up.
## Compare view
### Similar distribution
![Similar distribution](images/similar-distributions.png)
In this example, there are two distributions that are similar, and both the histogram and box and whisker plots show a very similar pattern. This shows that the marker activity in both sets is similar.
### Different distribution
![Different distributions](images/different-distributions.png)
In this example, there are two distributions that are different; both the histogram and the box and whisker plots show that the marker in the left (blue) data set ran for longer. The histogram shows that the blue data set used more expensive buckets, and the box and whisker plot is drawn higher up on its range. This means that the marker activity in left (blue) data set is more costly and should be investigated further.
### Overlapping distributions
![Overlapping distributions](images/overlapping-distributions.png)
In this example, there are two distributions that are similar. Both data sets have the same lower bound and have some overlap in the middle of the range, but the right (orange) dataset uses some of the more expensive buckets and has a higher upper bound. This means that the activity in right (orange) data set is more costly or is being called more times and should be investigated further.

View File

@ -0,0 +1,18 @@
# Thread Summary
The Thread Summary pane displays information about the threads in the data set. You can use the information in this pane to compare and understand the number of threads used in the data set.
By default, the Profile Analyzer only displays information about the Main Thread. To add more threads to the analysis, use the **Thread** button in the Filters pane. For more information, see the documentation on the [Filters pane](filtering-system.html/#thread-window).
![Thread Summary](images/thread-summary.png)<br/>*The Thread Summary pane in Single View (left), and Compare View (right)*
## Statistics
|**Statistic**|**Description**|
|---|---|
|**Total Count**|The total number of threads in the data set, or data selection. The Compare view also has a **Total** column, which displays the total count for all threads across both data sets.|
|**Unique Count**<br/>*(Compare view only)*|The number of unique threads in each data set. A unique thread is one that is not in the other data set. The **Total** column displays the total of unique threads across both data sets.|
|**Selected**|The number of threads selected in the data set. To add more threads use the **Thread** button in the [Filters pane](filtering-system.html/#thread-window).|
|**Graph Scale**|Select a scale for the plot. You can choose from:<br/> **Median frame time**<br/>**Upper quartile of frame time**</br>**Max frame time**.|
At the bottom of the pane, there is a summary of the median run time of the current filtered threads with a box and whisker plot of them. You can use these graphs to analyze which threads Unity spends the most time on.

View File

@ -0,0 +1,3 @@
# Profile Analyzer upgrade guide
You do not need to take any actions to upgrade your project when you update this package.

View File

@ -0,0 +1,13 @@
# What's new in 1.2.2
Summary of changes in Profile Analyzer version 1.2.2.
The main updates in this release include:
## Added
* Added support for removing vsync time, so we can see actual CPU duration over multiple frames. A drop down has been added to 'remove' a marker from the analysis and has entries for "FPS Wait", "Present Wait" and "Custom" where you can select any marker from the table using the right click context menu to "Remove Marker".
* Added optional standard deviation (SD) column into marker table (on single view) for sorting data based on variation of marker timings in over the frames.
* Added export of the comparison table as CSV.
For a full list of changes and updates in this version, see the [Profile Analyzer package changelog](https://docs.unity3d.com/Packages/com.unity.performance.profile-analyzer@latest/index.html?subfolder=/changelog/CHANGELOG.html).