Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: matthew.khouzam@ericsson.com (Matthew Khouzam)
Subject: [lttng-dev] Reading live traces in eclipse
Date: Fri, 21 Feb 2014 15:23:12 -0500	[thread overview]
Message-ID: <5307B5B0.8010208@ericsson.com> (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.



                 reply	other threads:[~2014-02-21 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5307B5B0.8010208@ericsson.com \
    --to=matthew.khouzam@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox