[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: profiling embedded lua
- From: Oskar Forsslund <matrixsmurfen@...>
- Date: Tue, 11 Oct 2011 09:06:03 +0200
C:\Program Files (x86)\Lua\trace\lua>lua test\accumulate.lua
luatrace: tracing with C hook
wait a
wait b
wait a
wait b
wait a
wait b
C:\Program Files (x86)\Lua\trace\lua>luatrace.profile
C:\Program Files (x86)\Lua\trace\lua>lua -e "require('luatrace.profile').go()"
Total time 1215.33 microseconds
Times in microseconds
Top 20 lines by total time
File:line Hits Total Self Child | Line
test\accumulate.lua:26 1 1215.00 1.33 1213.67 | a(6)
test\accumulate.lua:12 3 864.00 722.00 142.00 | print("wait a")
test\accumulate.lua:14 2 783.00 0.67 782.33 | return b(i-1)
test\accumulate.lua:20 3 581.00 1.00 580.00 | if i > 1 then
test\accumulate.lua:19 3 489.33 489.33 0.00 | print("wait b")
test\accumulate.lua:13 1 0.33 0.33 0.00 | if i > 1 then
test\accumulate.lua:23 1 0.33 0.33 0.00 | end
test\accumulate.lua:27 1 0.33 0.33 0.00 | luatrace.troff()
Top 20 functions by self time
File:lines Hits Total Self Child | Line
test\accumulate.lua:11-16 3 1213.67 723.00 490.67 | function a(i)
test\accumulate.lua:18-23 3 782.67 490.67 292.00 | function b(i)
test\accumulate.lua:0-0 1 1.67 1.67 0.00 | -
.\luatrace.lua:349-355 1 0.00 0.00 0.00 | -
C:\Program Files (x86)\Lua\trace\lua>
On Mon, Oct 10, 2011 at 9:51 PM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
On 10/10/2011, at 10:16 PM, steve donovan wrote:
> On Mon, Oct 10, 2011 at 11:00 AM, Oskar Forsslund
> <
matrixsmurfen@googlemail.com> wrote:
>> If I rewrite the command in luatrace.profile.bat from
>> lua -e 'require("luatrace.profile").go()'
>> to
>> lua -e "require('luatrace.profile').go()"
>> everything works fine.
>
> Yes, that's how it must be with Windows, where double-quote is always
> used for command-line arguments.
Changed.
On 10/10/2011, at 10:38 PM, Oskar Forsslund wrote:
> I get an error using the luatrace library from my code
>
> In my script file scriptfuncs.lua I have luatrace = require"luatrace" at the top
>
> In C++ I do the following:
> ...
Before you try this, have you just tried running it from Lua?
git pull, then cd to the lua directory of luatrace and
lua test/accumulate.lua
../sh/luatrace.profile
and see if that works.
- References:
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, steve donovan
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, steve donovan
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, steve donovan
- Re: profiling embedded lua, Oskar Forsslund
- RE: profiling embedded lua, Thomas Buergel
- Re: profiling embedded lua, Geoff Leyland
- Re: profiling embedded lua, Sean Conner
- Re: profiling embedded lua, Luiz Henrique de Figueiredo
- Re: profiling embedded lua, Geoff Leyland
- Re: profiling embedded lua, Elias Barrionovo
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, Geoff Leyland
- Re: profiling embedded lua, Oskar Forsslund
- Re: profiling embedded lua, steve donovan
- Re: profiling embedded lua, Geoff Leyland