Search in sources :

Example 6 with InputOutputAnalysisModule

use of org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule in project tracecompass by tracecompass.

the class InputOutputDataProviderTest method setUp.

@Override
@NonNull
protected InputOutputAnalysisModule setUp(String fileName) {
    InputOutputAnalysisModule module = super.setUp(fileName);
    TmfTestHelper.executeAnalysis(module);
    return module;
}
Also used : InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) NonNull(org.eclipse.jdt.annotation.NonNull)

Example 7 with InputOutputAnalysisModule

use of org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule in project tracecompass by tracecompass.

the class InputOutputDiskTest method testDeviceStrings.

/**
 * Test the {@link Disk#getDeviceIdString()} and
 * {@link Disk#getDiskName()} methods
 */
@Test
public void testDeviceStrings() {
    InputOutputAnalysisModule module = setUp(fTestCase.getTraceFileName());
    for (Entry<Integer, DiskInfo> deviceInfo : fTestCase.getDiskInfo().entrySet()) {
        Integer deviceId = deviceInfo.getKey();
        DiskInfo diskInfo = deviceInfo.getValue();
        Disk disk = getDisk(module, deviceId);
        assertNotNull(disk);
        assertEquals("Device ID string for " + deviceId, diskInfo.getDeviceString(), disk.getDeviceIdString());
        assertEquals("Disk name string for " + deviceId, diskInfo.getDeviceName(), disk.getDiskName());
        assertEquals("Disk activity for " + deviceId, diskInfo.hasActivity(), disk.hasActivity());
    }
}
Also used : DiskInfo(org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.DiskInfo) InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) Disk(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.Disk) Test(org.junit.Test)

Example 8 with InputOutputAnalysisModule

use of org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule in project tracecompass by tracecompass.

the class InputOutputDiskTest method setUp.

@Override
@NonNull
protected InputOutputAnalysisModule setUp(String fileName) {
    InputOutputAnalysisModule module = super.setUp(fileName);
    TmfTestHelper.executeAnalysis(module);
    return module;
}
Also used : InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) NonNull(org.eclipse.jdt.annotation.NonNull)

Example 9 with InputOutputAnalysisModule

use of org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule in project tracecompass by tracecompass.

the class InputOutputInformationProviderTest method setUp.

@Override
@NonNull
protected InputOutputAnalysisModule setUp(String fileName) {
    InputOutputAnalysisModule module = super.setUp(fileName);
    TmfTestHelper.executeAnalysis(module);
    return module;
}
Also used : InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) NonNull(org.eclipse.jdt.annotation.NonNull)

Example 10 with InputOutputAnalysisModule

use of org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule in project tracecompass by tracecompass.

the class InputOutputInformationProviderTest method testGetDisks.

/**
 * Test the
 * {@link InputOutputInformationProvider#getDisks(InputOutputAnalysisModule)}
 * method
 */
@Test
public void testGetDisks() {
    InputOutputAnalysisModule module = setUp(fTestCase.getTraceFileName());
    Collection<Disk> disks = InputOutputInformationProvider.getDisks(module);
    assertEquals(fDiskCount, disks.size());
}
Also used : InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) Disk(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.Disk) Test(org.junit.Test)

Aggregations

InputOutputAnalysisModule (org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule)11 NonNull (org.eclipse.jdt.annotation.NonNull)6 Test (org.junit.Test)6 Disk (org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.Disk)3 ITmfStateSystem (org.eclipse.tracecompass.statesystem.core.ITmfStateSystem)2 ITmfTrace (org.eclipse.tracecompass.tmf.core.trace.ITmfTrace)2 IPath (org.eclipse.core.runtime.IPath)1 IStatus (org.eclipse.core.runtime.IStatus)1 KernelAnalysisModule (org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule)1 PunctualInfo (org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase.PunctualInfo)1 DiskInfo (org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.DiskInfo)1 SectorCountInfo (org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.SectorCountInfo)1 TmfXmlKernelTraceStub (org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.trace.TmfXmlKernelTraceStub)1 DisksIODataProvider (org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.DisksIODataProvider)1 TmfTraceException (org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException)1 TmfTraceOpenedSignal (org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal)1 TmfTrace (org.eclipse.tracecompass.tmf.core.trace.TmfTrace)1