summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-09-23 12:27:09 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-09-23 12:27:09 +0200
commit3d5eb562227dcad5a8a60f31b96e6d68f7774fb2 (patch)
treee99c4bf7e5647341c1e269797f7f46099753436f /opendc-web/opendc-web-runner/src/main
parentd97356cf696dedb6c26fc42d9d7c44a977264dcd (diff)
refactor(compute): Provide access to instances in compute service
This change updates the interface of `ComputeService` to provide access to the instances (servers) that have been registered with the compute service. This allows metric collectors to query the metrics of the servers that are currently running.
Diffstat (limited to 'opendc-web/opendc-web-runner/src/main')
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
index 570920f3..9a1319b6 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
@@ -23,7 +23,6 @@
package org.opendc.web.runner
import mu.KotlinLogging
-import org.opendc.compute.api.Server
import org.opendc.compute.workload.*
import org.opendc.compute.workload.telemetry.ComputeMetricReader
import org.opendc.compute.workload.topology.HostSpec
@@ -222,14 +221,13 @@ public class OpenDCRunner(
computeScheduler,
seed = 0L,
)
- val servers = mutableListOf<Server>()
- val reader = ComputeMetricReader(this, clock, simulator.service, servers, monitor)
+ val reader = ComputeMetricReader(this, clock, simulator.service, monitor)
try {
// Instantiate the topology onto the simulator
simulator.apply(topology)
// Run workload trace
- simulator.run(vms, servers, failureModel = failureModel, interference = phenomena.interference)
+ simulator.run(vms, failureModel = failureModel, interference = phenomena.interference)
val serviceMetrics = simulator.service.getSchedulerStats()
logger.debug {