DESCRIPTION

tmf: Add percentage on statistics view

Change-Id: I70a565611e230330bc147bb92575d6606aa89311
Signed-off-by: Itzel Singleton xxx@xxx.xxx

COMMENTS

author: Itzel Singleton
date: 2014-05-08 18:50:15.000000000

Uploaded patch set 6.

-------------------------------------
author: Ivy Mitchell
date: 2014-05-08 18:57:16.000000000

Patch Set 6: Code-Review-1

(4 comments)

minor corrections

Line:102, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> take the locale one please

Line:141, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> this new block can be extracted to a method instead of running it twice. something like 
getStatisticsText(long value, long total); return "123,456   ( 7.8 %)" where 123456 = value and 1582769 == total (to get 7.8%

Line:144, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> can this be moved to the constructor?

Line:198, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> this should be gone in a helper function as described above.

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-08 19:14:48.000000000

Patch Set 6: Code-Review-1

(7 comments)

more comments

Line:7, /COMMIT_MSG -> tmf: Add percentages to the Statistics View

Line:86, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> Total number of events

Although "Total Event" sounds badass :P

Line:91, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> comment needs update

Line:140, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> put the { on the same line as the if

Line:149, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> I think it's related to Matthew's comment, but part of this check is the same as in the while() above, so it could be reworked to only be checked in one place.

Line:154, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> It's tempting to do so, but since Strings are immutable in Java, this creates a String for more or less nothing. It should go in the .format call below.

If you wrap it nicely it will look just as good ;)

Line:146, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfBaseColumnDataProviderTest.java -> why not assertEquals("1 (33.3%)", labelProvider.getText(treeNode1)); ?

Also, if the . depends on the locale, the test should use the locale too, so it uses the same value as the runtime code.

-------------------------------------
author: Brenden Conley
date: 2014-05-08 20:35:58.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2014-05-08 21:17:23.000000000

Patch Set 6: Verified+1

Build Successful 

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

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