DESCRIPTION

tmf: Split the statistics in two separate providers

Use separate state providers and backends (and so, two separate .ht files)
to store the statistics information. This will make it easier to eventually
swtich the event-types provider to a partial history backend - two one-liners
basically (or do we say one two-liner?)

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


COMMENTS

author: Braxton Mccarthy
date: 2013-10-09 20:23:33.000000000

Uploaded patch set 12.

-------------------------------------
author: Brenden Conley
date: 2013-10-09 20:23:40.000000000

Patch Set 12:

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

-------------------------------------
author: Brenden Conley
date: 2013-10-09 21:08:57.000000000

Patch Set 12: Verified+1

Build Successful 

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

-------------------------------------
author: Kaeden Tapia
date: 2013-10-09 22:00:12.000000000

Patch Set 12: Code-Review-1

(10 comments)

Line:39, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Aren't both state histories full right now? Based on the constructor in this class...

Line:42, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Based on the code comments, it's not clear to me why it's split into two state histories. It could just be because of my limited knowledge of the statistics and the partial history so feel free to reply in Gerrit and not pollute the code with comments if it's too obvious ;)

Line:65, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> I don't think this needs to be public, does it?

Line:67, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Isn't it full right now? Based on the constructor in this class...

Line:69, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Same here.

Line:74, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Isn't it full right now? Based on the constructor in this class...

Line:197, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> What if one of them fails to build? i.e. waitUntilBuilt() returns false. Is that safe to ignore? It looks like it's changing the behavior.

Line:217, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Do we need to wait on both here or just totalsStats?

Line:448, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Should this return a boolean perhaps?

Line:55, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/StatsProviderEventTypes.java -> Shouldn't this version be bumped?

-------------------------------------
author: Braxton Mccarthy
date: 2013-10-16 17:12:05.000000000

Patch Set 12:

(6 comments)

Line:39, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Yeah, the initial change was to have "one full history and one partial history". But instead of being so inflexible, I changed it to "two separate histories". I probably forgot to update many of the references...

Line:42, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> In fact I should not talk about the "older" implementation at all... this should go in the commit message ;)

But basically, it's to be able to use separate backends for each provider. The long-term goal is to have a full history for the event totals (so the SWTChart histogram stays fast), and a partial history for the event types. That one is used to fill the Statistics view, and responsiveness is a bit less important there.

Line:65, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> It does, views access the state systems by using ITmfTrace#getStateSystems().get(ID), so they can get the ID from here.

Line:197, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> Normally they shouldn't fail to build ;)  But yeah good point, returning a bool and keeping the check is probably better.

Line:217, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStateStatistics.java -> True, we only need totals here.

Line:55, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/StatsProviderEventTypes.java -> The filename is different, so it would not clash with existing files. Although it's true there is no notion of filename in here, so it could be bumped for correctness' sake.

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