From 3d5eb562227dcad5a8a60f31b96e6d68f7774fb2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 23 Sep 2022 12:27:09 +0200 Subject: 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. --- .../src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'opendc-web') 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() - 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 { -- cgit v1.2.3