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 
 
nwnx_profiler for linux
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
-Asylum-Skitzo



Joined: 16 Mar 2008
Posts: 4

PostPosted: Sun Mar 16, 2008 9:14    Post subject: Reply with quote

Ok, would come in handy if it was.

By the way, thanks for you work on the Linux ports.
Back to top
View user's profile Send private message
-Asylum-Skitzo



Joined: 16 Mar 2008
Posts: 4

PostPosted: Thu Jul 03, 2008 7:17    Post subject: Reply with quote

I made a modification to HookRunScript.cpp (with the help of a friend - Jotham) to datestamp the profiler logs. Makes tracking down the cause of high script time deltas easier to find.

Code:
diff nwnx_easy/profiler/HookRunScript.cpp nwnx_easy_modified/profiler/HookRunScript.cpp
26a27,29
> #include <ctime>
>
> #define DATEBUFFERLENGTH 256
122c125,131
<    
---
>
>    // Get current time
>    time_t now;
>         char strDate[DATEBUFFERLENGTH];
>    time(&now);
>    strftime(strDate, DATEBUFFERLENGTH, "%c", localtime(&now));
>
135c144,146
<    profiler.Log(1, "Total number of scriptcalls : %d\n\n", iScriptCounter);
---
>    profiler.Log(1, "Total number of scriptcalls : %d\n", iScriptCounter);
>    profiler.Log(1, "Current date is             : %s\n\n", strDate);
>


Heres an example of the new output:
Code:
Elapsed time                : 10205 msec
Runtime delta               : 1 msec
Total cumulative runtime    : 336 msec
Total number of scriptcalls : 1174
Current date is             : Sat Jun 21 22:59:00 2008
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Jul 03, 2008 9:20    Post subject: Reply with quote

Thanks, I'll merge your patch into the repository.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
ExileStrife



Joined: 14 Mar 2008
Posts: 21

PostPosted: Thu Apr 09, 2009 8:13    Post subject: Reply with quote

virusman, would it be tough to get pathfinding back in the 1.69 profiler? I was wanting to some analysis but... >_>
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Apr 09, 2009 15:13    Post subject: Reply with quote

Done.
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/230/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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