summaryrefslogtreecommitdiff
path: root/simulator/opendc-format/src
diff options
context:
space:
mode:
Diffstat (limited to 'simulator/opendc-format/src')
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt)30
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt)37
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt)32
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt)4
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt)4
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt)2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt)37
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt)39
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt)2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt)14
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt)20
-rw-r--r--simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt23
-rw-r--r--simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt45
20 files changed, 230 insertions, 163 deletions
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt
index 570b936d..dd1f8edb 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment
+package org.opendc.format.environment
-import com.atlarge.opendc.core.Environment
import kotlinx.coroutines.CoroutineScope
+import org.opendc.core.Environment
import java.io.Closeable
import java.time.Clock
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt
index f3e70982..c313467f 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.format.environment.sc18
+/*
+ * Copyright (c) 2020 AtLarge Research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package org.opendc.format.environment.sc18
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
index 188d9fd8..16bb92c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,26 +20,26 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc18
+package org.opendc.format.environment.sc18
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.InputStream
import java.time.Clock
-import java.util.UUID
+import java.util.*
/**
* A parser for the JSON experiment setup files used for the SC18 paper: "A Reference Architecture for Topology
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt
index 0a8f1c14..58af8453 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.format.environment.sc20
+/*
+ * Copyright (c) 2020 AtLarge Research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package org.opendc.format.environment.sc20
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
index d7845081..2232b548 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,28 +20,27 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc20
-
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.NODE_CLUSTER
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.power.LinearLoadPowerModel
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
+package org.opendc.format.environment.sc20
+
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.NODE_CLUSTER
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.power.LinearLoadPowerModel
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.time.Clock
-import java.util.Random
-import java.util.UUID
+import java.util.*
/**
* A [EnvironmentReader] for the internal environment format.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
index adfa1cf0..74afd8c4 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,27 +20,27 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc20
+package org.opendc.format.environment.sc20
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.power.LinearLoadPowerModel
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.power.LinearLoadPowerModel
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.InputStream
import java.time.Clock
-import java.util.UUID
+import java.util.*
/**
* A parser for the JSON experiment setup files used for the SC20 paper.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt
index 407bc0b4..768974e1 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
import java.io.Closeable
import kotlin.random.Random
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt
index d4ad33f7..d532ab35 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt
@@ -22,9 +22,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
/**
* An entry in a workload trace.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt
index 6d29cdb4..81c1294a 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
import java.io.Closeable
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt
index 94ee6f31..56b1b025 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt
@@ -22,9 +22,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
import java.io.Closeable
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt
index 7caebb76..7f9e9960 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
import java.io.Closeable
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
index 6ee43b6a..26c599c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,20 +20,20 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.bitbrains
+package org.opendc.format.trace.bitbrains
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
/**
* A [TraceReader] for the public VM workload trace format.
@@ -104,7 +102,15 @@ class BitbrainsTraceReader(
flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores))
} else {
if (flopsHistory.last().flops != flops) {
- flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores))
+ flopsHistory.add(
+ FlopsHistoryFragment(
+ timestamp,
+ flops,
+ traceInterval,
+ cpuUsage,
+ cores
+ )
+ )
} else {
val oldFragment = flopsHistory.removeAt(flopsHistory.size - 1)
flopsHistory.add(
@@ -125,7 +131,8 @@ class BitbrainsTraceReader(
val relevantPerformanceInterferenceModelItems =
PerformanceInterferenceModel(
- performanceInterferenceModel.items.filter { it.workloadNames.contains(vmId.toString()) }.toSortedSet()
+ performanceInterferenceModel.items.filter { it.workloadNames.contains(vmId.toString()) }
+ .toSortedSet()
)
val vmWorkload = VmWorkload(
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
index 6db3975e..4382e0b5 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,19 +20,36 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.gwf
+package org.opendc.format.trace.gwf
-import com.atlarge.opendc.compute.core.image.FlopsApplicationImage
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
-import com.atlarge.opendc.workflows.workload.Job
-import com.atlarge.opendc.workflows.workload.Task
-import com.atlarge.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
+import org.opendc.compute.core.image.FlopsApplicationImage
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
+import org.opendc.workflows.workload.Job
+import org.opendc.workflows.workload.Task
+import org.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
import java.io.BufferedReader
import java.io.File
import java.io.InputStream
-import java.util.UUID
+import java.util.*
+import kotlin.collections.HashSet
+import kotlin.collections.Iterator
+import kotlin.collections.List
+import kotlin.collections.MutableSet
+import kotlin.collections.component1
+import kotlin.collections.component2
+import kotlin.collections.emptyMap
+import kotlin.collections.filter
+import kotlin.collections.forEach
+import kotlin.collections.getOrPut
+import kotlin.collections.map
+import kotlin.collections.mapIndexed
+import kotlin.collections.mapOf
+import kotlin.collections.mutableMapOf
+import kotlin.collections.set
+import kotlin.collections.sortedBy
+import kotlin.collections.toMap
import kotlin.math.max
import kotlin.math.min
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
index ade47e1b..0da1f7c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
@@ -1,4 +1,4 @@
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
internal data class PerformanceInterferenceEntry(
val vms: List<String>,
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
index 0e8e1fd2..0ab7d035 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,16 +20,16 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModelItem
-import com.atlarge.opendc.format.trace.PerformanceInterferenceModelReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.PerformanceInterferenceModelItem
+import org.opendc.format.trace.PerformanceInterferenceModelReader
import java.io.InputStream
-import java.util.TreeSet
+import java.util.*
import kotlin.random.Random
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
index 28dc7793..e26e59a8 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,20 +20,20 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
import kotlin.math.max
import kotlin.math.min
import kotlin.random.Random
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
index 5295ae03..93428d49 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.format.trace.VmPlacementReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
+import org.opendc.format.trace.VmPlacementReader
import java.io.InputStream
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
index f7c74562..6fb29a03 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,18 +20,18 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.swf
+package org.opendc.format.trace.swf
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
/**
* A [TraceReader] for reading SWF traces into VM-modeled workloads.
diff --git a/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt
deleted file mode 100644
index 41ad8aba..00000000
--- a/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.atlarge.opendc.format.trace.swf
-
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
-import java.io.File
-
-class SwfTraceReaderTest {
- @Test
- internal fun testParseSwf() {
- val reader = SwfTraceReader(File(SwfTraceReaderTest::class.java.getResource("/swf_trace.txt").toURI()))
- var entry = reader.next()
- assertEquals(0, entry.submissionTime)
- // 1961 slices for waiting, 3 full and 1 partial running slices
- assertEquals(1965, entry.workload.image.flopsHistory.toList().size)
-
- entry = reader.next()
- assertEquals(164472, entry.submissionTime)
- // 1188 slices for waiting, 0 full and 1 partial running slices
- assertEquals(1189, entry.workload.image.flopsHistory.toList().size)
- assertEquals(5_100_000L, entry.workload.image.flopsHistory.toList().last().flops)
- assertEquals(0.25, entry.workload.image.flopsHistory.toList().last().usage)
- }
-}
diff --git a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
new file mode 100644
index 00000000..40132ad3
--- /dev/null
+++ b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2020 AtLarge Research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package org.opendc.format.trace.swf
+
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+import java.io.File
+
+class SwfTraceReaderTest {
+ @Test
+ internal fun testParseSwf() {
+ val reader = SwfTraceReader(File(SwfTraceReaderTest::class.java.getResource("/swf_trace.txt").toURI()))
+ var entry = reader.next()
+ assertEquals(0, entry.submissionTime)
+ // 1961 slices for waiting, 3 full and 1 partial running slices
+ assertEquals(1965, entry.workload.image.flopsHistory.toList().size)
+
+ entry = reader.next()
+ assertEquals(164472, entry.submissionTime)
+ // 1188 slices for waiting, 0 full and 1 partial running slices
+ assertEquals(1189, entry.workload.image.flopsHistory.toList().size)
+ assertEquals(5_100_000L, entry.workload.image.flopsHistory.toList().last().flops)
+ assertEquals(0.25, entry.workload.image.flopsHistory.toList().last().usage)
+ }
+}