lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I'm trying to profile some Lua (plus C modules) code, and
luaprofiler seems attractive. I've run the profile log through
analyzer.lua and the summary seems unlikely.

I believe it has to do with the granularity of times() / clock().
Since clock_t == long and sysconf(_SC_CLK_TCK) returns
100, I understand that any function that takes less than 10
milliseconds will appear to have taken 0 milliseconds.

How about using something like gettimeofday ? I am sure
the luaprofiler developers have tried this and can give a
hint on whether it works or not.

Cheers,
Bogdan