[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Profiling Lua code
- From: Daniel Silverstone <dsilvers@...>
- Date: Fri, 20 Sep 2002 11:15:34 +0100
Hi,
a little while ago I decided that I needed to profile a rather large Lua
project I was working on, and me being me, I decided to write a simple
pure-lua profiler object, because the program was running all the time, but
it was easy to ask it to load extra lua code and run it.
I have placed the profiler here:
http://users.pepperfish.org/dsilvers/profiler.lua
(you can read the code nicely formatted here:)
http://users.pepperfish.org/dsilvers/profiler.lua.html
and a test program here
http://users.pepperfish.org/dsilvers/testprofiler.lua
Was I daft? Is there a much better way of doing this in pure lua? Did I
waste my time, is there a better one out there, or, is this useful, and
would people like me to continue to develop and refine it?
One note though: it was written for Lua 4.0 so at times it uses %blah type
upvalues -- as such it prolly won't work with the 5.0 alpha/beta stuff
Regards
Daniel
--
Daniel Silverstone http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org KeyId: 20687895
Another good night not to sleep in a eucalyptus tree.