summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src
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-compute/opendc-compute-simulator/src
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-compute/opendc-compute-simulator/src')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
index f08a7e1e..89016c55 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
@@ -112,7 +112,7 @@ public class SimHost(
*/
public val hypervisor: SimHypervisor = hypervisor.create(
interpreter,
- object : SimHypervisor.Listener {
+ listener = object : SimHypervisor.Listener {
override fun onSliceFinish(
hypervisor: SimHypervisor,
requestedWork: Long,