DESCRIPTION

tmf: Use tabs in statistics view for each traces

When an experiment/trace is selected, the statistics view creates a
global viewer and a specific viewer for each trace contained in the
experiment. These viewers are placed in tabs and shown in the
statistics view. Also, a factory is now used to create a viewer based
on his definition in the plug-in.xml from the trace type. An
extension point has been added to provide custom statistics viewer.

Signed-off-by: Simeon Moses xxx@xxx.xxx

Change-Id: I8d380e8c28cba855b5361069200e50ab0cbca7f3


COMMENTS

author: Simeon Moses
date: 2012-08-02 00:38:41.000000000

Uploaded patch set 3.

-------------------------------------
author: Ricky Reeves
date: 2012-08-02 19:15:19.000000000

Patch Set 3: Fails; I would prefer that you didn't submit this

(4 inline comments)

1) There is a bug in TmfViewerFactory. See comment.
2) I would create a default viewer if a trace doesn't have custom viewer defined in the for the trace type. We would have redundant information.
3) The trace specific stats uses the trace a data provider. This makes it overall slow because experiment and trace compete of file access. Additionally, Some trace types won't support reading trace from experiment and trace simultaneously (e.g. see LTTng legacy). This is a more general problem and needs to be addressed and maybe it's out of scope of your change. What you could do is to send each request using the current experiment event if we only want to read a trace. If you do that you need to filter out the events in handleData() that are not for the current trace.See HistoryBuilder class for how the state system implementation is doing it.

Line:14, /COMMIT_MSG -> You didn't add a new extension point. You updated the existing extension point for the trace type and its element statisticsViewType'.

Line:57, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java -> Fields that sub-classes might want to update should be either protected or have protected setters (protected methods), for example fStatisticsData.

Line:59, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/TmfViewerFactory.java -> The line below causes an Exception (org.eclipse.core.runtime.CoreException: Executable extension definition for "statisticsViewerType" not found.)

You have to pass the attribute name which is "class". For that you can use the constant TmfTraceType.CLASS_ATTR.

Line:482, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java -> If there is no TmfStatisticsViewer defined for the trace type we shouldn't create a default TmfStatisticsViewer because there will be redundant information in the global stats and trace specific stats.

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