Thread Tools Display Modes
07-01-05, 09:04 PM   #1
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
Lua code profiler wishes?

I wrote an event counter that I'm turning into a general purpose code profiler. It's a simple mod that hooks functions matching a pattern and keeps stats on how many times (and times/sec) they've been called.

Anybody have any wishes for profiling Lua code?

Most Lua code runs fast, but often. This makes them hard to time because the resolution of GetTime isn't quite good enough to measure one call. I've noticed that most code is side-effect free and can be called repeatedly. I was thinking about adding an option to have the profiling hook call a function repeatedly to get better accuracy. Can anybody think of a better solution to the timer accuracy problem?
 
07-02-05, 12:58 PM   #2
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
(Was this moved? Sorry if I posted in the wrong place. Script request forum is only for players, not requests from mod authors?)
 
07-02-05, 01:03 PM   #3
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Aye I moved it. I thought it would be more appropriate in this area of the boards, since this is where folks dealing with actual code hang out more.

It is entirely possible that I misunderstood the general direction of your thread, and shouldn't have moved it. I can move it back if you would prefer.

Last edited by Cairenn : 07-02-05 at 01:13 PM.
 
07-02-05, 01:26 PM   #4
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
I'm too new; I trust you.

Was just hoping to get some ideas from people who are trying to performance tune their code. (WoW's scripting features are amazing, but no development tools? It's a niche I hope to carve out in the mod world
 
07-02-05, 01:28 PM   #5
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Okay, so I didn't misunderstand. Yeah, this is definitely *developer*, not random_end_user_01. Which is not an insult to random_end_user_01, it's just saying that they aren't gonna care about this, whereas dev's will.
 
07-05-05, 04:31 PM   #6
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
I've finished up the next version of my Lua code profiler. First paragraph from the web page:

TraceEvent collects function call counts, calls/second, peak calls/second and average per-call memory usage of Lua global functions. The previous release was designed to trace all OnEvent functions, but v1.2 allows you to specify functions by name or pattern.
If people could play with it a bit and give me feedback, I'd really appreciate it. Parts of the UI are a little clunky, but it's still fun to play with. (Or maybe I'm just hopelessly weird.)

If anybody has downloaded Blizzard's UI customization kit, my mod can help you find the stuff you want. Trace "^%a+_" and then watch the functions as you do stuff. For example, if you want to customize mail, reset the trace stats, open a mailbox, then sort the trace stats. The top functions listed will be related to mail. (Sometimes you have to stop tracing some "noisy" code like ActionButtons in order to find the good stuff.)

http://www.vulpes.com/TraceEvent/

Thanks!
 
07-05-05, 04:34 PM   #7
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
LittleJohn, could I ask you to please upload it to our site, instead? We don't like links to external downloads, as we can't guarantee the safety of them. Most folks wouldn't do anything wrong, but unfortunately ....

So, for the protection of everyone involved (users, the site, yourself), we prefer that the program/mod/whatever actually reside on the site, so that we may verify that there isn't anything malicious in it.
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
 
07-05-05, 04:50 PM   #8
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
Ok, I'm sure it's really easy, but in the 37 seconds I had before going to eat I couldn't figure it out... Can I keep the link to my web page? Or do you want to host that too?
 
07-05-05, 04:55 PM   #9
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
You can keep it if you wish. As for uploading, go to the downloads section, go to Dev Tools (since that's the applicable category in this case), at the top and bottom of the listing are buttons for uploading and the forums ... I think you can guess which to use.

Path to your zip file
Attach a picture
Add a description, remember to put a link to this thread, and hit submit.

Thank you for understanding. We aren't trying to be unreasonable, we just need to make sure that we protect everyone, you included.
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
 
07-05-05, 05:34 PM   #10
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
Ok. Yeah, that was easy. I'm sure if I had maybe 39 seconds I could have done it...

So how often do you all approve uploads? (Do you actually fire up WoW and test them?!)
 
07-05-05, 05:34 PM   #11
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Approved:

http://www.wowinterface.com/download...fo.php?id=4053
 
07-05-05, 05:36 PM   #12
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Originally Posted by Littlejohn
So how often do you all approve uploads? (Do you actually fire up WoW and test them?!)
As soon as they hit the moderation queue. Whether we fire up the game, or anything else, depends on what there is in the file.

You should start a new thread for this, since you've got an actual working program for folks to use now ...
 
07-05-05, 05:40 PM   #13
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
New post in General Authoring? or somewhere else?

BTW, the upload system is really nice.
 
07-05-05, 05:43 PM   #14
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Glad you like it.
Is this "finished" or beta?
 
07-05-05, 05:45 PM   #15
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
It "works" and I've fixed the "known" bugs so it must be "finished".
 
07-05-05, 05:49 PM   #16
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Released Interfaces forum then.

Changed my mind. New forum available ...

Last edited by Cairenn : 07-05-05 at 05:54 PM.
 
07-05-05, 10:14 PM   #17
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
"Released" thread here.
 

WoWInterface » Developer Discussions » General Authoring Discussion » Lua code profiler wishes?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off