DESCRIPTION

TMF: Add an API to query analyses to obtain their requirements

Change-Id: I764291e0ca5281550a16d61a9aa8dbf5ca05d390
Signed-off-by: Keshawn Lopez xxx@xxx.xxx
Signed-off-by: Bailey Galloway xxx@xxx.xxx


COMMENTS

author: Keshawn Lopez
date: 2014-04-04 15:26:30.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2014-04-04 15:26:35.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2014-04-04 16:03:25.000000000

Patch Set 7: Verified+1

Build Successful 

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

-------------------------------------
author: Annalise Jimenez
date: 2014-04-04 17:29:32.000000000

Patch Set 7:

(7 comments)

Some comments, nothing major here.

Maybe add a TODO in TmfAnalysisRequirement. We should be able to have requirements composed of other requirements, for instance, an eventual UST, LTTng Kernel experiment may requirement 2 sets of requirement: domain->kernel, events->{ ... } and another one domain -> ust, events -> {...}

But that is not the scope of this project, but it will inform the other developers of what still needs to be done.

Line:121, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/module/TmfAnalysisModuleHelperXml.java -> As was recently pointed out to me, there exists Collections.EMPTY_LIST for such known-to-be-empty-forever lists. But there is no obligation to use that, just for your information.

Line:29, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> possible event -> possible events

Line:87, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> As mentioned before add note saying that which requirement is merged into the other is important.

Line:199, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Is the ordering important in the values? If not, you might as well return a Set directly, that would avoid the need to instantiate an arrayList.

Line:17, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/IAnalysisRequirementProvider.java -> to define his -> to define its

Line:42, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> static final fields should be ALL_CAPS_LIKE_THIS.

Sorry I didn't mention it earlier.

Line:162, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Seeing this, I conclude that the order of the merge is important, so fRequirement.merge(fSubRequirement) != fSubRequirement.merge(fRequirement) ?

I am not 100% sure I'm for this, or against for that matter. Maybe add a note in the merge javadoc explaining this explicitly, so that we know about this "feature" when we use the method.

-------------------------------------
author: Ivy Mitchell
date: 2014-04-04 19:13:21.000000000

Patch Set 7:

(2 comments)

Line:51, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> this needs re-working, I don't know what to suggest but the name is not clear.

Line:199, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> if the ordering is important use a linkedhashmap

-------------------------------------
author: Ivy Mitchell
date: 2014-04-04 19:13:36.000000000

Patch Set 7: Code-Review-1

-------------------------------------
author: Ivy Mitchell
date: 2014-04-04 20:19:27.000000000

Patch Set 7:

(6 comments)

threadsafeness warnings and information's plural is information.

Line:44, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> LinkedHashMap if the order is important

Line:158, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> if you want this to be thread-safe, synchronize on fValues. So

synchronized(fValues){ fValues.put(value, level) ; }

Line:199, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> if you want to make this threadsafe synchronize this copy on fValues. 

synchronized(fValues){return new ArrayList<>(fValues.keySet());}

Line:207, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> no s please

Line:208, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> information

Line:219, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> threadsafeness warning here.

-------------------------------------
author: Bailey Galloway
date: 2014-04-07 04:19:31.000000000

Patch Set 7:

(1 comment)

Line:51, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> It's a level defining how important/necessary is a value to the requirement. How about ValuePriorityLevel or RequirementValuePriorityLevel?

-------------------------------------
author: Ivy Mitchell
date: 2014-04-08 16:24:04.000000000

Patch Set 7:

(1 comment)

Line:51, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> +1 on ValuePriorityLevel

-------------------------------------
author: Annalise Jimenez
date: 2014-04-08 19:24:17.000000000

Patch Set 7: Code-Review-1

(1 comment)

Since this one is the first patch of which all others depend, if you could correct it first, we'll work with it and once it is in, we can review the rest in parallel

Line:51, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Idem and you can omit AnalysisRequirement since most of the time they'll be called with TmfAnalysisRequirement.ValuePriorityLevel. It would get a bit redundant otherwise.

-------------------------------------
author: Keshawn Lopez
date: 2014-04-13 23:36:41.000000000

Patch Set 7:

(4 comments)

Line:121, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/module/TmfAnalysisModuleHelperXml.java -> That's good to know.

Line:51, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> True.

Line:207, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> True.

Line:42, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Done

-------------------------------------
author: Ivy Mitchell
date: 2014-04-14 14:58:58.000000000

Patch Set 7:

(1 comment)

comment

Line:42, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Wow!!! I think genevieve meant TYPE_A = "Type A";

-------------------------------------
author: Bailey Galloway
date: 2014-04-14 16:23:19.000000000

Patch Set 7:

(1 comment)

Line:42, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Big misinterpretation!

-------------------------------------
author: Ivy Mitchell
date: 2014-04-14 17:26:39.000000000

Patch Set 7:

reply

-------------------------------------
author: Keshawn Lopez
date: 2014-04-14 23:43:53.000000000

Patch Set 7:

(1 comment)

Line:42, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Big misinterpretation indeed. Especially considering that I usually do it like she suggested...

Palm meet face.

-------------------------------------
author: Gerrit Code Review
date: 2014-04-15 22:10:24.000000000

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

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

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