summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathieu Denis2012-08-22 11:47:36 (EDT)
committer Alexandre Montplaisir2012-08-23 13:22:25 (EDT)
commit670aa6a8f01b0693cacd6b375dcde6ec0de663db (patch)
tree1d36ff4e6ec5930369eae14a7e115163370d99bc
parent2de8425ebdc38d6d268b6b84ad44a272e7e1f490 (diff)
downloadorg.eclipse.linuxtools-670aa6a8f01b0693cacd6b375dcde6ec0de663db.zip
org.eclipse.linuxtools-670aa6a8f01b0693cacd6b375dcde6ec0de663db.tar.gz
org.eclipse.linuxtools-670aa6a8f01b0693cacd6b375dcde6ec0de663db.tar.bz2
tmf: some updates to the statistics
- Changes the statistics node reset behavior to avoid useless operations; - Removes unused messages; - Updates some javadoc; Change-Id: I5af35217a711cdce06807929c4621dfb88cd2fa1 Signed-off-by: Mathieu Denis <mathieu.denis@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/7333 Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Reviewed-by: Bernd Hufmann <bhufmann@gmail.com> IP-Clean: Bernd Hufmann <bhufmann@gmail.com> Tested-by: Bernd Hufmann <bhufmann@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java1
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java7
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java2
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java2
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java2
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java5
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java4
7 files changed, 8 insertions, 15 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java
index ec09c92..36bac58 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java
@@ -67,7 +67,6 @@ public class TmfStatisticsRequest extends TmfEventRequest {
fLastEventIndex = index;
}
-
@Override
public void handleData(ITmfEvent data) {
++fLastEventIndex;
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java
index 41577ea..b372a58 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java
@@ -34,7 +34,7 @@ import org.eclipse.linuxtools.tmf.ui.viewers.statistics.ITmfExtraEventInfo;
public abstract class AbsTmfStatisticsTree {
/**
- * String builder used to merge string more efficienctly.
+ * String builder used to merge string more efficiently.
*/
protected static final StringBuilder fBuilder = new StringBuilder();
@@ -44,7 +44,7 @@ public abstract class AbsTmfStatisticsTree {
public static final TmfFixedArray<String> ROOT = new TmfFixedArray<String>("root"); //$NON-NLS-1$
/**
- * Function to merge many string more efficienctly.
+ * Function to merge many string more efficiently.
*
* @param strings
* Strings to merge.
@@ -201,7 +201,7 @@ public abstract class AbsTmfStatisticsTree {
protected abstract void registerName(final TmfFixedArray<String> path);
/**
- * Reset a node.
+ * Resets a node.
*
* Works recursively.
*
@@ -226,7 +226,6 @@ public abstract class AbsTmfStatisticsTree {
*/
public void resetTimeRangeValue(final TmfFixedArray<String> path) {
for (TmfStatisticsTreeNode node : getChildren(path)) {
- resetTimeRangeValue(node.getPath());
node.resetTimeRangeValue();
}
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java
index 0d85447..4df3f3f 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java
@@ -217,8 +217,6 @@ public class TmfBaseStatisticsTree extends AbsTmfStatisticsTree {
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TmfFixedArray<String>[] getTypePaths(ITmfEvent event, ITmfExtraEventInfo extraInfo) {
String trace = extraInfo.getTraceName();
- // String type = event.getType().getTypeId(); // Add too much
- // informations
String type = event.getType().toString();
TmfFixedArray[] paths = { new TmfFixedArray<String>(trace, HEADER_EVENT_TYPES, type) };
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java
index b1d97a8..ca68a8c 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java
@@ -161,6 +161,8 @@ public class TmfStatisticsTreeNode {
* Resets the number of events in the time range. It doesn't remove any node
* and doesn't modify the global event count.
*
+ * Works recursively.
+ *
* @since 2.0
*/
public void resetTimeRangeValue() {
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java
index 130d847..a904d1d 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java
@@ -38,7 +38,7 @@ public class TmfStatisticsTreeRootFactory {
*
* @param traceUniqueId
* Unique ID for the trace
- * @return the corresponding trace statistics tree
+ * @return The root node of the corresponding trace statistics tree
*/
public static TmfStatisticsTreeNode getStatTreeRoot(String traceUniqueId) {
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java
index cd8abf5..da24ea6 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java
@@ -26,11 +26,6 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.views.statistics.messages"; //$NON-NLS-1$
/**
- * String for unknown trace name.
- */
- public static String TmfStatisticsView_UnknownTraceName;
-
- /**
* String for the global tab name
* @since 2.0
*/
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
index 45a03ae..3504a44 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
@@ -193,7 +193,7 @@ public class TmfStatisticsView extends TmfView {
/**
* Creates the statistics viewers for all traces in the experiment and
- * popupale a viewer folder. Each viewer is placed in a different tab and
+ * populates a viewer folder. Each viewer is placed in a different tab and
* the first one is selected automatically.
*
* It uses the extension point that defines the statistics viewer to build
@@ -215,7 +215,7 @@ public class TmfStatisticsView extends TmfView {
TmfStatisticsViewer globalViewer = new TmfStatisticsViewer();
if (fExperiment != null) {
// Shows the name of the experiment in the global tab
- globalViewer.init( folder, Messages.TmfStatisticsView_GlobalTabName + " - " + fExperiment.getName(), fExperiment); //$NON-NLS-1$
+ globalViewer.init(folder, Messages.TmfStatisticsView_GlobalTabName + " - " + fExperiment.getName(), fExperiment); //$NON-NLS-1$
fStatsViewers.addTab(globalViewer, Messages.TmfStatisticsView_GlobalTabName, defaultStyle);
String traceName;