What is it for?
It is intended for advanced users to measure per-plugin / per-function (including internal game function) performance.
See an example of the final report attached to this post.
Description:Provides an easy way to run a valve profiler with one single command and save a log to a separate file.
This is actually a shortcut for "sm prof*" + some internal game commands.
This is the only correct way to run profiler for L4D series games without a crash. For details, see the issue.
EDIT. That bug was fixed in SM v1.11.6726.
Graph includes: - Game + plugin functions call stack
- Function list sorted by max number of total calls
- Function list sorted by Avg time/Frame
- Function list sorted by Avg time/Call
- Function list sorted by Avg time/Peak
- All of the above separately with / or without children calls
WARNING - Be careful, if you install it on the Live server! Stopping the profiler will cause a significant lag due to the analysis process. Actually, it can freeze you > 10 sec.
- You may want to disable a watchdog by putting the following argument in server startup options, otherwise the server can exit with timeout (thanks to peace-maker for the suggestion):
and possibly, "SlowScriptTimeout" "0" in /sourcemod/configs/core.cfg
- It's better to run the profiler for a short period of time.
- The longer it is running, the longer the analysis process will take.
Direct analysis of profiler logs is not provided in this topic.
Create your own topic in "
General" section of the forum to get some help.
Requirements and Compatibility: - SourceMod v1.11.6726+
- Any SM compatible game
- Carefully read "WARNING" section above !!!
ConVars: - Nothing
However, there are other game ConVars you may want to check on your own:
Code:
vprof_counters : 0 : LAUNCHER :
vprof_counters_show_minmax : 0 : LAUNCHER :
vprof_dump_oninterval : 0 : LAUNCHER : Interval (in seconds) at which vprof will batch up data and dump it to the console.
vprof_dump_spikes : 0 : LAUNCHER : Framerate at which vprof will begin to dump spikes to the console. 0 = disabled, negative to reset after dump
vprof_dump_spikes_budget_group : : LAUNCHER : Budget gtNode to start report from when doing a dump spikes
vprof_dump_spikes_hiearchy : 0 : LAUNCHER : Set to 1 to get a hierarchy report whith vprof_dump_spikes
vprof_dump_spikes_node : : LAUNCHER : Node to start report from when doing a dump spikes
vprof_dump_spikes_terse : 0 : LAUNCHER : Whether to use most terse output
vprof_graph : 0 : LAUNCHER : Draw the vprof graph.
vprof_graphheight : 256 : ARCHIVE :
vprof_graphwidth : 512 : ARCHIVE :
vprof_scope : : LAUNCHER : Set a specific scope to start showing vprof tree
vprof_scope_entity_gamephys : 0 : LAUNCHER|GAMEDLL :
vprof_scope_entity_thinks : 0 : LAUNCHER|GAMEDLL :
vprof_server_spike_threshold : 999.0 : LAUNCHER :
vprof_server_thread : 0 : LAUNCHER :
vprof_think_limit : 0 : LAUNCHER|GAMEDLL :
vprof_unaccounted_limit : 0.3 : ARCHIVE : number of milliseconds that a node must exceed to turn red in the vprof panel
vprof_verbose : 1 : ARCHIVE : Set to one to show average and peak times
vprof_warningmsec : 10 : ARCHIVE : Above this many milliseconds render the label red to indicate slow code.
Commands: - !debug - start/stop the profiler
Log location: - addons/sourcemod/logs/profiler__<date>_<time>.log
Installation: - copy .smx to addons/sourcemod/plugins
Credits: - Valve & SM dev. team
Replated plugins: - Auto-VPROF by KiD Fearless
DonateDonates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money