summaryrefslogtreecommitdiff
path: root/simulator/opendc-compute
diff options
context:
space:
mode:
Diffstat (limited to 'simulator/opendc-compute')
-rw-r--r--simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt12
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt2
2 files changed, 8 insertions, 6 deletions
diff --git a/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt b/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt
index 62808b4d..18255922 100644
--- a/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt
+++ b/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt
@@ -47,7 +47,7 @@ import kotlin.math.max
* @param context The [CoroutineContext] to use.
* @param clock The clock instance to keep track of time.
*/
-public class ComputeServiceImpl(
+internal class ComputeServiceImpl(
private val context: CoroutineContext,
private val clock: Clock,
private val tracer: EventTracer,
@@ -104,11 +104,11 @@ public class ComputeServiceImpl(
*/
private val servers = mutableMapOf<UUID, InternalServer>()
- public var submittedVms: Int = 0
- public var queuedVms: Int = 0
- public var runningVms: Int = 0
- public var finishedVms: Int = 0
- public var unscheduledVms: Int = 0
+ private var submittedVms: Int = 0
+ private var queuedVms: Int = 0
+ private var runningVms: Int = 0
+ private var finishedVms: Int = 0
+ private var unscheduledVms: Int = 0
private var maxCores = 0
private var maxMemory = 0L
diff --git a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
index 3c4b4410..2e4191cc 100644
--- a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
@@ -207,6 +207,8 @@ public class SimHost(
_state = HostState.DOWN
}
+ override fun toString(): String = "SimHost[uid=$uid,name=$name,model=$model]"
+
/**
* Convert flavor to machine model.
*/