23.07.2011, 03:50
(
Last edited by dugi; 21/06/2016 at 02:17 PM.
)
Performance profiler
This plugin can count how many times each of functions is called and how much time it takes to execute. This information is outputted in one of the currently supported formats: HTML , XML or and plain text.
Profiling begins right after a script gets loaded and stops when you unload it (i.e. when you close the server or do gmx/fsunload/fsreload). At unloading time, all statistical data is saved to a file called <script_name>-profile.<format> in .amx directory. The <format> part depends on your output format choice (see below).
Profiler adds a few extra server.cfg variables:
https://github.com/Zeex/samp-plugin-profiler/releases
Source code
https://github.com/Zeex/samp-plugin-profiler
This plugin can count how many times each of functions is called and how much time it takes to execute. This information is outputted in one of the currently supported formats: HTML , XML or and plain text.
Profiling begins right after a script gets loaded and stops when you unload it (i.e. when you close the server or do gmx/fsunload/fsreload). At unloading time, all statistical data is saved to a file called <script_name>-profile.<format> in .amx directory. The <format> part depends on your output format choice (see below).
Profiler adds a few extra server.cfg variables:
- profile_gamemode <0|1>
If set to 1, profiler will profile currently running game mode. Default value is 0.
- profile_filterscripts <fs1> <fs2> ...
A list of filter scripts to be profiled. Can be empty.
- profile_format <xml|html|txt>
Set statistics output format. Default is html. Note for HTML: it is possible to sort stats by clicking on column names!!
- call_graph <0|1>
Set this option to 1 if you want profiler to generate a call graph. The graph is generated as a GraphViz dot file.
- call_graph_format <format>
If specified, profiler will try to convert the .gv file into one of the formats supported by dot.
The dot program is invoked as follows:
Code:<install_path>/dot -T<format> <some_script-calls.gv> -O
https://github.com/Zeex/samp-plugin-profiler/releases
Source code
https://github.com/Zeex/samp-plugin-profiler