Difference between revisions of "Profiling"
(Added to expand and development categories.) |
m (3 revisions: Import from old wiki (on 15 May 2012)) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | VDrift | + | There are two profiling methods used to evaluate performance of VDrift code. VDrift provides its own in-game profiling system, or it may produce output suitable for the GNU gprof profiler. |
+ | |||
+ | ==In-game Profiling== | ||
+ | When VDrift is run with the <code>-profiling</code> command-line option, certain parts of the game code (determined by the developers and hard-coded in the source) are evaluated as the game runs. | ||
+ | |||
+ | vdrift -profiling | ||
+ | |||
+ | During execution, each profiled subsystem of the game is listed along the left side of the game window, along with the amount of time spent on that subsystem during the last tick. After VDrift exits, summarized profiling information is output to the '''stdout''' stream, including the percentage of time spent in each subsystem. | ||
+ | |||
+ | ==Profiling with gprof== | ||
+ | When VDrift is [[Compiling|compiled]] with the '''profiling''' [[Using SCons|option]] enabled, it produces output suitable for examination with the gprof tool. | ||
+ | |||
+ | Compiling with the '''profiling''' option enabled: | ||
+ | |||
+ | scons profiling=1 | ||
+ | |||
+ | Run VDrift: | ||
+ | |||
+ | build/vdrift | ||
+ | |||
+ | After exiting, run gprof on the executable: | ||
+ | |||
+ | gprof build/vdrift | ||
+ | |||
[[Category:Development]] | [[Category:Development]] | ||
− |
Revision as of 09:25, 26 August 2012
There are two profiling methods used to evaluate performance of VDrift code. VDrift provides its own in-game profiling system, or it may produce output suitable for the GNU gprof profiler.
In-game Profiling
When VDrift is run with the -profiling
command-line option, certain parts of the game code (determined by the developers and hard-coded in the source) are evaluated as the game runs.
vdrift -profiling
During execution, each profiled subsystem of the game is listed along the left side of the game window, along with the amount of time spent on that subsystem during the last tick. After VDrift exits, summarized profiling information is output to the stdout stream, including the percentage of time spent in each subsystem.
Profiling with gprof
When VDrift is compiled with the profiling option enabled, it produces output suitable for examination with the gprof tool.
Compiling with the profiling option enabled:
scons profiling=1
Run VDrift:
build/vdrift
After exiting, run gprof on the executable:
gprof build/vdrift