DESCRIPTION

tmf: Complete the statistics API

There were missing methods and fields in the statistics API to make it
logically complete.

Change-Id: I9d5078d1ed3f75e358c3b840cb1bf213d53caf6a
Signed-off-by: Simeon Moses xxx@xxx.xxx


COMMENTS

author: Ricky Reeves
date: 2012-08-23 21:40:06.000000000

Patch Set 1: Looks good to me, but someone else must approve; IP review completed



-------------------------------------
author: Braxton Mccarthy
date: 2012-08-23 22:32:42.000000000

Patch Set 1: Verified; I would prefer that you didn't submit this; IP review completed

(2 inline comments)



Line:295, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java -> What is the point of this? Isn't it the same thing as using

TmfStatisticsViewer globalViewer = new TmfStatisticsViewer();

at line 231?

If it's to deal with potential sub-classes overriding it, shouldn't the subclasses override createStatisticsViewers() instead?

Line:167, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java -> It's not part of this commit, but I'm wondering why getNormalPaths returns an array of arrays that ultimately only contains 1 string...

-------------------------------------
author: Ricky Reeves
date: 2012-08-24 12:42:10.000000000

Patch Set 1: (2 inline comments)



Line:295, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java -> createStatisticsViewer() also creates the trace specific viewers as per trace type extension point. So the user might not necessarily want to overwrite createStatisticsViewers().

What we could do is to have a method that creates the global viewer and returns it, getGlobalViewer() or createGlobalViewer() which can be overwritten. Then in createStatisticsViewer() would call this method and add a tab for it if not null.

Line:167, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java -> For the default, generic implementation you are right it only returns one. But there might be extension which have more entries in the array. Remember the legacy LTTng statistics which had multiple levels e.g. stats per CPU.

-------------------------------------
author: Braxton Mccarthy
date: 2012-08-24 18:54:53.000000000

Patch Set 1:

I like Meredith Scott's suggestion (have the extra method return the StatisticsViewer object directly, instead of the Class<>).

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