DESCRIPTION

tmf: Beautify TmfExperimentContext's API

Instead of exposing arrays and letting callers change the arrays as
they please, provider getter and setter methods for each operation.

Change-Id: Ideb685697925d3fc8f0c7ba086be29af276c7d1e
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-03-28 22:14:10.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-03-29 00:59:55.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-03-29 01:44:57.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6149/ : SUCCESS

-------------------------------------
author: Annalise Jimenez
date: 2014-03-31 14:30:35.000000000

Patch Set 1: Code-Review-1

(2 comments)

Good idea to redo this API.

But I have some questions. 

Also check with Matthew, he told me he had made some great performance improvement to how experiments deal with many many traces, to make sure this patch is compatible with what he's doing.

Line:122, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> Is it really wise to use a traceIndex as a key? What if a trace is added, deleted or if the way of dealing with experiment's traces changes (like how they are indexed for instance, I think Matthew has been working on some performance improvement there).

Line:135, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> I know it replaces a method that was named getEvents, but wouldn't it be clearer to name it getEventFromTrace()?

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-31 14:57:49.000000000

Patch Set 1:

(2 comments)

Line:122, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> > Is it really wise to use a traceIndex as a key?

I don't think so ;)

But currently TmfExperiment handles everything by index (used to be an array index, with this patch a List index). Changing that would require a more major refactoring. I'd say a Map<ITmfTrace, ITmfContext> would be cleaner, however there might some performance advantages in using a straight index. We'd have to test it.

Line:135, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java -> Well, the events necessarily come from a trace ;)  But I don't mind either way.

-------------------------------------
author: Annalise Jimenez
date: 2014-03-31 17:47:44.000000000

Patch Set 1: Code-Review+1

Fair enough, I'll remove my -1, but still check with Matthew to see if anything will change soon about the index, or at least make sure he knows about it.

-------------------------------------
author: Ivy Mitchell
date: 2014-03-31 19:43:27.000000000

Patch Set 1:

Let's work on fixing up the priority queue patch instead? no -1 and no +1.

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-31 22:25:33.000000000

Patch Set 1:

My experience with holding off cosmetic patches because of "a big change coming" is that the big change usually ends up delayed so much (which is normal, it's a big change) or canned altogether, and the small patch rots out when it could have been useful.

The priority queue stuff is very promising, but it's still at the prototype level, it's realistically a couple weeks away. 

If you're absolutely against this change I won't merge it, but it's quite simple ([i] becomes get(i)/set(i,x)) and should be easy to rebase through.

-------------------------------------
author: Annalise Jimenez
date: 2014-04-01 13:08:02.000000000

Patch Set 1:

I don't mind, if you think Matthew's is such a big change. But I thought it would go in pretty quick... I'll give him the final word though.

-------------------------------------
author: Ivy Mitchell
date: 2014-04-04 13:54:44.000000000

Patch Set 1: Verified+1 Code-Review+1 IP-Clean+1

Looks good to me.

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-04 15:19:19.000000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2014-04-04 15:19:20.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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