.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Question on code profiling (http://forums.bots-united.com/showthread.php?t=426)

cruft 20-01-2004 07:50

Question on code profiling
 
So what do you guys use to profile your code? Something open source or off the shelf? Rolled your own?

Just curious about other people's personal experience and what has worked for them.

Pierre-Marie Baty 20-01-2004 08:47

Re: Question on code profiling
 
What do I use to profile my code ?
my nose :D

Seriously, I don't profile at all. That's a bad habit I know, but I never managed to understand how it worked with MSVC and I'm too lazy -or perhaps too many other things to do- to figure it out :)

Aspirin has written a REALLY KICKASS profiler class for his JoeBot XP, he sent it to me once ago but I don't know if he considers it open source or not and I'm not sure he would authorize me to post it here... better ask him :) But wait, when I mean really kickass, it's really WHIPPING!! :)

botman 20-01-2004 14:40

Re: Question on code profiling
 
The Half-Life SDK comes with a "Profile" build option, but I've never managed to get it to work properly. Other people on the Wavelength forum have reported to have gotten the profile build to run and generate profile information, so you might try posting a message in the Coders forum on thewavelength.net

botman

@$3.1415rin 20-01-2004 18:47

Re: Question on code profiling
 
4 Attachment(s)
no problem with publishing that code ... although there is no nice doc yet

last weekend I worked on gcc compatability, therefore some stuff isnt funny debugged yet, especially CTime::CPUSpeed::getCyclesDifference.
Recording maximum and minimum cpu usage was once a feature but I had to remove it due to restructuring the code ... maybe that's something for the next weekend after the exams :P

this code has only be tested on a p4 2.66 and a Athlon1Ghz.

and pierre, I think the nose is the best method to profile, although you can use the debugger sometimes as a debugger, that's interesting too :)

Pierre-Marie Baty 20-01-2004 21:44

Re: Question on code profiling
 
Joe, you should attach a screenshot of how this profiler looks like in the game... :)

@$3.1415rin 20-01-2004 22:42

Re: Question on code profiling
 
ok, this is how it currently looks like ... I really gotta readd that maximum and minimum stuff again :)
http://joebot.bots-united.com/images...p/profiler.jpg

The first line shows where we are in the tree and what's the current percentage of the stuff that is shown ... all % values below are then relative to this. Below we can see which functions are called. if a + is in front of it, we can go there with the cursor and browse deeper to the tree ... ( the cursor is the ------- line )

koraX 21-01-2004 08:58

Re: Question on code profiling
 
uhm what is profiler ?

botman 21-01-2004 15:20

Re: Question on code profiling
 
A profiler tells you how much CPU time is being spent inside each function so you can re-write all the code that's really slow to make things run faster.

botman

@$3.1415rin 29-03-2004 18:58

Re: Question on code profiling
 
I updated the Profiler.cpp and .h a little, now you'll also be shown a factor how much lower the minimum/maximum timespan spent there was.

@$3.1415rin 30-03-2004 13:35

Re: Question on code profiling
 
currently writing some little file output functions ... doesnt even produce significant lags on my old pc here - celeron 466 :)

here a preview ( it's the data from one round CS ) : http://joebot.bots-united.org/joebotxp/test.html


All times are GMT +2. The time now is 16:54.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.