logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Problem with profiler plugin.

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Asparius



Joined: 18 Sep 2007
Posts: 52

PostPosted: Mon Oct 01, 2007 21:36    Post subject: Problem with profiler plugin. Reply with quote

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 Smile



I tried to check how much server time will be used by certain command (FindSubString - finding 8 char string in 8000 char string Smile ). 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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Mon Oct 08, 2007 13:00    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group