From 5de05ebfbf46b7daabf0bd15a25ff7b5b9eb5aaa Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 11 Mar 2020 16:17:39 +0100 Subject: Make VM ID in trace reader random to allow for duplicates --- .../kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'opendc/opendc-format/src') diff --git a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt index 70f56165..498f147f 100644 --- a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt +++ b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt @@ -57,7 +57,7 @@ class Sc20TraceReader( * Initialize the reader. */ init { - val entries = mutableMapOf>() + val entries = mutableMapOf>() val timestampCol = 0 val cpuUsageCol = 1 @@ -122,7 +122,7 @@ class Sc20TraceReader( } } - val uuid = UUID(0L, vmId.hashCode().toLong()) + val uuid = UUID.randomUUID() val relevantPerformanceInterferenceModelItems = PerformanceInterferenceModel( performanceInterferenceModel.items.filter { it.workloadIds.contains(uuid) }.toSet() @@ -139,7 +139,7 @@ class Sc20TraceReader( requiredMemory ) ) - entries[vmId] = TraceEntryImpl( + entries[uuid] = TraceEntryImpl( flopsHistory.firstOrNull()?.tick ?: -1, vmWorkload ) -- cgit v1.2.3