diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-10-03 17:41:59 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-10-04 16:35:21 +0200 |
| commit | 136c1b9ddc7bd9331d3552d681e9190fc6198271 (patch) | |
| tree | 19a04e730d93969542f726084444b9e7f13a7b8d /simulator/opendc-format/src/test | |
| parent | c8567a567348e13c341bf1a1ec64ed34ce25815a (diff) | |
Migrate codebase to opendc-simulator-compute
This change updates the remainder of the codebase to use the
opendc-simulator-compute module for the simulation of workloads.
Diffstat (limited to 'simulator/opendc-format/src/test')
| -rw-r--r-- | simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt index 40132ad3..78066c61 100644 --- a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt +++ b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt @@ -24,6 +24,8 @@ package org.opendc.format.trace.swf import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test +import org.opendc.compute.core.image.SimWorkloadImage +import org.opendc.simulator.compute.workload.SimTraceWorkload import java.io.File class SwfTraceReaderTest { @@ -33,13 +35,13 @@ class SwfTraceReaderTest { var entry = reader.next() assertEquals(0, entry.submissionTime) // 1961 slices for waiting, 3 full and 1 partial running slices - assertEquals(1965, entry.workload.image.flopsHistory.toList().size) + assertEquals(1965, ((entry.workload.image as SimWorkloadImage).workload as SimTraceWorkload).trace.toList().size) entry = reader.next() assertEquals(164472, entry.submissionTime) // 1188 slices for waiting, 0 full and 1 partial running slices - assertEquals(1189, entry.workload.image.flopsHistory.toList().size) - assertEquals(5_100_000L, entry.workload.image.flopsHistory.toList().last().flops) - assertEquals(0.25, entry.workload.image.flopsHistory.toList().last().usage) + assertEquals(1189, ((entry.workload.image as SimWorkloadImage).workload as SimTraceWorkload).trace.toList().size) + assertEquals(5_100_000L, ((entry.workload.image as SimWorkloadImage).workload as SimTraceWorkload).trace.toList().last().flops) + assertEquals(0.25, ((entry.workload.image as SimWorkloadImage).workload as SimTraceWorkload).trace.toList().last().usage) } } |
