View previous topic :: View next topic |
Author |
Message |
Asparius
Joined: 18 Sep 2007 Posts: 52
|
Posted: Mon Oct 01, 2007 21:36 Post subject: Problem with profiler plugin. |
|
|
Hi.
First, I want to apologize for my language problems - it isn't my native language. So - sorry for any errors and mistakes I will surely make
I tried to check how much server time will be used by certain command (FindSubString - finding 8 char string in 8000 char string ). Maked 2 scripts - on_mod_load and "test".
On module load "test" script was fired 200 times by ExecuteScript. in "test" after FindSubString commands, I put line:
DelayCommand (0.1f, ExecuteScript ("test", GetModule()));
so every "test" fired itself after a 0.1 sec delay - with 200 scripts fired in module load making a 2000 script runs per second .
Server used 80% CPU time while it was running. Not bad - since I doubt that in my PW it will be used more than 1-2 times per second...
.. then I have checked profiler log.
Code: | NWNX Profiler V.1.60
(c) 2005 by Ingmar Stieger (papillon@nwnx.org)
visit us at http://www.nwnx.org
* Updated entries are marked with a * symbol
* Logfile maximum size limit is: 1048576 bytes
* Log level: Only overall statistics will be logged.
* RunScript hooked (symbol: >).
* Cross area pathfinding hooked (symbol: @)
* Tile pathfinding hooked (symbol: $)
Current statistics
-----------------------------------------------------------------------------------------------
tescik 7209 msec 19831 calls *| >tescik 7747 msec 19830 calls *|
-----------------------------------------------------------------------------------------------
Elapsed time : 10001 msec
Runtime delta : 14956 msec
Total cumulative runtime : 14956 msec
Total number of scriptcalls : 39662
Current statistics
-----------------------------------------------------------------------------------------------
tescik 14074 msec 39147 calls *| >tescik 15143 msec 39146 calls *|
-----------------------------------------------------------------------------------------------
Elapsed time : 10001 msec
Runtime delta : 14261 msec
Total cumulative runtime : 29217 msec
Total number of scriptcalls : 78294
|
and so on...
It appears that server time used by scripts fired using ExecuteScript is counted twice. Is there any way to remove this problem?
Thanks for any help. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Oct 08, 2007 13:00 Post subject: |
|
|
No, that's by design...
I count the time of a script that was called via ExecuteScript (>) towards the total of the calling script, so you can see where the time is beeing spent (and why).
But if you know this, you can interpret the results accordingly, no ? _________________ Papillon |
|
Back to top |
|
|
|