User Tools

Site Tools


en:tutorials:tools:profiler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:tools:profiler [2018/12/16 02:56 (5 years ago)] iarwainen:tutorials:tools:profiler [2022/06/12 15:43 (22 months ago)] (current) – Updated pause & history keyboard shortcuts iarwain
Line 3: Line 3:
 Every application that is built using Orx contains a profiler tool. The Profiler is compiled-in when using either debug or profile modes. Every application that is built using Orx contains a profiler tool. The Profiler is compiled-in when using either debug or profile modes.
  
-{{ :en:tutorials:tools:profiler.png?direct |}}+{{ tutorials:tools:profiler.png?direct |}}
  
 The tool helps you diagnose bottlenecks and monitor performance and internal resources. The tool helps you diagnose bottlenecks and monitor performance and internal resources.
Line 40: Line 40:
 ===== Profiler Layout ===== ===== Profiler Layout =====
  
-{{ :en:tutorials:tools:profiler-layout.png?direct |}}+{{ tutorials:tools:profiler-layout.png?direct |}}
  
 ==== 1) Thread Frame bar ==== ==== 1) Thread Frame bar ====
 This grey bar indicates which thread is currently selected. Most of Orx's tasks run on the main thread. There are other threads that handle things like streaming audio, resource requests and bitmap decompression. Select your thread with the ''Page Up'' and ''Page Down'' keys. This grey bar indicates which thread is currently selected. Most of Orx's tasks run on the main thread. There are other threads that handle things like streaming audio, resource requests and bitmap decompression. Select your thread with the ''Page Up'' and ''Page Down'' keys.
  
-{{ :en:tutorials:tools:thread-bar.png?direct |}}+{{ tutorials:tools:thread-bar.png?direct |}}
  
 The first value displayed is the amount of time in ms that it took to render the entire current frame. The second value shows the largest amount of time that a frame took to render in the last second. The first value displayed is the amount of time in ms that it took to render the entire current frame. The second value shows the largest amount of time that a frame took to render in the last second.
Line 52: Line 52:
 These colored meter bars indicate how much time each Marker took to complete within the frame. The colors themselves correspond to the colors on each Marker in the Marker Panel. These colored meter bars indicate how much time each Marker took to complete within the frame. The colors themselves correspond to the colors on each Marker in the Marker Panel.
  
-{{ :en:tutorials:tools:profiler-colours.png?direct |}}+{{ tutorials:tools:profiler-colours.png?direct |}}
  
 The bars are spread over four or more lines. The row of the bar corresponds to the level of the function call marker. For example, the ''orxRender_RenderAll'' function call is on the top level, so sits in the top row. The ''orxRender_RenderObject'' function call is three levels into the hierarchy and is therefore on the third row. The bars are spread over four or more lines. The row of the bar corresponds to the level of the function call marker. For example, the ''orxRender_RenderAll'' function call is on the top level, so sits in the top row. The ''orxRender_RenderObject'' function call is three levels into the hierarchy and is therefore on the third row.
  
-{{ :en:tutorials:tools:profiler-heir.png?direct |}}+{{ tutorials:tools:profiler-heir.png?direct |}}
  
 This helps easily distinguish between the markers that are of similar color. This helps easily distinguish between the markers that are of similar color.
Line 63: Line 63:
 This panel shows all the Markers currently running in the frame. Markers represent important function calls. Each Marker contains three numbers. This panel shows all the Markers currently running in the frame. Markers represent important function calls. Each Marker contains three numbers.
  
-{{ :en:tutorials:tools:profiler-markers.png?direct |}}+{{ tutorials:tools:profiler-markers.png?direct |}}
  
 The first is the amount of time in ms this Marker has taken to run in the current frame. The second number indicates the longest amount of time this Marker took to run in the last second. The first is the amount of time in ms this Marker has taken to run in the current frame. The second number indicates the longest amount of time this Marker took to run in the last second.
Line 76: Line 76:
 The Markers in this panel are white and have more than one parent. Therefore they don't fit in to the tree hierarchy. The Markers in this panel are white and have more than one parent. Therefore they don't fit in to the tree hierarchy.
  
-{{ :en:tutorials:tools:profiler-secondary-markers.png?direct |}}+{{ tutorials:tools:profiler-secondary-markers.png?direct |}}
  
 These markers can be grey in this panel as well for the same reason as the Marker Panel above. These markers can be grey in this panel as well for the same reason as the Marker Panel above.
Line 83: Line 83:
 Each line represents a different type of memory. Each line represents a different type of memory.
  
-{{ :en:tutorials:tools:profiler-memory.png?direct |}}+{{ tutorials:tools:profiler-memory.png?direct |}}
  
 The first group of numbers represents the number of live allocations and the second number is the max allocations in the past. The first group of numbers represents the number of live allocations and the second number is the max allocations in the past.
Line 97: Line 97:
 ===== Using the profiler ===== ===== Using the profiler =====
  
-You can pause or unpause the profiler at any time using the ''Space Bar''.+You can pause or unpause the profiler at any time by pressing ''F5''.
  
 Observe the running function call Markers. When first running the profile on the playground application, there will be no physics calls running in the engine. You can still interact with the demo in the background. If you click with the left mouse button you will spawn some physics objects. Observe the running function call Markers. When first running the profile on the playground application, there will be no physics calls running in the engine. You can still interact with the demo in the background. If you click with the left mouse button you will spawn some physics objects.
Line 111: Line 111:
 ===== History Graph ===== ===== History Graph =====
  
-You can activate a history graph of frames by pressing the ''Scroll Lock'' key. You will see past frames. The colors on each vertical slice correspond to the Meter Bars.+You can activate a history graph of frames by pressing ''F8'' key. You will see past frames. The colors on each vertical slice correspond to the Meter Bars.
  
-{{ :en:tutorials:tools:profiler-graph.jpg?direct |}}+{{ tutorials:tools:profiler-graph.jpg?direct |}}
  
-You can pause this graph with the ''Space Bar'' and you can scroll back and forth (using the ''Left'' and ''Right'' keys) through the history to a particular frame to inspect the meters and values for each Marker to observe spikes.+You can pause this graph with ''F5'' and you can scroll back and forth (using the ''Left'' and ''Right'' keys) through the history to a particular frame to inspect the meters and values for each Marker to observe spikes.
  
 The white vertical line shows the current frame being inspected. The white vertical line shows the current frame being inspected.
Line 121: Line 121:
 You can get more details on a particular marker depth by using the ''Up'' and ''Down'' keys. Notice a white indicator in the Meter Bar Panel that moves up and down to the selected depth? You can get more details on a particular marker depth by using the ''Up'' and ''Down'' keys. Notice a white indicator in the Meter Bar Panel that moves up and down to the selected depth?
  
-{{ :en:tutorials:tools:profiler-graph-level.jpg?direct |}}+{{ tutorials:tools:profiler-graph-level.jpg?direct |}}
  
 And that is the Orx Profiler. This tool should be invaluable for checking the health of your application and to help you optimize it. And that is the Orx Profiler. This tool should be invaluable for checking the health of your application and to help you optimize it.
 +
 +
 +===== Choosing the Profile Orientation =====
 +
 +The Profiler orientation can be set as either portrait or landscape. Landscape is the default. You can see the ''ShowProfiler'' and ''ProfilerOrientation'' properties available for the Profiler in the [[en:orx:config:settings_main:main#render_module|Render Config Properties]]:
 +
 +{{section>en:orx:config:settings_main:main#[summary11]&noheader&nofooter&noeditbutton}} 
 +
 +You can set to portrait with:
 +
 +<code=ini>
 +[Render]
 +ProfilerOrientation = portrait
 +</code>
 +
 +{{ tutorials:tools:profiler-portrait.png?nolink |}}
 +
 +This rotates the profiler to the left, perfect for portrait monitors.
en/tutorials/tools/profiler.1544957819.txt.gz · Last modified: 2018/12/16 06:57 (5 years ago) (external edit)