Chapter 1 - Exploring Performance Issues - profiler(2)

The author talks about how to connect profler for debugging. Several views on the Profiler, and the role of the various areas of the Profiler.

Profiler is mainly divided into four parts, namely

  • control area
  • Timeline view
  • Exploded View Control Area
  • exploded view

The areas where the Profiler is located are as follows

control area

The control area mainly includes recording, Deep Profile, Profile Editor, Connect Player, cleaning, saving, and loading. these functions

record function

Click the record button, which is the red dot button in the control area, to start or pause the collection of running debugging data. Data is continuously collected while the button is active. Note that runtime data is only collected when the application is actually running. For example, under the Editor, it needs to be in the state of Play Mode. On standalone platforms, the app needs to run in the foreground.

Deep Profile

The normal debug mode only records the call time and memory allocation of Unity's common functions. Such as Awake(), Start(), Update(), FixUpdate() and other functions. Activating the Deep Profile option will recompile the script at a higher level. This allows you to see the call to each function. And this will cause more performance consumption to the analysis tool, and it will also require more memory when collecting data. Even in a large project, the Deep Profile feature cannot be used because Unity may run out of memory resources before starting the test.

Profile Editor

The Profile Editor function enables performance analysis of the Unity Editor. This can help analyze our custom Editor scripts.

Connect Player

On the drop-down box of Connect Player, you can select the instance we need to debug. This instance can be the Editor program, or a local independent platform instance, or a remote device.

save and load functions

On the far right side of the control area there are save and load buttons. Click the save button to save the collected data as a file, and only 300 frames of data can be saved at a time. The collected data files can be loaded into the Profiler again by loading.

Timeline view

The Timeline view shows the data from the phone at runtime, and displays this data in separate areas. Each area displays data from a different subsystem. The right area will display graphical debugging data, and the left is a series of selection boxes, you can choose whether to display the corresponding data. Select the colored square, and the data graph of the corresponding color will be displayed on the right side. Click the area on the right to view the debugging data of the corresponding frame.

Exploded View Control Area

The exploded view control area will display the corresponding control area interface according to the module selected in the timeline view. The buttons and options in the control area determine how the data in the exploded view is displayed.

exploded view

The exploded view will display the corresponding data according to the options in the exploded view control area. The exploded view of some modules will provide brief or detailed debugging data according to the options in the control area.

Guess you like

Origin blog.csdn.net/shaobing32/article/details/123054613