Raised This Month: $32 Target: $400
 8% 

amxmodx profiler


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 03-01-2008 , 02:17   amxmodx profiler
Reply With Quote #1

This is a profiler built into amxmodx's core - it really is only useful to people trying to find bottlenecks in their plugins.

What is a profiler? It basically tells you how long your plugin spends executing stuff.

To install it, just replace the amxmodx_mm_i386.so or amxmodx_mm.dll files (remember to backup your old ones) with the provided binaries. You do not need to recompile any plugins or change any modules.

Then configure plugins to be profiled like you would to get plugins debugged.

There is a new cvar, "amx_profile", its configuration is identical to "amx_debug":
0 = no plugins will be profiled
1 = only specified plugins will be profiled (default)
2 = all plugins will be profiled

To specify a plugin for profiling (for amx_profile mode 1), open up plugins.ini, and after the plugin name, add "profile".

For example, "admin.amxx" would become "admin.amxx profile"

Note: You cannot profile a plugin in debug mode.


When a plugin is being profiled, there is a very slight overhead. It should be unnoticeable, and you should be able to profile plugins on a production environment.

At map change, all plugins that are being profiled will get their profile data appended to amxmodx/data/profiles/<pluginname.amxx>.txt

The profiler will read the time it takes to execute native calls, public function calls (from forwards), and function calls (direct public function / stock function calls).

Additionally, it provides two new natives (they are not available in amxmodx's official core) to allow you to profile special chunks of code yourself. Documentation for these is available in the "profiler.inc" file.

Source is available here

Any issues with this version post here, do not file a bug report for it.

Edit:
New version for 1.8.2 and bugs fixed is available here: https://forums.alliedmods.net/showpo...0&postcount=87
Attached Files
File Type: zip amxmodx-1.8.0.3660-profiler.zip (520.1 KB, 1323 views)
File Type: zip amxmodx-1.8.1.3746-profiler.zip (542.1 KB, 2251 views)
__________________
fyren sucks

Last edited by xPaw; 08-13-2011 at 10:07.
sawce is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode