DESCRIPTION

[wip] tmf: make experiment getNext() O(log(n)) insteadof O(n)

Now using a priority queue.

Change-Id: I674b48aa5ce9f3ab76d8bbd8bc8dcf874939eafd
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-03-31 17:47:24.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-03-31 17:47:29.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6157/

-------------------------------------
author: Ivy Mitchell
date: 2014-03-31 17:48:11.000000000

Patch Set 1:

this patch breaks the api and fails unit tests, but gives an O(log(n) performance boost.

-------------------------------------
author: Brenden Conley
date: 2014-03-31 17:54:00.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6157/ : FAILURE

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-31 18:25:23.000000000

Patch Set 1: Code-Review-1

(2 comments)

Some quick comment, but using a PriorityQueue definitely seems like the way to go.

Line:55, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> You should instead implement a Comparator, and use the constructor PriorityQueue(capacity, Comparator). It would save a bunch of code. The only interesting method here is the compareTo(). Java 8 lambdas would make this even more compact ;)

Line:246, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> !

-------------------------------------
author: Ivy Mitchell
date: 2014-03-31 19:16:29.000000000

Patch Set 1:

(1 comment)

I don't get the ! comment. If the priority queue is empty, return null, no?

Line:246, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> ?

-------------------------------------
author: Ivy Mitchell
date: 2014-03-31 19:18:40.000000000

Patch Set 1:

(1 comment)

Line:246, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> whitespace.

-------------------------------------
author: Annalise Jimenez
date: 2014-03-31 20:27:45.000000000

Patch Set 1:

(6 comments)

Nice approach! Looks much more efficient this way.

Some more quick comments

Line:55, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> I know private classes don't need javadoc, but it would definitely help the reader ;-)

Also, as Alex didn't say yet, you could xxx@xxx.xxx to fTrace and fContext.

Line:258, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> The one from which you last read? The one from which you will read next?

Line:267, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> Same as above, "current" trace id means?

Line:285, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> idem, define "current"

Line:363, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java -> ugly multiline comment

Line:663, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java -> re-format this comment

-------------------------------------
author: Ivy Mitchell
date: 2014-04-24 22:46:09.000000000

Topic set to Tmf experiment performance

-------------------------------------
author: Ivy Mitchell
date: 2014-08-11 17:49:50.000000000

Abandoned

later, later is good

-------------------------------------
