analysis: make statistics view use a more legible format
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 7 Jan 2016 20:40:04 +0000 (15:40 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 13 Jan 2016 22:10:08 +0000 (17:10 -0500)
statistics will now display times using units and 3 significant
decimals as opposed to the way they were displayed before (unitless
left-aligned nanoseconds)

Change-Id: I35cfeeb7d038ac2b9f52f3648c3e4337a6ec279c
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/63787
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/internal/analysis/timing/ui/views/segmentstore/statistics/AbstractSegmentStoreStatisticsViewer.java
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/internal/analysis/timing/ui/views/segmentstore/statistics/Messages.java
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/internal/analysis/timing/ui/views/segmentstore/statistics/messages.properties

index a2a308211dd87ca1a2a79e72ad34126ae5431955..d0d2911ed2fd378be9b66d003df42ab269c03818 100644 (file)
@@ -13,15 +13,15 @@ package org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.
 
 import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
 
-import java.text.NumberFormat;
+import java.text.Format;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Locale;
 
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.SubSecondTimeWithUnitFormat;
 import org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics.SegmentStoreStatistics;
 import org.eclipse.tracecompass.internal.analysis.timing.ui.Activator;
 import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
@@ -40,7 +40,7 @@ import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
  */
 public abstract class AbstractSegmentStoreStatisticsViewer extends AbstractTmfTreeViewer {
 
-    private static final NumberFormat FORMATTER = checkNotNull(NumberFormat.getNumberInstance(Locale.getDefault()));
+    private static final Format FORMATTER = new SubSecondTimeWithUnitFormat();
 
     @Nullable private TmfAbstractAnalysisModule fModule;
 
index 679882ae048564c721aa7396a1bd10b57ef46ec3..1494f4b70a430d416f0a8ecb189e851ac9943dc7 100644 (file)
@@ -32,6 +32,8 @@ public class Messages extends NLS {
     public static String SegmentStoreStatistics_MaxLabel;
     /** Name of average column */
     public static String SegmentStoreStatistics_AverageLabel;
+    /** Name of average column */
+    public static String SegmentStoreStatisticsViewer_StandardDeviation;
 
     static {
         // initialize resource bundle
index 817018c8501fe9e23533ec811e27d9d951fd642c..61c5df5f207d2977096d4090baa570bb3001a1eb 100644 (file)
@@ -13,4 +13,4 @@ SegmentStoreStatistics_LevelLabel=Level
 SegmentStoreStatistics_Statistics_MinLabel=Minimum
 SegmentStoreStatistics_MaxLabel=Maximum
 SegmentStoreStatistics_AverageLabel=Average
\ No newline at end of file
+SegmentStoreStatisticsViewer_StandardDeviation=Standard Deviation
\ No newline at end of file
This page took 0.027163 seconds and 5 git commands to generate.