Changes between Version 6 and Version 7 of EngineProfiling


Ignore:
Timestamp:
Sep 7, 2013, 5:46:33 AM (11 years ago)
Author:
historic_bruno
Comment:

Add stub for profiler2

Legend:

Unmodified
Added
Removed
Modified
  • EngineProfiling

    v6 v7  
    3333
    3434Pressing Shift+F11 will save `profile.txt` in the game's logs folder (see GameDataPaths). Pressing it multiple times (without restarting the game) will append new measurements to that file.
     35
     36== Profiler2 ==
     37
     38The in-game profiler is designed to show average performance data at an instant in time. While this is adequate for some purposes, it's not as good for analyzing rapid fluctuations in game performance. It also doesn't support multiple threads, so only the engine thread can be analyzed. To solve these shortcomings, proflier2 was [http://www.wildfiregames.com/forum/index.php?showtopic=15270&st=20#entry228237 created].
     39
     40Profiler2 collects profiling data across multiple threads and runs a small web server in the engine. When enabled, an HTML page and script can request, analyze and render this profiling data. Profiler2 is currently enabled by pressing F11 while the game is open, similar to the in-game profiler. Then the HTML page included with the profiler2 tool ([source:/ps/trunk/source/tools/profiler2 source/tools/profiler2/profiler2.html]) is opened in a web browser supporting HTML5.
     41
     42TODO screenshot and describe it
     43
     44Using profiler2 in code works similarly to the in-game profiler, except the scoped macro is named `PROFILER2`:
     45{{{
     46#include "ps/Profiler2.h"
     47...
     48{
     49  PROFILE2("section name");
     50  ... code to measure ...
     51}
     52}}}
     53and it will measure all code from the `PROFILE2` until the end of the current scope. There is also `PROFILE2_EVENT` to record events in profiler2 and `PROFILE2_ATTR` to add printf-style strings to the current region or event (seen in tooltips when hovering the profiler2 rendered output). This allows displaying more contextual data than would typically be possible in a profiler. For convenience, using `PROFILE3` will measure with both the in-game profiler and the new profiler2.
     54
     55For more detailed GPU profiling data on some systems, `PROFILE2_GPU` and `PROFILE3_GPU` can be used similarly.
     56
    3557
    3658== Low-overhead timer ==