Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Reading live traces in eclipse
@ 2014-02-21 20:23 Matthew Khouzam
  0 siblings, 0 replies; only message in thread
From: Matthew Khouzam @ 2014-02-21 20:23 UTC (permalink / raw)


Hi All,
I figured I would give a status update to what's going on in eclipe wrt
live trace reading.

We currently had a little push to get it up and running, here is the
result:

Reading CTF while it's live: should work 100%
    reading TSDL fragments and updating the trace: done
    reading streams while they grow: done
    reading streams as they arrive: done

Reading the state system while it's being written: should work 100%
    reading a state system before it's closed: done
    views updating before the state system is closed: done

Connecting to the relayd: prototype is done (github)
    connecting to the relayd: done
    requesting more of the trace: done

Gluing the whole thing together... still needs to be done

For now, if you wish to read live traces for now here's what you can do:

before:

CTFTrace trace = new CTFTrace(tracefile);
CTFTraceReader reader = new CTFTraceReader(trace);
while (reader.advance()) {
    // event stuff goes here
    reader.getCurrentEventDef();
}

Now with live support:

CTFTrace trace = new CTFTrace(tracefile);
CTFTraceReader reader = new CTFTraceReader(trace);
reader.setLive(true);
while (reader.advance() && !reader.isLive()) {
    while (reader.getCurrentEventDef()!= null) {
        Thread.sleep();
        reader.advance();
    }
    // event stuff goes here
    reader.getCurrentEventDef();
}

// probably won't happen that often compared to growing streams
handler hasMoreMetadata(String data){
    Metadata md = new Metadata(trace);
    md.parseTextFragment(data); 
}

// probably won't happen that often compared to growing streams
handler hasMoreStreams(File f) {
    trace.addStreamFile(f);
}


All of this extra work will be internally handled by TMF.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-21 20:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 20:23 [lttng-dev] Reading live traces in eclipse Matthew Khouzam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox