tmf: some updates to the statistics
authorMathieu Denis <mathieu.denis@polymtl.ca>
Wed, 22 Aug 2012 15:47:36 +0000 (11:47 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 23 Aug 2012 17:22:25 +0000 (13:22 -0400)
- 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>
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsRequest.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/AbsTmfStatisticsTree.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseStatisticsTree.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeRootFactory.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java

index ec09c925ee48c94bada28159fae8c6cee6e4c918..36bac58809ac5e9d06aba3d3b23a2f0cc9bdc324 100644 (file)
@@ -67,7 +67,6 @@ public class TmfStatisticsRequest extends TmfEventRequest {
         fLastEventIndex = index;
     }
 
-
     @Override
     public void handleData(ITmfEvent data) {
         ++fLastEventIndex;
index 41577eaa4d62a305cb1f13ba6f4e109bfc7641b5..b372a588653ec109150929c564d44295c2beea1e 100755 (executable)
@@ -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();
         }
     }
index 0d85447da165fe829969acdfd14e0f9d71608770..4df3f3f9cc9a50eb7c6dd4bcbff36f81f84c897a 100755 (executable)
@@ -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) };
index b1d97a85475db77fbe4d866f2786d74893db4f34..ca68a8cf4c5dc0fc5e8b759f2b3b2ee33e430c79 100755 (executable)
@@ -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() {
index 130d84724a576982649f29ccbc9f670d743e501a..a904d1de4f7b7f09da84de61fcd9a9fa18367d7d 100755 (executable)
@@ -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) {
 
index cd8abf50a186946872f1f733dab59e73f2c70041..da24ea62b969a4d8237cf12743d05140aedb653b 100755 (executable)
@@ -25,11 +25,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
index 45a03ae3561d354fac77d4348f9df68db043f795..3504a44f76dd9aea4fa1371961d124bef1c64ab9 100755 (executable)
@@ -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;
This page took 0.033825 seconds and 5 git commands to generate.