bckobayashimaru.de

Bridge Commander Kobayashi Maru Project
It is currently Tue Jun 25, 2019 4:11 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Analyzing Profile files
PostPosted: Thu Aug 03, 2006 7:24 am 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Since BCU is down atm, I'll post this one here:

Yesterday I wrote a quick dirty script to analyze the bc profiler files:

http://defiant.homedns.org/~erik/STBC/misc/analyze.py

Run it with
Code:
analyze profile_out.txt

and you will get a result like this:

Quote:
ConditionFacingToward.PeriodicCheck (571 counts) min/avg/max:
0.150578 0.187502 0.904864
ConditionIncomingTorps.PeriodicCheck (1679 counts) min/avg/max:
0.017321 0.889421 3.615823
TacticalControlWindow.Refresh (18 counts) min/avg/max:
0.010057 10.056508 40.952412
ConditionInPhaserFiringArc.PeriodicCheck (384 counts) min/avg/max:
0.017321 0.274892 1.396546
TorpedoRun, Setup Calcs (1772 counts) min/avg/max:
0.138286 0.430895 2.968254
TacticalControlWindow.RepositionUI (9 counts) min/avg/max:
1.000000 4.069512 8.076725
TacticalControlWindow.ResizeUI (9 counts) min/avg/max:
1.000000 3.635564 7.808814
EvadeTorps, numtorps (583 counts) min/avg/max:
1.000000 2.969125 4.000000
EvadeTorps, PickRandomVector (583 counts) min/avg/max:
0.026260 0.430623 1.283683
PowerDisplay.RefreshTimer (21 counts) min/avg/max:
0.055314 0.094159 0.354514
HelmMenuHandlers.CollisionAlertCheck (13 counts) min/avg/max:
0.118730 0.162569 0.449219
TorpedoRun::ActOnFuzzyResults (1772 counts) min/avg/max:
0.165105 0.265511 1.078349
ICO.AddShieldAngles (60 counts) min/avg/max:
0.060343 0.068212 0.312051

Now start to optimize the scripts.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:13 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
im a bit confused as to the purpose of this? Does it print out the conditions of your ship or something?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:14 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
its only for scripters.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:15 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
well i am learning to script in the BCS:TC... we've already done some scripts, and one was released on BCFiles (Engine Overload mod)

so please, enlighten me.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:17 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
start by reading this:
http://en.wikipedia.org/wiki/Profiler_% ... science%29

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:17 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
so its a way to track the program, see if it executes properly?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:37 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
no - it is about timing.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:42 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
ah so it will help clear memory usage and optimize speed... will it help BC be less of a memory hog?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:47 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
only speed, no memory

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 2:50 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
cool...


Last edited by Shinzon on Fri Aug 04, 2006 4:34 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 04, 2006 2:32 pm 
Offline
Ensign
Ensign
User avatar

Joined: Thu Oct 27, 2005 11:57 pm
Posts: 141
thanks defiant. if we want to add our own functions to be profiled do we just use the:


App.TGProfilingInfo_StartTiming('myprofilingfunctionname')

_________________
Image
Image
"there are only two types of pedestrians, the quick and the dead"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 04, 2006 6:01 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
kTiming = App.TGProfilingInfo("ExpFX, CreateNanoWeaponExpSeq")

- just an example.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group