summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-compute/src/test
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-02 13:03:10 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-02 15:49:07 +0200
commitcc87c9ad0b8e4ed3fa4fbad4ab94c5e53948ef3c (patch)
tree297cfbd39a197ce27016eec869cde1f374453f32 /opendc-simulator/opendc-simulator-compute/src/test
parent9e5e830e15b74f040708e98c09ea41cd96d13871 (diff)
simulator: Add uniform interface for resource metrics
This change adds a new interface to the resources library for accessing metrics of resources such as work, demand and overcommitted work. With this change, we do not need an implementation specific listener interface in SimResourceSwitchMaxMin anymore. Another benefit of this approach is that updates will be scheduled more efficiently and progress will only be reported once the system has reached a steady-state for that timestamp.
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src/test')
-rw-r--r--opendc-simulator/opendc-simulator-compute/src/test/kotlin/org/opendc/simulator/compute/SimHypervisorTest.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/test/kotlin/org/opendc/simulator/compute/SimHypervisorTest.kt b/opendc-simulator/opendc-simulator-compute/src/test/kotlin/org/opendc/simulator/compute/SimHypervisorTest.kt
index c1b5089c..1709cc23 100644
--- a/opendc-simulator/opendc-simulator-compute/src/test/kotlin/org/opendc/simulator/compute/SimHypervisorTest.kt
+++ b/opendc-simulator/opendc-simulator-compute/src/test/kotlin/org/opendc/simulator/compute/SimHypervisorTest.kt
@@ -96,7 +96,7 @@ internal class SimHypervisorTest {
val platform = SimResourceInterpreter(coroutineContext, clock)
val machine = SimBareMetalMachine(platform, model, PerformanceScalingGovernor(), SimpleScalingDriver(ConstantPowerModel(0.0)))
- val hypervisor = SimFairShareHypervisor(platform, listener)
+ val hypervisor = SimFairShareHypervisor(platform, null, listener)
launch {
machine.run(hypervisor)
@@ -171,7 +171,7 @@ internal class SimHypervisorTest {
platform, model, PerformanceScalingGovernor(),
SimpleScalingDriver(ConstantPowerModel(0.0))
)
- val hypervisor = SimFairShareHypervisor(platform, listener)
+ val hypervisor = SimFairShareHypervisor(platform, null, listener)
launch {
machine.run(hypervisor)