summaryrefslogtreecommitdiff
path: root/opendc-experiments/opendc-experiments-capelin/src/test
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-experiments/opendc-experiments-capelin/src/test
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-experiments/opendc-experiments-capelin/src/test')
-rw-r--r--opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt22
1 files changed, 8 insertions, 14 deletions
diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
index bf8c2758..eae3c993 100644
--- a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
+++ b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
@@ -26,7 +26,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
-import org.opendc.compute.api.Server
import org.opendc.compute.service.scheduler.FilterScheduler
import org.opendc.compute.service.scheduler.filters.ComputeFilter
import org.opendc.compute.service.scheduler.filters.RamFilter
@@ -90,13 +89,11 @@ class CapelinIntegrationTest {
seed,
)
val topology = createTopology()
-
- val servers = mutableListOf<Server>()
- val reader = ComputeMetricReader(this, clock, runner.service, servers, monitor)
+ val reader = ComputeMetricReader(this, clock, runner.service, monitor)
try {
runner.apply(topology)
- runner.run(workload, servers)
+ runner.run(workload)
val serviceMetrics = runner.service.getSchedulerStats()
println(
@@ -140,12 +137,11 @@ class CapelinIntegrationTest {
seed,
)
val topology = createTopology("single")
- val servers = mutableListOf<Server>()
- val reader = ComputeMetricReader(this, clock, runner.service, servers, monitor)
+ val reader = ComputeMetricReader(this, clock, runner.service, monitor)
try {
runner.apply(topology)
- runner.run(workload, servers)
+ runner.run(workload)
val serviceMetrics = runner.service.getSchedulerStats()
println(
@@ -186,12 +182,11 @@ class CapelinIntegrationTest {
seed
)
val topology = createTopology("single")
- val servers = mutableListOf<Server>()
- val reader = ComputeMetricReader(this, clock, simulator.service, servers, monitor)
+ val reader = ComputeMetricReader(this, clock, simulator.service, monitor)
try {
simulator.apply(topology)
- simulator.run(workload, servers, interference = true)
+ simulator.run(workload, interference = true)
val serviceMetrics = simulator.service.getSchedulerStats()
println(
@@ -230,12 +225,11 @@ class CapelinIntegrationTest {
)
val topology = createTopology("single")
val workload = createTestWorkload(0.25, seed)
- val servers = mutableListOf<Server>()
- val reader = ComputeMetricReader(this, clock, simulator.service, servers, monitor)
+ val reader = ComputeMetricReader(this, clock, simulator.service, monitor)
try {
simulator.apply(topology)
- simulator.run(workload, servers, failureModel = grid5000(Duration.ofDays(7)))
+ simulator.run(workload, failureModel = grid5000(Duration.ofDays(7)))
val serviceMetrics = simulator.service.getSchedulerStats()
println(