DESCRIPTION

tmf: Add a waitForInitialization() to TmfStatisticsModule

Similar to the method in TmfStateSystemAnalysisModule.

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


COMMENTS

author: Ivy Mitchell
date: 2014-01-31 21:42:08.000000000

Patch Set 1:

(1 comment)

Line:77, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> Do we want a timeout on this? Asking the question not being negative.

-------------------------------------
author: Brenden Conley
date: 2014-01-31 22:12:48.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-31 23:01:22.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-03 18:15:00.000000000

Patch Set 1:

(1 comment)

Line:77, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> I don't think it's needed. The "initialization" phase is usually very short. Instantiate objects, send queries, that kind of stuff. This is just to make sure we have something to wait on before we can call the other components (in this case, getStatistics()) withtout getting NPEs.

For the waitForCompletion(), that one we're adding timeout parameters, because that phase is arbitrarily long.

-------------------------------------
author: Luciana Barry
date: 2014-02-03 19:52:13.000000000

Patch Set 1:

(3 comments)

Line:77, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> I think waitForInitialization() could also be arbitrarily long, if some analysis module is not automatically triggered. We also can't control what another module does in executeAnalysis(). But I think it's OK to wait as long as it takes. We have timeout in waitForCompletion() because we want to see partial progress, not because we can't wait no more. I'd simply suggest that one shouldn't be calling waitForInitialization() in the UI thread.

Line:125, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> Typo or twill, the woven fabric?

Line:126, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> analyses

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-03 20:25:59.000000000

Patch Set 1:

(3 comments)

Line:77, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> True, it should be long *when it's actually started*, and we don't know when the execute() actually runs.

But as you mention, we won't normally do queries at regular intervals while it's being *initialized*, so we don't have a need for a timeout here.

Line:125, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> I think it's missing a couple backspaces here ;)

Line:126, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> Both are technically correct, analyses is British/Candian English, and analyzes is American English. And we kind of never settled one of or the other (e.g. initialisation vs initialization). Can we set that as project settings? ;)

-------------------------------------
author: Luciana Barry
date: 2014-02-05 16:02:37.000000000

Patch Set 1:

(1 comment)

Line:126, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsModule.java -> That is true for the third person verb, but I believe there is only one acceptable spelling for the plural of the noun analysis.

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