From c21708013f2746807f5bdb3fc47c2b47ed15b7c8 Mon Sep 17 00:00:00 2001 From: Dante Niewenhuis Date: Tue, 27 Aug 2024 10:57:41 +0200 Subject: Updated SimTrace to use a single ArrayDeque instead of three separate lists for deadline, cpuUsage, and coreCount (#245) --- .../kotlin/org/opendc/compute/failure/hostfault/StartStopHostFault.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opendc-compute') 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)) { -- cgit v1.2.3