View Single Post
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?