diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-28 11:55:41 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-28 12:03:39 +0200 |
| commit | 788c007599ac61a41460589f65454aac1857eb81 (patch) | |
| tree | 3d2cc6cb9f72be84c89e8dc154f10f3b828d58f4 /opendc-experiments/opendc-experiments-workflow | |
| parent | 3528091684f610d80fcebb5b730d3a201e79a99a (diff) | |
refactor(sim/compute): Provide workload constructors in SimWorkloads
This change introduces a new class SimWorkloads which provides
construction methods for the standard workloads available in OpenDC.
Diffstat (limited to 'opendc-experiments/opendc-experiments-workflow')
| -rw-r--r-- | opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt b/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt index 4dc3a775..b622362a 100644 --- a/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt +++ b/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt @@ -27,7 +27,7 @@ package org.opendc.experiments.workflow import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch -import org.opendc.simulator.compute.workload.SimFlopsWorkload +import org.opendc.simulator.compute.workload.SimWorkloads import org.opendc.trace.Trace import org.opendc.trace.conv.TABLE_TASKS import org.opendc.trace.conv.TASK_ALLOC_NCPUS @@ -74,7 +74,7 @@ public fun Trace.toJobs(): List<Job> { val submitTime = reader.getInstant(TASK_SUBMIT_TIME)!! val runtime = reader.getDuration(TASK_RUNTIME)!! val flops: Long = 4000 * runtime.seconds * grantedCpus - val workload = SimFlopsWorkload(flops, 1.0) + val workload = SimWorkloads.flops(flops, 1.0) val task = Task( UUID(0L, id), "<unnamed>", |
