Search in sources :

Example 6 with PMStatEntry

use of org.eclipse.linuxtools.internal.perf.model.PMStatEntry in project linuxtools by eclipse.

the class StatComparisonData method getComparisonStats.

/**
 * Return a PMStatEntry array with the result of the comparison between the
 * old and new stat data files
 * @return
 */
public ArrayList<PMStatEntry> getComparisonStats() {
    ArrayList<PMStatEntry> oldStats = collectStats(oldFile);
    ArrayList<PMStatEntry> newStats = collectStats(newFile);
    ArrayList<PMStatEntry> result = new ArrayList<>();
    for (PMStatEntry oldEntry : oldStats) {
        for (PMStatEntry newEntry : newStats) {
            if (oldEntry.equalEvents(newEntry)) {
                result.add(oldEntry.compare(newEntry));
                continue;
            }
        }
    }
    return result;
}
Also used : PMStatEntry(org.eclipse.linuxtools.internal.perf.model.PMStatEntry) ArrayList(java.util.ArrayList)

Aggregations

PMStatEntry (org.eclipse.linuxtools.internal.perf.model.PMStatEntry)6 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)2 BufferedReader (java.io.BufferedReader)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1 IFileStore (org.eclipse.core.filesystem.IFileStore)1 CoreException (org.eclipse.core.runtime.CoreException)1 IPath (org.eclipse.core.runtime.IPath)1 StatComparisonData (org.eclipse.linuxtools.internal.perf.StatComparisonData)1 IRemoteFileProxy (org.eclipse.linuxtools.profiling.launch.IRemoteFileProxy)1 Before (org.junit.Before)1