WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Lua code profiler wishes? (https://www.wowinterface.com/forums/showthread.php?t=1157)

Littlejohn 07-01-05 09:04 PM

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?

Littlejohn 07-02-05 12:58 PM

(Was this moved? Sorry if I posted in the wrong place. Script request forum is only for players, not requests from mod authors?)

Cairenn 07-02-05 01:03 PM

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. :)

Littlejohn 07-02-05 01:26 PM

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 :)

Cairenn 07-02-05 01:28 PM

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. :)

Littlejohn 07-05-05 04:31 PM

I've finished up the next version of my Lua code profiler. First paragraph from the web page:

Quote:

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!

Cairenn 07-05-05 04:34 PM

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.

Littlejohn 07-05-05 04:50 PM

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?

Cairenn 07-05-05 04:55 PM

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.

Littlejohn 07-05-05 05:34 PM

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?!)

Cairenn 07-05-05 05:34 PM

Approved:

http://www.wowinterface.com/download...fo.php?id=4053

Cairenn 07-05-05 05:36 PM

Quote:

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 ...

Littlejohn 07-05-05 05:40 PM

New post in General Authoring? or somewhere else?

BTW, the upload system is really nice.

Cairenn 07-05-05 05:43 PM

Glad you like it. :)
Is this "finished" or beta?

Littlejohn 07-05-05 05:45 PM

It "works" and I've fixed the "known" bugs so it must be "finished". :)

Cairenn 07-05-05 05:49 PM

Released Interfaces forum then. :)

Changed my mind. New forum available ...

Cairenn 07-05-05 10:14 PM

"Released" thread here.


All times are GMT -6. The time now is 07:19 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI