[Plugin] Performance profiler
#61

leong124, Im big n00b and i dont know how to add compiler flag ;/

Robanswe
Thank you now it works
Reply
#62

Quote:
Originally Posted by __[ShaDoW]__
Посмотреть сообщение
leong124, Im big n00b and i dont know how to add compiler flag ;/
Create a file called pawn.cfg inside your "server root\pawno" (if it doesn't already exist). Open the file with any text editor and add -d3 to the first line and save. Now recompile your script and the plugin will show names instead of addreses.
Reply
#63

Astonishing. I'll certainly make good use for this in the future.
Reply
#64

I run it in my role play server for 12 hours with 100~135 players online,
this map contains more than 60k codes,
I need the finally log to find out what causing our server laggy,
Now this plugin it's taking 1G of memory,But now it stills works fine.
And never cause server run slowly!
Reply
#65

Quote:
Originally Posted by cyber_punk
Посмотреть сообщение
I have encountered the same behavior, I have used the precompiled bins and also self compiled ones and I get no .prof I have used /rcon gmx and also ending my gamemodes round normally (which just calls GameModeExit). I am using Linux (Fedora 15..) I can provide anymore info if necessary, would really like to see this working.


Awesome the latest version is writing the .prof file, Thanks Zeex!
Reply
#66

[12:33:33] Loading plugin: profiler.so
[12:33:33] Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by plugins/profiler.so))

any suggestions?
Reply
#67

Quote:
Originally Posted by ajwar
Посмотреть сообщение
[12:33:33] Loading plugin: profiler.so
[12:33:33] Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by plugins/profiler.so))

any suggestions?
Same happens to me
Reply
#68

Hello I still got big crash problems. It seems to work ok on my filterscrips but not on my gamemode it nearly always crashes after using gmx. Also I like to be able to start the profiling when I like to and not just when the script starts. Because when my server startup it calls like 10000 callback and that makes the end result to be misleading. Because I don't care if the server takes 1 min to startup as long all other code is fast and not called to often.


Also seem to still have problem with wired result sometimes:
SetPosWithStreamObj 1 38295494 38295494 69.92

yeah sure that function took 38 secs to run-_-
Reply
#69

now i get:

Failed (plugins/profiler.so: undefined symbol: _ZGVZN9SingletonI13AmxNameFinderE11GetInstanceEvE8 instance)
Reply
#70

Nice!!
Reply
#71

Great!
Reply
#72

I'm guessing this needs recompiling on Linux as I seem to be getting this error:
Код:
Loading plugin: profiler.so
   Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by plugins/profiler.so))
Could this be done? Or, (noob alert), could someone tell me how to do it, as I've never actually compiled anything on Linux before...

//Sorry for the Bump by the way.
Reply
#73

First of all, this is an excellent plugin.

Working fine on windows test server.

initial results show a high percentage of time on "CallLocalFunction", which only appears in the script within a command that was not used during the test.

Would the profiler be pointing to SetTimer, and SetTimerEx?
can anyone enlighten me?
Reply
#74

Quote:
Originally Posted by Rachael
Посмотреть сообщение
First of all, this is an excellent plugin.

Working fine on windows test server.

initial results show a high percentage of time on "CallLocalFunction", which only appears in the script within a command that was not used during the test.

Would the profiler be pointing to SetTimer, and SetTimerEx?
can anyone enlighten me?
You may use some includes that use CallLocalFunction, SetTimer and SetTimerEx appear under there own names.
Reply
#75

does anyone else get results like this?

or can you help me to find the function being called in the CallLocalFunction that is taking so long?
Код:
CallLocalFunction  		26  	1706717  	44374652  	30.78
Streamer_OnGameModeInit 	1 	18501457 	18501457 	12.83
IRC_OnGameModeInit 		1 	18501444 	18501444 	12.83
zcmd_OnGameModeInit 		1 	18501429 	18501429 	12.83
Itter_OnGameModeInit 		1 	18501417 	18501417 	12.83
OnGameModeInit 			1 	7423579 	7423579 	5.15
Timers_OnScriptInit 		1 	7389589 	7389589 	5.13
MapAndreas_Init 		1 	4580016 	4580016 	3.18
printf 				50 	51328 	2566418 		1.78
CallLocalFunction features regularly in most of the includes


i've tried putting
pawno/include/streamer.inc
etc
in the profiler.cfg, which was a long shot, because I guess the includes are only read during compiling.

I have been able to eliminate the irc and mapandreas include, because I can make the compiler skip them by commenting out a define, but the other includes are burried too deep in the script.

here are the includes, in case thats relevant.

#include <a_samp>
#include <sscanf2>
#include <streamer>
#include <irc>
#include <a_npc>
#include <zcmd>
#include <mapandreas>
#include <foreach>
#include <YSI\y_timers>
Reply
#76

OK this is what we got:

- zcmd executes ALL commands via CallLocalFunction()
- foreach, zcmd, streamer use it for ALS-style hooks
- YSI uses CallLocalFunction for loads of things

So it's kinda normal that yout script has lots of calls to CallLocalFunction() - you can't do anything about that (except make your own CallLocalFunction and replace the default one)
Reply
#77

The test that produced these results involved starting a local test server, joining with one player, typing a few commands ( one or two max ), then doing nothing for about 15 minutes.

I was never too concerned about the init functions, however its unlikely they are being timestamped one after the other, because I was on the server and performing / seeing results from commands well within 10 seconds. The only delay visible from the console on startup is mapandreas, which seems to hang the startup process for one or two seconds.

The script doesn't seem to lag at all, I have not had any problems with it.
I will do some more testing over a longer time period with more players, hopefully this will produce some results which make more sense.
Reply
#78

This crashes my server on gmx sometimes. "Access violation when reading [00000000]"
Reply
#79

I guess this needs to be re-written as currently its output is not very informative and mostly misleading (the time taken by callees is included in a caller's time) so it's almost useless. Maybe I'll do something with this soon...
Reply
#80

Quote:
Originally Posted by 0x5A656578
Посмотреть сообщение
I guess this needs to be re-written as currently its output is not very informative and mostly misleading (the time taken by callees is included in a caller's time) so it's almost useless. Maybe I'll do something with this soon...

Ohhhhhhh o.k I was wondering about that. Still even in its mucked up state it has proven to be useful in spotting redundant and unnecessary function calls. I freed up some processing getting rid of IsPlayerConnected, IsPlayerInAnyVehicle I was totally surprised at my first profile results seeing how many times those function actually got called during one round. So in that sense even in its current state it can be useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)