fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
hpt has joined #systemtap
drsmith has joined #systemtap
drsmith is now known as drsmith_away
ton31337 has quit [Ping timeout: 252 seconds]
ton31337 has joined #systemtap
ananth has joined #systemtap
ravi_ has joined #systemtap
hchiramm has quit [Ping timeout: 265 seconds]
hchiramm has joined #systemtap
srikar_away is now known as srikar
hchiramm has quit [Ping timeout: 256 seconds]
srikar is now known as srikar_away
hchiramm has joined #systemtap
nkambo has joined #systemtap
hchiramm has quit [Ping timeout: 240 seconds]
hchiramm has joined #systemtap
hchiramm has quit [Ping timeout: 260 seconds]
hchiramm has joined #systemtap
hchiramm has quit [Read error: Connection reset by peer]
hchiramm has joined #systemtap
hpt has quit [Quit: leaving]
hpt has joined #systemtap
mjw has joined #systemtap
pwithnall has joined #systemtap
hpt has quit [Quit: Lost terminal]
<lzap> hello, I am trying this simple script but it gives me: invalid type stats: identifier 'stime' on line 13: https://gist.github.com/lzap/1516a4a42cf28e7cf37325a6e4a70e35
<lzap> why is that?
<lzap> my goal is to sum up all the itme spent in ruby methods
<lzap> please ignore all $VARIABLES it's actually from a shell heredoc (these are replaced with some variables)
scox has quit [Ping timeout: 252 seconds]
ananth has quit [Quit: Leaving]
<mjw> lzap, stime[tid()] produces a "stat" type which cannot be assigned to a stap variable.
ravi_ has quit [Remote host closed the connection]
<mjw> lzap, I should call it an aggregate instead of "stat". Which is the term the systemtap language reference guide calls it.
<mjw> This describes the operations you can perform on such aggregates: https://sourceware.org/systemtap/langref/Statistics_aggregates.html
nkambo has quit [Ping timeout: 260 seconds]
jistone has joined #systemtap
nkambo has joined #systemtap
hchiramm has quit [Ping timeout: 260 seconds]
wcohen has quit [Ping timeout: 258 seconds]
scox has joined #systemtap
ppetraki has joined #systemtap
<fche> hi lzap
<fche> on line 13/14 you mean instead if (tid() in stime)
<fche> or on line 6 stime[tid()] = t
<lzap> hey just like that?
<lzap> literarly this syntax?
<fche> yes
<lzap> is my understanding that tid is some kind of thread id ?
<lzap> (I basically got this from an example so little bit fuzzy for me)
<fche> it's a function that returns the integer thread it (linux kernel-level pid)
<lzap> doing trial and error approach :-)
<fche> no problem
<lzap> superb trying out, thanks for help! appreciated
<fche> probably worth changing both line 6 and 13/14 along the lines I suggested
drsmith_away is now known as drsmith
drsmith has left #systemtap [#systemtap]
<fche> lzap, working now?
<lzap> fche: ok it works kinda, I am trying to achieve "top"-like experience with list of methods which spent most time, but it's not sorted
<fche> line 24 (foreach) has the sorting construct hidden in the syntax
<fche> that - sign after elapsed
<fche> sorts in decreasing order of 'elapsed' (time) value
<lzap> ah
<lzap> yeah I need to read more on systemtap, not so sure about the <<< and @sum
<lzap> not sure if I designed this correctly
<fche> it should work fine
<lzap> hmmm why it's not sorted then?
<fche> it is sorted, just not how you expect
<fche> what would you like it to sort by ?
<lzap> total time spent
<lzap> like we have a method(s) that is doing some I/O waiting and I was wonderind which are these
<fche> try foreach ( ...... elapsed @sum - limit $PERPAGE )
<fche> note @sum inserted between elapsed and -
drsmith has joined #systemtap
<lzap> aaand it works!
<fche> SHIP IT HARD
<fche> SHIP IT SOON
<lzap> haha
<lzap> 2760 is the top method, can I assume these are miliseconds ?
<fche> that syntax is a bit funky - the best we could think of at the time - and the stap.1 man page doesn't spell out an example
<fche> those numbers are in whatever units you stored in it ... delta microseconds I guess
<lzap> yeah I find hard to learn the syntax, basically doing trial and error here
<fche> if you can think of some way for stap to give better messages or advice, please tell us
<lzap> I think its fine, I wrote several articles about Ruby "peeking" ^^^ I just love this way, Ruby performance (built-in) tools are not great this beats it by order of magnitude
<fche> I think of stap as a tool-building tool, for better or for worse
wcohen has joined #systemtap
mbenitez has joined #systemtap
<lzap> exactly, I wrote a tool that attaches to our Rails application and dumps some statistics about memory, method calls etc : https://github.com/lzap/foreman-tracer
<lzap> so users can easily send us reports when they see perf regressions
<lzap> it's a hacky I could do much better I guess but it works :-)
<lzap> memory is always a thing in Ruby and other GC runtimes :D
<fche> yup
<fche> one can forget all about them ... until something goes wrong
goncalo has joined #systemtap
pwithnall has quit [Ping timeout: 246 seconds]
<lzap> thanks a lot, thats a good starter, I can now fine tune this or do more clever time measuring!
<fche> enjoy
<fche> and let us know of neat results you get
<fche> or annoying problems
brolley has joined #systemtap
pwithnall has joined #systemtap
tromey has joined #systemtap
hchiramm has joined #systemtap
brolley has quit [*.net *.split]
White_Light has quit [*.net *.split]
jlebon has quit [*.net *.split]
lindi- has quit [*.net *.split]
pfallenop has quit [*.net *.split]
pfallenop has joined #systemtap
jlebon has joined #systemtap
White_Light has joined #systemtap
brolley has joined #systemtap
lindi- has joined #systemtap
tromey has quit [Ping timeout: 252 seconds]
hchiramm has quit [Remote host closed the connection]
hchiramm has joined #systemtap
tromey has joined #systemtap
p53ud0ny- has joined #systemtap
pwithnall has quit [Quit: pwithnall]
drsmith has left #systemtap [#systemtap]
drsmith has joined #systemtap
drsmith is now known as drsmith_away
fche has quit [Quit: Leaving]
fche has joined #systemtap
drsmith_away is now known as drsmith
wielaard has joined #systemtap
drsmith has left #systemtap [#systemtap]
drsmith has joined #systemtap
mjw has quit [Quit: Leaving]
wielaard is now known as mjw
ppetraki has quit [Quit: Ex-Chat]
scox has quit [Ping timeout: 258 seconds]
mbenitez has quit [Quit: Leaving]
wcohen has quit [Ping timeout: 256 seconds]
scox has joined #systemtap
drsmith has left #systemtap [#systemtap]
brolley has left #systemtap [#systemtap]
wcohen has joined #systemtap
tromey has quit [Quit: ERC (IRC client for Emacs 25.1.90.1)]
hchiramm has quit [Ping timeout: 268 seconds]
hchiramm has joined #systemtap