Also, o.e.t.analysis.timing.core.tests is introduced.
Keep packages internal for now since APIs not finalized.
Change-Id: I5a5d4abfd409ff8498d304f97f3c123e0b7a421b
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/63891
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.latency;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for the Latency packages
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- SegmentStoreStatisticsTest.class
-})
-public class AllTests {
-
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.latency;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall;
-import org.eclipse.tracecompass.segmentstore.core.ISegment;
-
-/**
- * This calculates the statistics of a segment store in an offline manner to
- * validate online calculations.
- *
- * @author Matthew Khouzam
- *
- */
-public class OfflineStatisticsCalculator {
- private final Collection<@NonNull SystemCall> fSs;
-
- /**
- * Constructor
- *
- * @param ss
- * segment store, fully build
- */
- public OfflineStatisticsCalculator(Collection<@NonNull SystemCall> ss) {
- fSs = ss;
- }
-
- /**
- * Get the max value
- *
- * @return the max value
- */
- public long getMax() {
- long max = Long.MIN_VALUE;
- for (ISegment interval : fSs) {
- max = Math.max(max, interval.getLength());
- }
- return max;
- }
-
- /**
- * Get the min value
- *
- * @return the min value
- */
- public long getMin() {
- long min = Long.MAX_VALUE;
- for (ISegment interval : fSs) {
- min = Math.min(min, interval.getLength());
- }
- return min;
- }
-
- /**
- * Get the average value
- *
- * @return the average value
- */
- public double getAvg() {
- double total = 0;
- for (ISegment interval : fSs) {
- total += (double) interval.getLength() / (double) fSs.size();
- }
- return total;
- }
-
- /**
- * Get the standard deviation for a window.
- *
- * @return the standard deviation
- */
- public double getStdDev() {
- if (fSs.size() < 3) {
- return Double.NaN;
- }
- double mean = getAvg();
-
- double totalVariance = 0;
- for (ISegment interval : fSs) {
- double result = interval.getLength() - mean;
- totalVariance += result * result / (fSs.size() - 1);
- }
- return Math.sqrt(totalVariance);
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.latency;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Random;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall;
-import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall.InitialInfo;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics.SegmentStoreStatistics;
-import org.eclipse.tracecompass.segmentstore.core.ISegment;
-import org.junit.Test;
-
-/**
- * Test the staticsmodule. This is done with two tests.
- * <ol>
- * <li>test the values vs some sample points calculated by hand (sanity test)
- * </li>
- * <li>2- test exhaustively vs a reference implementation.</li>
- * </ol>
- *
- * @author Matthew Khouzam
- *
- */
-public class SegmentStoreStatisticsTest {
-
- private static final int MEDIUM_AMOUNT_OF_SEGMENTS = 100;
- private static final int LARGE_AMOUNT_OF_SEGMENTS = 1000000;
-
- private static final double NO_ERROR = 0.0;
- private static final double ERROR = 0.000001;
-
- private static void testOnlineVsOffline(List<@NonNull SystemCall> fixture) {
- SegmentStoreStatistics sss = getSegStoreStat(fixture);
- OfflineStatisticsCalculator osc = new OfflineStatisticsCalculator(fixture);
- assertEquals("Average", osc.getAvg(), sss.getAverage(), ERROR);
- assertEquals("Standard Deviation", osc.getStdDev(), sss.getStdDev(), ERROR);
- assertEquals("Min", osc.getMin(), sss.getMin());
- assertEquals("Max", osc.getMax(), sss.getMax());
- }
-
- /**
- * Test incrementing
- */
- @Test
- public void climbTest() {
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = 0; i < MEDIUM_AMOUNT_OF_SEGMENTS; i++) {
- fixture.add(createAnonSyscall(i, i * 2));
- }
- SegmentStoreStatistics sss = getSegStoreStat(fixture);
- assertEquals("Average", 49.5, sss.getAverage(), ERROR);
- assertEquals("Min", 0, sss.getMin());
- assertEquals("Max", 99, sss.getMax());
- assertEquals("Standard Deviation", 29.0, sss.getStdDev(), 0.02);
- testOnlineVsOffline(fixture);
- }
-
- private static SegmentStoreStatistics getSegStoreStat(List<@NonNull SystemCall> fixture) {
- SegmentStoreStatistics sss = new SegmentStoreStatistics();
- for (ISegment seg : fixture) {
- sss.update(seg);
- }
- return sss;
- }
-
- /**
- * Test decrementing
- */
- @Test
- public void decrementingTest() {
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = MEDIUM_AMOUNT_OF_SEGMENTS; i >= 0; i--) {
- fixture.add(createAnonSyscall(i, i * 2));
- }
- SegmentStoreStatistics sss = getSegStoreStat(fixture);
- assertEquals("Average", 50, sss.getAverage(), NO_ERROR);
- assertEquals("Min", 0, sss.getMin());
- assertEquals("Max", 100, sss.getMax());
- assertEquals("Standard Deviation", 29.3, sss.getStdDev(), 0.01);
- testOnlineVsOffline(fixture);
- }
-
- /**
- * Test small
- */
- @Test
- public void smallTest() {
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = 1; i >= 0; i--) {
- fixture.add(createAnonSyscall(i, i * 2));
- }
- testOnlineVsOffline(fixture);
- }
-
- /**
- * Test large
- */
- @Test
- public void largeTest() {
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
- fixture.add(createAnonSyscall(i, i * 2));
- }
- testOnlineVsOffline(fixture);
- }
-
- /**
- * Test noise
- */
- @Test
- public void noiseTest() {
- Random rnd = new Random();
- rnd.setSeed(1234);
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
- int start = Math.abs(rnd.nextInt(100000000));
- int end = start + Math.abs(rnd.nextInt(1000000));
- fixture.add(createAnonSyscall(start, end));
- }
- testOnlineVsOffline(fixture);
- }
-
- /**
- * Test gaussian noise
- */
- @Test
- public void gaussianNoiseTest() {
- Random rnd = new Random();
- rnd.setSeed(1234);
- List<@NonNull SystemCall> fixture = new ArrayList<>();
- for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
- int start = Math.abs(rnd.nextInt(100000000));
- final int delta = Math.abs(rnd.nextInt(1000));
- int end = start + delta * delta;
- fixture.add(createAnonSyscall(start, end));
- }
- testOnlineVsOffline(fixture);
- }
-
- private static @NonNull SystemCall createAnonSyscall(int start, int end) {
- return new SystemCall(new InitialInfo(start, "", Collections.EMPTY_MAP), end, 0);
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics;
-
-import org.eclipse.tracecompass.segmentstore.core.ISegment;
-
-/**
- * Class to calculate simple segment store statistics (min, max, average)
- *
- * @author Bernd Hufmann
- */
-public class SegmentStoreStatistics {
- private long fMin;
- private long fMax;
- private long fNbSegments;
- private double fAverage;
- private double fVariance;
-
- /**
- * Constructor
- */
- public SegmentStoreStatistics() {
- fMin = Long.MAX_VALUE;
- fMax = Long.MIN_VALUE;
- fNbSegments = 0;
- fAverage = 0.0;
- fVariance = 0.0;
- }
-
- /**
- * Get minimum value
- *
- * @return minimum value
- */
- public long getMin() {
- return fMin;
- }
-
- /**
- * Get maximum value
- *
- * @return maximum value
- */
- public long getMax() {
- return fMax;
- }
-
- /**
- * Get number of segments analyzed
- *
- * @return number of segments analyzed
- */
- public long getNbSegments() {
- return fNbSegments;
- }
-
- /**
- * Gets the arithmetic average
- *
- * @return arithmetic average
- */
- public double getAverage() {
- return fAverage;
- }
-
- /**
- * Gets the standard deviation of the segments, uses the online algorithm
- * shown here <a href=
- * "https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm">
- * Wikipedia article of dec 3 2015 </a>
- *
- * @return the standard deviation of the segment store, will return NaN if
- * there are less than 3 elements
- */
- public double getStdDev() {
- return fNbSegments > 2 ? Math.sqrt(fVariance / (fNbSegments - 1)) : Double.NaN;
- }
-
- /**
- * Update the statistics based on a given segment
- * <p>
- * This is an online algorithm and must retain a complexity of O(1)
- *
- * @param segment
- * the segment used for the update
- */
- public void update(ISegment segment) {
- long value = segment.getLength();
- /*
- * Min and max are trivial, as well as number of segments
- */
- fMin = Math.min(fMin, value);
- fMax = Math.max(fMax, value);
-
- fNbSegments++;
- /*
- * The running mean is not trivial, see proof in javadoc.
- */
- double delta = value - fAverage;
- fAverage += delta / fNbSegments;
- fVariance += delta * (value - fAverage);
- }
-}
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall;
import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
+import org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics.SegmentStoreStatistics;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.ui.views.TmfView;
-
-/**
- * Abstract view to to be extended to display segment store statistics.
- *
- * @author Bernd Hufmann
- *
- */
-public abstract class AbstractSegmentStoreStatisticsView extends TmfView {
-
- @Nullable private AbstractSegmentStoreStatisticsViewer fStatsViewer = null;
-
- /**
- * Constructor
- */
- public AbstractSegmentStoreStatisticsView() {
- super("StatisticsView"); //$NON-NLS-1$
- }
-
- @Override
- public void createPartControl(@Nullable Composite parent) {
- super.createPartControl(parent);
- AbstractSegmentStoreStatisticsViewer statsViewer = createSegmentStoreStatisticsViewer(NonNullUtils.checkNotNull(parent));
- ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
- if (trace != null) {
- statsViewer.loadTrace(trace);
- }
- fStatsViewer = statsViewer;
- }
-
- @Override
- public void setFocus() {
- AbstractSegmentStoreStatisticsViewer statsViewer = fStatsViewer;
- if (statsViewer != null) {
- statsViewer.getControl().setFocus();
- }
- }
-
- @Override
- public void dispose() {
- super.dispose();
- AbstractSegmentStoreStatisticsViewer statsViewer = fStatsViewer;
- if (statsViewer != null) {
- statsViewer.dispose();
- }
- }
-
- /**
- * Creates a segment store statistics viewer instance.
- *
- * @param parent
- * the parent composite to create the viewer in.
- * @return the latency statistics viewer implementation
- */
- protected abstract AbstractSegmentStoreStatisticsViewer createSegmentStoreStatisticsViewer(Composite parent);
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.text.NumberFormat;
-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.internal.analysis.os.linux.core.latency.statistics.SegmentStoreStatistics;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
-import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
-
-/**
- * An abstract tree viewer implementation for displaying segment store statistics
- *
- * @author Bernd Hufmann
- *
- */
-public abstract class AbstractSegmentStoreStatisticsViewer extends AbstractTmfTreeViewer {
-
- private static final NumberFormat FORMATTER = checkNotNull(NumberFormat.getNumberInstance(Locale.getDefault()));
-
- @Nullable private TmfAbstractAnalysisModule fModule;
-
- private static final String[] COLUMN_NAMES = new String[] {
- checkNotNull(Messages.SegmentStoreStatistics_LevelLabel),
- checkNotNull(Messages.SegmentStoreStatistics_Statistics_MinLabel),
- checkNotNull(Messages.SegmentStoreStatistics_MaxLabel),
- checkNotNull(Messages.SegmentStoreStatistics_AverageLabel)
- };
-
- /**
- * Constructor
- *
- * @param parent
- * the parent composite
- */
- public AbstractSegmentStoreStatisticsViewer(Composite parent) {
- super(parent, false);
- setLabelProvider(new SegmentStoreStatisticsLabelProvider());
- }
-
- /** Provides label for the Segment Store tree viewer cells */
- protected static class SegmentStoreStatisticsLabelProvider extends TreeLabelProvider {
-
- @Override
- public String getColumnText(@Nullable Object element, int columnIndex) {
- String value = ""; //$NON-NLS-1$
- if (element instanceof HiddenTreeViewerEntry) {
- if (columnIndex == 0) {
- value = ((HiddenTreeViewerEntry) element).getName();
- }
- } else if (element instanceof SegmentStoreStatisticsEntry) {
- SegmentStoreStatisticsEntry entry = (SegmentStoreStatisticsEntry) element;
- if (columnIndex == 0) {
- return checkNotNull(String.valueOf(entry.getName()));
- }
- if (entry.getEntry().getNbSegments() > 0) {
- if (columnIndex == 1) {
- value = toFormattedString(entry.getEntry().getMin());
- } else if (columnIndex == 2) {
- value = String.valueOf(toFormattedString(entry.getEntry().getMax()));
- } else if (columnIndex == 3) {
- value = String.valueOf(toFormattedString(entry.getEntry().getAverage()));
- }
- }
- }
- return checkNotNull(value);
- }
- }
-
- /**
- * Creates the statistics analysis module
- *
- * @return the statistics analysis module
- */
- @Nullable protected abstract TmfAbstractAnalysisModule createStatisticsAnalysiModule();
-
- /**
- * Gets the statistics analysis module
- * @return the statistics analysis module
- */
- @Nullable public TmfAbstractAnalysisModule getStatisticsAnalysisModule() {
- return fModule;
- }
-
- @Override
- protected ITmfTreeColumnDataProvider getColumnDataProvider() {
- return new ITmfTreeColumnDataProvider() {
-
- @Override
- public List<@Nullable TmfTreeColumnData> getColumnData() {
- /* All columns are sortable */
- List<@Nullable TmfTreeColumnData> columns = new ArrayList<>();
- TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
- if ((e1 == null) || (e2 == null)) {
- return 0;
- }
-
- SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
- SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
-
- return n1.getName().compareTo(n2.getName());
-
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[1]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
- if ((e1 == null) || (e2 == null)) {
- return 0;
- }
-
- SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
- SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
-
- return Long.compare(n1.getEntry().getMin(), n2.getEntry().getMin());
-
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[2]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
- if ((e1 == null) || (e2 == null)) {
- return 0;
- }
-
- SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
- SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
-
- return Long.compare(n1.getEntry().getMax(), n2.getEntry().getMax());
-
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[3]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
- if ((e1 == null) || (e2 == null)) {
- return 0;
- }
-
- SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
- SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
-
- return Double.compare(n1.getEntry().getAverage(), n2.getEntry().getAverage());
-
- }
- });
- columns.add(column);
-
- return columns;
- }
-
- };
- }
-
-
- @Override
- public void initializeDataSource() {
- /* Should not be called while trace is still null */
- ITmfTrace trace = checkNotNull(getTrace());
- TmfAbstractAnalysisModule module = createStatisticsAnalysiModule();
- if (module == null) {
- return;
- }
- try {
- module.setTrace(trace);
- module.schedule();
- fModule = module;
- } catch (TmfAnalysisException e) {
- Activator.getDefault().logError("Error initializing statistics analysis module", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Formats a double value string
- *
- * @param value
- * a value to format
- * @return formatted value
- */
- protected static String toFormattedString(double value) {
- // The cast to long is needed because the formatter cannot truncate the number.
- String percentageString = checkNotNull(String.format("%s", FORMATTER.format(value))); //$NON-NLS-1$
- return percentageString;
- }
-
- /**
- * Class for defining an entry in the statistics tree.
- */
- protected class SegmentStoreStatisticsEntry extends TmfTreeViewerEntry {
-
- private SegmentStoreStatistics fEntry;
-
- /**
- * Constructor
- *
- * @param name
- * name of entry
- *
- * @param entry
- * segment store statistics object
- */
- public SegmentStoreStatisticsEntry(String name, SegmentStoreStatistics entry) {
- super(name);
- fEntry = entry;
- }
-
- /**
- * Gets the statistics object
- *
- * @return statistics object
- */
- public SegmentStoreStatistics getEntry() {
- return checkNotNull(fEntry);
- }
-
- }
-
- /**
- * Class to define a level in the tree that doesn't have any values.
- */
- protected class HiddenTreeViewerEntry extends SegmentStoreStatisticsEntry {
- /**
- * Constructor
- *
- * @param name
- * the name of the level
- */
- public HiddenTreeViewerEntry(String name) {
- super(name, new SegmentStoreStatistics());
- }
- }
-
-}
/*******************************************************************************
- * Copyright (c) 2015 Ericsson
+ * Copyright (c) 2015, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/** Name of the system call level in statistics tree */
public static String LatencyStatistics_SyscallLevelName;
- /** Name of level column */
- public static String SegmentStoreStatistics_LevelLabel;
- /** Name of the minimum column */
- public static String SegmentStoreStatistics_Statistics_MinLabel;
- /** Name of maximum column */
- public static String SegmentStoreStatistics_MaxLabel;
- /** Name of average column */
- public static String SegmentStoreStatistics_AverageLabel;
/** Name of Total statistics */
public static String LatencyStatistics_TotalLabel;
import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentStoreStatisticsView;
+import org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentStoreStatisticsViewer;
/**
* View to display latency statistics.
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics.SegmentStoreStatistics;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics.SystemCallLatencyStatisticsAnalysisModule;
+import org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics.SegmentStoreStatistics;
+import org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentStoreStatisticsViewer;
import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry;
import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
###############################################################################
-# Copyright (c) 2015 Ericsson
+# Copyright (c) 2015, 2016 Ericsson
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# Bernd Hufmann - Initial API and implementation
###############################################################################
LatencyStatistics_SyscallLevelName=System Calls
-SegmentStoreStatistics_LevelLabel=Level
-SegmentStoreStatistics_Statistics_MinLabel=Minimum
-SegmentStoreStatistics_MaxLabel=Maximum
-SegmentStoreStatistics_AverageLabel=Average
LatencyStatistics_TotalLabel=Total
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="annotationpath" value="/org.eclipse.tracecompass.common.core/annotations"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <attributes>
+ <attribute name="annotationpath" value="/org.eclipse.tracecompass.common.core/annotations"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.analysis.timing.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.analysis.timing.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.common.core,
+ org.eclipse.tracecompass.analysis.os.linux.core,
+ org.eclipse.tracecompass.segmentstore.core,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.core.tests,
+ org.eclipse.tracecompass.tmf.ctf.core,
+ org.eclipse.tracecompass.tmf.ctf.core.tests,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.analysis.timing.core;bundle-version="1.0.0"
+Import-Package: com.google.common.collect,
+ org.eclipse.tracecompass.testtraces.ctf;version="1.0.0"
+Export-Package: org.eclipse.tracecompass.analysis.timing.core.tests
+Bundle-Activator: org.eclipse.tracecompass.analysis.timing.core.tests.Activator
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
--- /dev/null
+###############################################################################
+# Copyright (c) 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Timing Analysis Core Tests Plug-in
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.timing.core.tests;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator for this plugin
+ *
+ * @author Bernd Hufmann
+ */
+public class Activator extends Plugin {
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.timing.core.tests"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator PLUGIN;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return PLUGIN;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operators
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ PLUGIN = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ PLUGIN = null;
+ super.stop(context);
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.timing.core.tests.segmentstore.statistics;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall;
+import org.eclipse.tracecompass.segmentstore.core.ISegment;
+
+/**
+ * This calculates the statistics of a segment store in an offline manner to
+ * validate online calculations.
+ *
+ * @author Matthew Khouzam
+ *
+ */
+public class OfflineStatisticsCalculator {
+ private final Collection<@NonNull SystemCall> fSs;
+
+ /**
+ * Constructor
+ *
+ * @param ss
+ * segment store, fully build
+ */
+ public OfflineStatisticsCalculator(Collection<@NonNull SystemCall> ss) {
+ fSs = ss;
+ }
+
+ /**
+ * Get the max value
+ *
+ * @return the max value
+ */
+ public long getMax() {
+ long max = Long.MIN_VALUE;
+ for (ISegment interval : fSs) {
+ max = Math.max(max, interval.getLength());
+ }
+ return max;
+ }
+
+ /**
+ * Get the min value
+ *
+ * @return the min value
+ */
+ public long getMin() {
+ long min = Long.MAX_VALUE;
+ for (ISegment interval : fSs) {
+ min = Math.min(min, interval.getLength());
+ }
+ return min;
+ }
+
+ /**
+ * Get the average value
+ *
+ * @return the average value
+ */
+ public double getAvg() {
+ double total = 0;
+ for (ISegment interval : fSs) {
+ total += (double) interval.getLength() / (double) fSs.size();
+ }
+ return total;
+ }
+
+ /**
+ * Get the standard deviation for a window.
+ *
+ * @return the standard deviation
+ */
+ public double getStdDev() {
+ if (fSs.size() < 3) {
+ return Double.NaN;
+ }
+ double mean = getAvg();
+
+ double totalVariance = 0;
+ for (ISegment interval : fSs) {
+ double result = interval.getLength() - mean;
+ totalVariance += result * result / (fSs.size() - 1);
+ }
+ return Math.sqrt(totalVariance);
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.timing.core.tests.segmentstore.statistics;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall;
+import org.eclipse.tracecompass.analysis.os.linux.core.latency.SystemCall.InitialInfo;
+import org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics.SegmentStoreStatistics;
+import org.eclipse.tracecompass.segmentstore.core.ISegment;
+import org.junit.Test;
+
+/**
+ * Test the staticsmodule. This is done with two tests.
+ * <ol>
+ * <li>test the values vs some sample points calculated by hand (sanity test)
+ * </li>
+ * <li>2- test exhaustively vs a reference implementation.</li>
+ * </ol>
+ *
+ * @author Matthew Khouzam
+ *
+ */
+public class SegmentStoreStatisticsTest {
+
+ private static final int MEDIUM_AMOUNT_OF_SEGMENTS = 100;
+ private static final int LARGE_AMOUNT_OF_SEGMENTS = 1000000;
+
+ private static final double NO_ERROR = 0.0;
+ private static final double ERROR = 0.000001;
+
+ private static void testOnlineVsOffline(List<@NonNull SystemCall> fixture) {
+ SegmentStoreStatistics sss = getSegStoreStat(fixture);
+ OfflineStatisticsCalculator osc = new OfflineStatisticsCalculator(fixture);
+ assertEquals("Average", osc.getAvg(), sss.getAverage(), ERROR);
+ assertEquals("Standard Deviation", osc.getStdDev(), sss.getStdDev(), ERROR);
+ assertEquals("Min", osc.getMin(), sss.getMin());
+ assertEquals("Max", osc.getMax(), sss.getMax());
+ }
+
+ /**
+ * Test incrementing
+ */
+ @Test
+ public void climbTest() {
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = 0; i < MEDIUM_AMOUNT_OF_SEGMENTS; i++) {
+ fixture.add(createAnonSyscall(i, i * 2));
+ }
+ SegmentStoreStatistics sss = getSegStoreStat(fixture);
+ assertEquals("Average", 49.5, sss.getAverage(), ERROR);
+ assertEquals("Min", 0, sss.getMin());
+ assertEquals("Max", 99, sss.getMax());
+ assertEquals("Standard Deviation", 29.0, sss.getStdDev(), 0.02);
+ testOnlineVsOffline(fixture);
+ }
+
+ private static SegmentStoreStatistics getSegStoreStat(List<@NonNull SystemCall> fixture) {
+ SegmentStoreStatistics sss = new SegmentStoreStatistics();
+ for (ISegment seg : fixture) {
+ sss.update(seg);
+ }
+ return sss;
+ }
+
+ /**
+ * Test decrementing
+ */
+ @Test
+ public void decrementingTest() {
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = MEDIUM_AMOUNT_OF_SEGMENTS; i >= 0; i--) {
+ fixture.add(createAnonSyscall(i, i * 2));
+ }
+ SegmentStoreStatistics sss = getSegStoreStat(fixture);
+ assertEquals("Average", 50, sss.getAverage(), NO_ERROR);
+ assertEquals("Min", 0, sss.getMin());
+ assertEquals("Max", 100, sss.getMax());
+ assertEquals("Standard Deviation", 29.3, sss.getStdDev(), 0.01);
+ testOnlineVsOffline(fixture);
+ }
+
+ /**
+ * Test small
+ */
+ @Test
+ public void smallTest() {
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = 1; i >= 0; i--) {
+ fixture.add(createAnonSyscall(i, i * 2));
+ }
+ testOnlineVsOffline(fixture);
+ }
+
+ /**
+ * Test large
+ */
+ @Test
+ public void largeTest() {
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
+ fixture.add(createAnonSyscall(i, i * 2));
+ }
+ testOnlineVsOffline(fixture);
+ }
+
+ /**
+ * Test noise
+ */
+ @Test
+ public void noiseTest() {
+ Random rnd = new Random();
+ rnd.setSeed(1234);
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
+ int start = Math.abs(rnd.nextInt(100000000));
+ int end = start + Math.abs(rnd.nextInt(1000000));
+ fixture.add(createAnonSyscall(start, end));
+ }
+ testOnlineVsOffline(fixture);
+ }
+
+ /**
+ * Test gaussian noise
+ */
+ @Test
+ public void gaussianNoiseTest() {
+ Random rnd = new Random();
+ rnd.setSeed(1234);
+ List<@NonNull SystemCall> fixture = new ArrayList<>();
+ for (int i = 1; i <= LARGE_AMOUNT_OF_SEGMENTS; i++) {
+ int start = Math.abs(rnd.nextInt(100000000));
+ final int delta = Math.abs(rnd.nextInt(1000));
+ int end = start + delta * delta;
+ fixture.add(createAnonSyscall(start, end));
+ }
+ testOnlineVsOffline(fixture);
+ }
+
+ private static @NonNull SystemCall createAnonSyscall(int start, int end) {
+ return new SystemCall(new InitialInfo(start, "", Collections.EMPTY_MAP), end, 0);
+ }
+}
org.eclipse.tracecompass.tmf.core,
org.eclipse.tracecompass.segmentstore.core
Export-Package: org.eclipse.tracecompass.analysis.timing.core.segmentstore,
- org.eclipse.tracecompass.internal.analysis.timing.core
+ org.eclipse.tracecompass.internal.analysis.timing.core,
+ org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics;
+ x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui,
+ org.eclipse.tracecompass.analysis.timing.ui,
+ org.eclipse.tracecompass.analysis.timing.core.tests,
+ org.eclipse.tracecompass.analysis.os.linux.core"
Import-Package: com.google.common.collect,
com.google.common.hash
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics;
+
+import org.eclipse.tracecompass.segmentstore.core.ISegment;
+
+/**
+ * Class to calculate simple segment store statistics (min, max, average)
+ *
+ * @author Bernd Hufmann
+ */
+public class SegmentStoreStatistics {
+ private long fMin;
+ private long fMax;
+ private long fNbSegments;
+ private double fAverage;
+ private double fVariance;
+
+ /**
+ * Constructor
+ */
+ public SegmentStoreStatistics() {
+ fMin = Long.MAX_VALUE;
+ fMax = Long.MIN_VALUE;
+ fNbSegments = 0;
+ fAverage = 0.0;
+ fVariance = 0.0;
+ }
+
+ /**
+ * Get minimum value
+ *
+ * @return minimum value
+ */
+ public long getMin() {
+ return fMin;
+ }
+
+ /**
+ * Get maximum value
+ *
+ * @return maximum value
+ */
+ public long getMax() {
+ return fMax;
+ }
+
+ /**
+ * Get number of segments analyzed
+ *
+ * @return number of segments analyzed
+ */
+ public long getNbSegments() {
+ return fNbSegments;
+ }
+
+ /**
+ * Gets the arithmetic average
+ *
+ * @return arithmetic average
+ */
+ public double getAverage() {
+ return fAverage;
+ }
+
+ /**
+ * Gets the standard deviation of the segments, uses the online algorithm
+ * shown here <a href=
+ * "https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm">
+ * Wikipedia article of dec 3 2015 </a>
+ *
+ * @return the standard deviation of the segment store, will return NaN if
+ * there are less than 3 elements
+ */
+ public double getStdDev() {
+ return fNbSegments > 2 ? Math.sqrt(fVariance / (fNbSegments - 1)) : Double.NaN;
+ }
+
+ /**
+ * Update the statistics based on a given segment
+ * <p>
+ * This is an online algorithm and must retain a complexity of O(1)
+ *
+ * @param segment
+ * the segment used for the update
+ */
+ public void update(ISegment segment) {
+ long value = segment.getLength();
+ /*
+ * Min and max are trivial, as well as number of segments
+ */
+ fMin = Math.min(fMin, value);
+ fMax = Math.max(fMax, value);
+
+ fNbSegments++;
+ /*
+ * The running mean is not trivial, see proof in javadoc.
+ */
+ double delta = value - fAverage;
+ fAverage += delta / fNbSegments;
+ fVariance += delta * (value - fAverage);
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.internal.analysis.timing.core.segmentstore.statistics;
org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.density,
org.eclipse.tracecompass.internal.analysis.timing.ui,
org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore,
- org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.density
+ org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.density,
+ org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics;x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui"
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.ui.views.TmfView;
+
+/**
+ * Abstract view to to be extended to display segment store statistics.
+ *
+ * @author Bernd Hufmann
+ *
+ */
+public abstract class AbstractSegmentStoreStatisticsView extends TmfView {
+
+ @Nullable private AbstractSegmentStoreStatisticsViewer fStatsViewer = null;
+
+ /**
+ * Constructor
+ */
+ public AbstractSegmentStoreStatisticsView() {
+ super("StatisticsView"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void createPartControl(@Nullable Composite parent) {
+ super.createPartControl(parent);
+ AbstractSegmentStoreStatisticsViewer statsViewer = createSegmentStoreStatisticsViewer(NonNullUtils.checkNotNull(parent));
+ ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
+ if (trace != null) {
+ statsViewer.loadTrace(trace);
+ }
+ fStatsViewer = statsViewer;
+ }
+
+ @Override
+ public void setFocus() {
+ AbstractSegmentStoreStatisticsViewer statsViewer = fStatsViewer;
+ if (statsViewer != null) {
+ statsViewer.getControl().setFocus();
+ }
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ AbstractSegmentStoreStatisticsViewer statsViewer = fStatsViewer;
+ if (statsViewer != null) {
+ statsViewer.dispose();
+ }
+ }
+
+ /**
+ * Creates a segment store statistics viewer instance.
+ *
+ * @param parent
+ * the parent composite to create the viewer in.
+ * @return the latency statistics viewer implementation
+ */
+ protected abstract AbstractSegmentStoreStatisticsViewer createSegmentStoreStatisticsViewer(Composite parent);
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.text.NumberFormat;
+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.internal.analysis.timing.core.segmentstore.statistics.SegmentStoreStatistics;
+import org.eclipse.tracecompass.internal.analysis.timing.ui.Activator;
+import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
+
+/**
+ * An abstract tree viewer implementation for displaying segment store statistics
+ *
+ * @author Bernd Hufmann
+ *
+ */
+public abstract class AbstractSegmentStoreStatisticsViewer extends AbstractTmfTreeViewer {
+
+ private static final NumberFormat FORMATTER = checkNotNull(NumberFormat.getNumberInstance(Locale.getDefault()));
+
+ @Nullable private TmfAbstractAnalysisModule fModule;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ checkNotNull(Messages.SegmentStoreStatistics_LevelLabel),
+ checkNotNull(Messages.SegmentStoreStatistics_Statistics_MinLabel),
+ checkNotNull(Messages.SegmentStoreStatistics_MaxLabel),
+ checkNotNull(Messages.SegmentStoreStatistics_AverageLabel)
+ };
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * the parent composite
+ */
+ public AbstractSegmentStoreStatisticsViewer(Composite parent) {
+ super(parent, false);
+ setLabelProvider(new SegmentStoreStatisticsLabelProvider());
+ }
+
+ /** Provides label for the Segment Store tree viewer cells */
+ protected static class SegmentStoreStatisticsLabelProvider extends TreeLabelProvider {
+
+ @Override
+ public String getColumnText(@Nullable Object element, int columnIndex) {
+ String value = ""; //$NON-NLS-1$
+ if (element instanceof HiddenTreeViewerEntry) {
+ if (columnIndex == 0) {
+ value = ((HiddenTreeViewerEntry) element).getName();
+ }
+ } else if (element instanceof SegmentStoreStatisticsEntry) {
+ SegmentStoreStatisticsEntry entry = (SegmentStoreStatisticsEntry) element;
+ if (columnIndex == 0) {
+ return checkNotNull(String.valueOf(entry.getName()));
+ }
+ if (entry.getEntry().getNbSegments() > 0) {
+ if (columnIndex == 1) {
+ value = toFormattedString(entry.getEntry().getMin());
+ } else if (columnIndex == 2) {
+ value = String.valueOf(toFormattedString(entry.getEntry().getMax()));
+ } else if (columnIndex == 3) {
+ value = String.valueOf(toFormattedString(entry.getEntry().getAverage()));
+ }
+ }
+ }
+ return checkNotNull(value);
+ }
+ }
+
+ /**
+ * Creates the statistics analysis module
+ *
+ * @return the statistics analysis module
+ */
+ @Nullable protected abstract TmfAbstractAnalysisModule createStatisticsAnalysiModule();
+
+ /**
+ * Gets the statistics analysis module
+ * @return the statistics analysis module
+ */
+ @Nullable public TmfAbstractAnalysisModule getStatisticsAnalysisModule() {
+ return fModule;
+ }
+
+ @Override
+ protected ITmfTreeColumnDataProvider getColumnDataProvider() {
+ return new ITmfTreeColumnDataProvider() {
+
+ @Override
+ public List<@Nullable TmfTreeColumnData> getColumnData() {
+ /* All columns are sortable */
+ List<@Nullable TmfTreeColumnData> columns = new ArrayList<>();
+ TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
+ if ((e1 == null) || (e2 == null)) {
+ return 0;
+ }
+
+ SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
+ SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
+
+ return n1.getName().compareTo(n2.getName());
+
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[1]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
+ if ((e1 == null) || (e2 == null)) {
+ return 0;
+ }
+
+ SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
+ SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
+
+ return Long.compare(n1.getEntry().getMin(), n2.getEntry().getMin());
+
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[2]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
+ if ((e1 == null) || (e2 == null)) {
+ return 0;
+ }
+
+ SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
+ SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
+
+ return Long.compare(n1.getEntry().getMax(), n2.getEntry().getMax());
+
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[3]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(@Nullable Viewer viewer, @Nullable Object e1, @Nullable Object e2) {
+ if ((e1 == null) || (e2 == null)) {
+ return 0;
+ }
+
+ SegmentStoreStatisticsEntry n1 = (SegmentStoreStatisticsEntry) e1;
+ SegmentStoreStatisticsEntry n2 = (SegmentStoreStatisticsEntry) e2;
+
+ return Double.compare(n1.getEntry().getAverage(), n2.getEntry().getAverage());
+
+ }
+ });
+ columns.add(column);
+
+ return columns;
+ }
+
+ };
+ }
+
+
+ @Override
+ public void initializeDataSource() {
+ /* Should not be called while trace is still null */
+ ITmfTrace trace = checkNotNull(getTrace());
+ TmfAbstractAnalysisModule module = createStatisticsAnalysiModule();
+ if (module == null) {
+ return;
+ }
+ try {
+ module.setTrace(trace);
+ module.schedule();
+ fModule = module;
+ } catch (TmfAnalysisException e) {
+ Activator.getDefault().logError("Error initializing statistics analysis module", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Formats a double value string
+ *
+ * @param value
+ * a value to format
+ * @return formatted value
+ */
+ protected static String toFormattedString(double value) {
+ // The cast to long is needed because the formatter cannot truncate the number.
+ String percentageString = checkNotNull(String.format("%s", FORMATTER.format(value))); //$NON-NLS-1$
+ return percentageString;
+ }
+
+ /**
+ * Class for defining an entry in the statistics tree.
+ */
+ protected class SegmentStoreStatisticsEntry extends TmfTreeViewerEntry {
+
+ private SegmentStoreStatistics fEntry;
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * name of entry
+ *
+ * @param entry
+ * segment store statistics object
+ */
+ public SegmentStoreStatisticsEntry(String name, SegmentStoreStatistics entry) {
+ super(name);
+ fEntry = entry;
+ }
+
+ /**
+ * Gets the statistics object
+ *
+ * @return statistics object
+ */
+ public SegmentStoreStatistics getEntry() {
+ return checkNotNull(fEntry);
+ }
+
+ }
+
+ /**
+ * Class to define a level in the tree that doesn't have any values.
+ */
+ protected class HiddenTreeViewerEntry extends SegmentStoreStatisticsEntry {
+ /**
+ * Constructor
+ *
+ * @param name
+ * the name of the level
+ */
+ public HiddenTreeViewerEntry(String name) {
+ super(name, new SegmentStoreStatistics());
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages used in the LTTng kernel CPU usage view and viewers.
+ *
+ * @author Bernd Hufmann
+ */
+@NonNullByDefault({})
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics.messages"; //$NON-NLS-1$
+
+ /** Name of level column */
+ public static String SegmentStoreStatistics_LevelLabel;
+ /** Name of the minimum column */
+ public static String SegmentStoreStatistics_Statistics_MinLabel;
+ /** Name of maximum column */
+ public static String SegmentStoreStatistics_MaxLabel;
+ /** Name of average column */
+ public static String SegmentStoreStatistics_AverageLabel;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2015, 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Bernd Hufmann - Initial API and implementation
+###############################################################################
+SegmentStoreStatistics_LevelLabel=Level
+SegmentStoreStatistics_Statistics_MinLabel=Minimum
+SegmentStoreStatistics_MaxLabel=Maximum
+SegmentStoreStatistics_AverageLabel=Average
+
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.statistics;
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2015, Ericsson, EfficiOS Inc. and others
+ Copyright (C) 2016, Ericsson, EfficiOS Inc. and others
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
<module>org.eclipse.tracecompass.analysis.os.linux.ui</module>
<module>org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests</module>
<module>org.eclipse.tracecompass.analysis.timing.core</module>
+ <module>org.eclipse.tracecompass.analysis.timing.core.tests</module>
<module>org.eclipse.tracecompass.analysis.timing.ui</module>
</modules>