summaryrefslogtreecommitdiff
path: root/opendc-format
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-format')
-rw-r--r--opendc-format/build.gradle.kts51
-rw-r--r--opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt38
-rw-r--r--opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt55
-rw-r--r--opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt37
-rw-r--r--opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt46
5 files changed, 0 insertions, 227 deletions
diff --git a/opendc-format/build.gradle.kts b/opendc-format/build.gradle.kts
deleted file mode 100644
index 68f9aa5d..00000000
--- a/opendc-format/build.gradle.kts
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2019 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.
- */
-
-/* Build configuration */
-apply(from = "../gradle/kotlin.gradle")
-plugins {
- `java-library`
-}
-
-/* Project configuration */
-repositories {
- jcenter()
-}
-
-val junitJupiterVersion: String by extra
-val junitPlatformVersion: String by extra
-
-dependencies {
- api(project(":odcsim-core"))
- api(project(":opendc-core"))
-
- implementation(kotlin("stdlib"))
-
- testImplementation(project(":odcsim-testkit"))
- testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
- testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
- testImplementation("org.junit.platform:junit-platform-launcher:$junitPlatformVersion")
- testRuntimeOnly("org.slf4j:slf4j-simple:1.7.25")
- testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0")
-}
diff --git a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt b/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt
deleted file mode 100644
index 0ba3ae25..00000000
--- a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2019 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 com.atlarge.opendc.format.environment
-
-import com.atlarge.opendc.model.Environment
-import java.io.Closeable
-
-/**
- * An interface for reading descriptions of datacenter environments into memory as [Environment].
- */
-interface EnvironmentReader : Closeable {
- /**
- * Read the description of the datacenter environment as [Environment].
- */
- fun read(): Environment
-}
diff --git a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt b/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt
deleted file mode 100644
index cf0ab526..00000000
--- a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2019 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 com.atlarge.opendc.format.trace
-
-import com.atlarge.odcsim.Instant
-import com.atlarge.opendc.model.workload.Workload
-
-/**
- * An entry in a workload trace.
- *
- * @param T The shape of the workload in this entry.
- */
-interface TraceEntry<T : Workload> {
- /**
- * The time of submission of the workload.
- */
- val submissionTime: Instant
-
- /**
- * The workload in this trace entry.
- */
- val workload: T
-
- /**
- * Extract the submission time from this entry.
- */
- operator fun component1() = submissionTime
-
- /**
- * Extract the workload from this entry.
- */
- operator fun component2() = workload
-}
diff --git a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt b/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt
deleted file mode 100644
index af8b272d..00000000
--- a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2019 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 com.atlarge.opendc.format.trace
-
-import com.atlarge.opendc.model.workload.Workload
-import java.io.Closeable
-
-/**
- * An interface for reading [Workload]s into memory.
- *
- * This interface must guarantee that the entries are delivered in order of submission time.
- *
- * @param T The shape of the workloads supported by this reader.
- */
-interface TraceReader<T : Workload> : Iterator<TraceEntry<T>>, Closeable
diff --git a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt b/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt
deleted file mode 100644
index b5424fd2..00000000
--- a/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2019 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 com.atlarge.opendc.format.trace
-
-import com.atlarge.odcsim.Instant
-import com.atlarge.opendc.model.workload.Workload
-import java.io.Closeable
-
-/**
- * An interface for persisting workload traces (e.g. to disk).
- *
- * @param T The type of [Workload] supported by this writer.
- */
-interface TraceWriter<T : Workload> : Closeable {
- /**
- * Write an entry to the trace.
- *
- * Entries must be written in order of submission time. Failing to do so results in a [IllegalArgumentException].
- *
- * @param submissionTime The time of submission of the workload.
- * @param workload The workload to write to the trace.
- */
- fun write(submissionTime: Instant, workload: T)
-}