DESCRIPTION

fix #428919: Support multi-trace histograms

When displaying a multi-trace experiment, colorize the histograms,
in order to know the origin of the events.

Change-Id: I9436a4b8d08250e41b7e68a46757b85a9797d658
Signed-off-by: Bryce Kline xxx@xxx.xxx


COMMENTS

author: Bryce Kline
date: 2014-02-28 11:05:08.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-02-28 11:05:13.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-02-28 11:28:51.000000000

Patch Set 2: Verified-1

Build Failed 

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

-------------------------------------
author: Brenden Conley
date: 2014-02-28 11:58:44.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-02-28 12:12:20.000000000

Patch Set 2: Verified-1

Build Failed 

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

-------------------------------------
author: Ricky Reeves
date: 2014-02-28 18:11:34.000000000

Patch Set 2:

Hi Xavier,

we currently investigate the reason for the build failure. We'll let you know when it is resolved.

Meredith Scott

-------------------------------------
author: Brenden Conley
date: 2014-03-01 19:05:47.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-03-01 19:41:19.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-03-03 20:57:51.000000000

Patch Set 2: Code-Review-1

(13 comments)

There is a problem with the legend. It is shown even if the number of traces are more than 23. Maybe the data model should be initialized with the traces objects from the HistogramView instead from the HistogramRequest.

Line:475, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/Utils.java -> This change is unrelated to the histogram update and shoudn't be part of this patch.

Line:91, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java -> While thinking about the initialization problem, I wonder if this logic shouldn't be part of the HistogramDataModel and in the request we just pass the origin trace when calling countEvent() below:

fHistogram.countEvent(getNbRead(), timestamp, event.getTrace());

Line:93, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java -> setTraces() should be done not in the request. The HistogramView needs to take care of that.

Line:240, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> data model instead of model

Line:244, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> Here I think we should pass the trace (== experiment)  and prepare the data model for multiple traces. The code from the HistogramRequest for handling multiple traces can be moved into this class. By doing that the logic is encapsulated in the data model.

Line:249, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> data model instead of datamdoel

Line:525, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java -> This needs to be done in traceSelected() below too. Maybe it's better to do it in initalizeHistogram() instead.

Line:770, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java -> When updateLegendArea() is called from initializeHistogram() after trace opened or trace selected signal, the HistogramDataModel of the fullTraceHistogram is not initialized with the trace array yet.  The initialization is done in the HistogramRequest. Therefore fFullTraceHistogram.showTraces() is always true at that point event if the experiment has more than 23 traces in it. Therefore the legend is always displayed.

If I think about more, the HistogramDataModel.setTraces() call shouldn't be done in the request.

Line:18, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramBucket.java -> xxx@xxx.xxx 3.0

Line:170, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramBucket.java -> remove empty lines

Line:198, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphScale.java -> This change is unrelated to the histogram update and shoudn't be part of this patch.

Line:228, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java -> I would prefer name fShowTraces to keep coding style

Line:437, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java xxx@xxx.xxx 3.0 missing here.

-------------------------------------
author: Bryce Kline
date: 2014-03-04 09:04:57.000000000

Patch Set 2:

(13 comments)

Uploaded patch 3.
See my answers to your comments below.

Line:475, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/Utils.java -> Oups! sorry...
Done

Line:91, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java -> Done

Line:93, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java -> Done

Line:240, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> Done

Line:244, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> Done

Line:249, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java -> Done

Line:525, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java -> Done

Line:770, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java -> Done

Line:18, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramBucket.java -> Done

Line:170, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramBucket.java -> Done

Line:198, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphScale.java -> Oups! Sorry... Done

Line:228, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java -> Really?
This variable is static. I copied style from HistogramScaledData#hideLostEvents

Line:437, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2014-03-05 09:35:37.000000000

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

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

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