summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src/main')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt4
1 files changed, 2 insertions, 2 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 00f2acb3..624a612f 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
@@ -96,7 +96,7 @@ public class SimHost(
private val model: HostModel =
HostModel(
- machine.model.cpus.sumOf { it.frequency * it.node.coreCount },
+ machine.model.cpus.sumOf { it.frequency },
machine.model.cpus.size,
machine.model.cpus.sumOf { it.node.coreCount },
machine.model.memory.sumOf { it.size },
@@ -364,7 +364,7 @@ public class SimHost(
private var localUptime = 0L
private var localDowntime = 0L
private var localBootTime: Instant? = null
- private val localCpuLimit = machine.model.cpus.sumOf { it.frequency }
+ private val localCpuLimit = machine.model.cpus.sumOf { it.frequency * it.node.coreCount }
/**
* Helper function to track the uptime of a machine.