diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2024-08-27 10:57:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 10:57:41 +0200 |
| commit | c21708013f2746807f5bdb3fc47c2b47ed15b7c8 (patch) | |
| tree | af157beacd07154f626962dcca9b0408aced778d /opendc-compute/opendc-compute-failure/src | |
| parent | f9ffdfb29a3f08ac11e739494e754c81ef4f5157 (diff) | |
Updated SimTrace to use a single ArrayDeque instead of three separate lists for deadline, cpuUsage, and coreCount (#245)
Diffstat (limited to 'opendc-compute/opendc-compute-failure/src')
| -rw-r--r-- | opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt b/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt index 85138025..7b86df07 100644 --- a/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt +++ b/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt @@ -43,7 +43,8 @@ public class StartStopHostFault( for (host in victims) { val servers = host.instances - val snapshots = servers.map { (it.meta["workload"] as SimWorkload).snapshot() } + val sortedServers = servers.sortedBy { it.name } + val snapshots = sortedServers.map { (it.meta["workload"] as SimWorkload).snapshot() } host.fail() for ((server, snapshot) in servers.zip(snapshots)) { |
