Просмотр исходного кода

Updated profiler documentation

Björn Ritzl 3 лет назад
Родитель
Сommit
e891f89e33

BIN
docs/en/manuals/images/profiling/webprofiler_frame_data.png


BIN
docs/en/manuals/images/profiling/webprofiler_frame_timechart.png


BIN
docs/en/manuals/images/profiling/webprofiler_frames_overview.png


BIN
docs/en/manuals/images/profiling/webprofiler_frames_plot.png


BIN
docs/en/manuals/images/profiling/webprofiler_global_properties.png


BIN
docs/en/manuals/images/profiling/webprofiler_mode.png


BIN
docs/en/manuals/images/profiling/webprofiler_page.png


BIN
docs/en/manuals/images/profiling/webprofiler_sample_timeline.png


+ 14 - 24
docs/en/manuals/profiling.md

@@ -5,7 +5,7 @@ brief: This manual explains the profiling facilities present in Defold.
 
 # Profiling
 
-Defold includes a set of profiling tools that are integrated with the engine and the build pipeline. These are designed to help find problems with performance and memory usage. The built-in profilers are available on debug builds only.
+Defold includes a set of profiling tools that are integrated with the engine and the build pipeline. These are designed to help find problems with performance and memory usage. The built-in profilers are available on debug builds only. The frame profiler that is used in Defold is the [Remotery profiler by Celtoys](https://github.com/Celtoys/Remotery).
 
 ## The runtime visual profiler
 
@@ -33,46 +33,36 @@ Refer to a the [profiler API reference](/ref/stable/profiler/) for more informat
 
 ## The web profiler
 
-While running a debug build of the game, an interactive web-based profiler can be accessed through a browser. It allows you to sample your game over a series of frames and then analyze each frame in detail.
+While running a debug build of the game, an interactive web-based profiler can be accessed through a browser. It allows you to sample your game while it is running and analyze individual frames in detail.
 
 To access the profiler:
 
 1. Start your game on your target device.
-2. Select <kbd> Debug ▸ Open Web Profiler</kbd> menu. Alternatively, for example, when you use multiple targets simultaneously, you can open a web browser and point it to `http://<device IP>:8002` where `<device IP>` is the IP address of the device. You can find the IP numbers of your target devices in the <kbd>Project ▸ Target</kbd> menu. If you are running your game on your desktop computer, http://localhost:8002 will bring up the profiler.
+2. Select <kbd> Debug ▸ Open Web Profiler</kbd> menu. Alternatively, for example, when you use multiple targets simultaneously, you can open a web browser and point it to `http://<device IP>:8002` where `<device IP>` is the IP address of the device. You can find the IP numbers of your target devices in the <kbd>Project ▸ Target</kbd> menu.
 
-![Web profiler mode](images/profiling/webprofiler_mode.png)
-At the top, next to the *Capture* button there are radio buttons to switch between the *CPU/Frame profiler* and the *Resource profiler*.
 
 ### CPU/Frame profiler
-The CPU profiler is divided into 4 sections that all give different views into the current sample data. To update the sample data, press the *Capture* button at the top.
+The CPU profiler is divided into several sections that all give different views into the runing game. Press the Pause button in the top right corner to temporarily stop the profiler from updating the views.
 
 ![Web profiler](images/profiling/webprofiler_page.png)
 
-Frames overview
-: The frames overview plots the currently sampled 20 frames side by side. The height of each bar shows the time spent in the frame. The number on the left hand side shows the max time spent in a frame in the current sample data.
+Sample Timeline
+: The Sample Timeline will show the frames of data captured in the engine, one horizontal timeline per Thread. Main is the main thread where all of the game logic and most of the engine code is run. Remotery is for the profiler itself and Sound is for the sound mixing and playback thread. You can zoom in and out (using the mouse wheel) and select individual frames to see the details of a frame in the Frame Data view.
 
-  ![Frames overview](images/profiling/webprofiler_frames_overview.png)
+  ![Sample Timeline](images/profiling/webprofiler_sample_timeline.png)
 
-  Below the frames overview is a detailed frame data view.
 
-  Click on a frame bar in the overview to show the data for that specific frame in the data view.
-
-Frame data
-: The frame data view is a table where all data for the currently selected frame is broken down into detail. You can view how many milliseconds are spent in each engine scope (to the left) and also see sample points within the scopes (middle column). On the right hand side is a table of counters. They make it is easy to, for instance, track the number of draw calls required for each frame in the sample data.
+Frame Data
+: The Frame Data view is a table where all data for the currently selected frame is broken down into detail. You can view how many milliseconds are spent in each engine scope.
 
   ![Frame data](images/profiling/webprofiler_frame_data.png)
 
-  Ticking the checkbox associated with a sample point or counter adds that data to the plot below.
-
-Frames plot
-: The frames plot view displays a plot over all sampled frames with the data you have selected in the frame data table above the plot. The plot shows frame number on the X axis and time (in milliseconds) or counts on the Y axis. Each selected data point is drawn in the color specified in the frame data table.
 
-  ![Frames plot](images/profiling/webprofiler_frames_plot.png)
+Global Properties
+: The Global Properties view shows a table of counters. They make it is easy to, for instance, track the number of draw calls or the number of components of a certain type.
 
-Frame time chart
-:  The frame time chart breaks the frame down visually making it easy to inspect where the engine spends its time during the selected frame.
+  ![Global Properties](images/profiling/webprofiler_global_properties.png)
 
-  ![Frame timechart](images/profiling/webprofiler_frame_timechart.png)
 
 ### Resource profiler
 The resource profiler is divided into 2 sections, one showing a hierarchical view of the collections, game objects and components currently instantiated in your game, and the other showing all currently loaded resources.
@@ -85,8 +75,8 @@ Collection view
 Resources view
 : The resources view shows all resources currently loaded into memory, their size and the number of references to each resource. This is useful when optimizing memory usage in your application when you need to understand what is loaded into memory at any given time.
 
-## Build reports
 
+## Build reports
 When bundling your game there is an option to create a build report. This is very useful to get a grip on the size of all the assets that are part of your game bundle. Simply check the *Generate build report* checkbox when bundling the game.
 
 ![build report](images/profiling/build_report.png){srcset="images/profiling/[email protected] 2x"}
@@ -101,8 +91,8 @@ The *Overview* gives an over all visual breakdown of the project size based on r
 
 The *Structure* section shows sizes based on how resources are organized in the project file structure. Entries are color coded from green (light) to blue (heavy) according to the relative size of the file and directory content.
 
-## External tools
 
+## External tools
 In addition to the built-in tools, there is a wide range of free high quality tracing and profiling tools available. Here is a selection:
 
 ProFi (Lua)