summaryrefslogtreecommitdiff
path: root/opendc-trace/opendc-trace-api/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-04-22 21:55:32 +0200
committerGitHub <noreply@github.com>2022-04-22 21:55:32 +0200
commita7a5362c52274e4fef377cf68b53b4399679d304 (patch)
tree91b01df54833017b94e5a1b2d43dd1dfcbf29c62 /opendc-trace/opendc-trace-api/src
parent0f1be7a820d5e3b279e68209a5bb6219d176b732 (diff)
parentb6698d96fb1313909705604be2daf1170ea40d68 (diff)
merge: Improve discovery of interference models (#76)
This pull request intends to improve discovery of interference models. Previously, interference models were not tied to the workload trace, meaning they had to be resolved separately from the workload trace. In reality, the interference model is always tied to the particular workload trace. With this pull request, we integrate the interference model into the `odcvm` trace format and make it available through the `opendc-trace` library. This has as additional benefit that we can support different interference formats in the future using the same API. Furthermore, this change allows us to ship the interference model with the workload traces and resolve them automatically in the future using some form of package manager. ## Implementation Notes :hammer_and_pick: * Incorporate interference model in trace format * Load interference model via trace library * Move conventions into separate package ## External Dependencies :four_leaf_clover: * N/A ## Breaking API Changes :warning: * `VmInterferenceModelReader` has been removed from `opendc-compute-workload` * Table and column conventions have been moved in `org.opendc.trace.conv` package
Diffstat (limited to 'opendc-trace/opendc-trace-api/src')
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/InterferenceGroupColumns.kt45
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceColumns.kt (renamed from opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt)6
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceStateColumns.kt (renamed from opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceStateColumns.kt)6
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TableColumns.kt (renamed from opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableColumns.kt)0
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/Tables.kt (renamed from opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Tables.kt)9
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TaskColumns.kt (renamed from opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TaskColumns.kt)6
6 files changed, 64 insertions, 8 deletions
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/InterferenceGroupColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/InterferenceGroupColumns.kt
new file mode 100644
index 00000000..532f6d24
--- /dev/null
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/InterferenceGroupColumns.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+
+@file:JvmName("InterferenceGroupColumns")
+package org.opendc.trace.conv
+
+import org.opendc.trace.TableColumn
+import org.opendc.trace.column
+
+/**
+ * Members of the interference group.
+ */
+@JvmField
+public val INTERFERENCE_GROUP_MEMBERS: TableColumn<Set<String>> = column("interference_group:members")
+
+/**
+ * Target load after which the interference occurs.
+ */
+@JvmField
+public val INTERFERENCE_GROUP_TARGET: TableColumn<Double> = column("interference_group:target")
+
+/**
+ * Performance score when the interference occurs.
+ */
+@JvmField
+public val INTERFERENCE_GROUP_SCORE: TableColumn<Double> = column("interference_group:score")
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceColumns.kt
index f1977945..e9fc5d44 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceColumns.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 AtLarge Research
+ * Copyright (c) 2022 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
@@ -21,8 +21,10 @@
*/
@file:JvmName("ResourceColumns")
-package org.opendc.trace
+package org.opendc.trace.conv
+import org.opendc.trace.TableColumn
+import org.opendc.trace.column
import java.time.Instant
/**
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceStateColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceStateColumns.kt
index 244352ae..d5bbafd7 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceStateColumns.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/ResourceStateColumns.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 AtLarge Research
+ * Copyright (c) 2022 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
@@ -21,8 +21,10 @@
*/
@file:JvmName("ResourceStateColumns")
-package org.opendc.trace
+package org.opendc.trace.conv
+import org.opendc.trace.TableColumn
+import org.opendc.trace.column
import java.time.Duration
import java.time.Instant
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TableColumns.kt
index 31a58360..31a58360 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableColumns.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TableColumns.kt
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Tables.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/Tables.kt
index bb9d93e2..669ebe58 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Tables.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/Tables.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 AtLarge Research
+ * Copyright (c) 2022 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
@@ -21,7 +21,7 @@
*/
@file:JvmName("Tables")
-package org.opendc.trace
+package org.opendc.trace.conv
/**
* A table containing all workflows in a workload.
@@ -42,3 +42,8 @@ public const val TABLE_RESOURCES: String = "resources"
* A table containing all resource states in a workload.
*/
public const val TABLE_RESOURCE_STATES: String = "resource_states"
+
+/**
+ * A table containing the groups of resources that interfere when run on the same execution platform.
+ */
+public const val TABLE_INTERFERENCE_GROUPS: String = "interference_groups"
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TaskColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TaskColumns.kt
index d103bce4..397c0794 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TaskColumns.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/conv/TaskColumns.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 AtLarge Research
+ * Copyright (c) 2022 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
@@ -21,8 +21,10 @@
*/
@file:JvmName("TaskColumns")
-package org.opendc.trace
+package org.opendc.trace.conv
+import org.opendc.trace.TableColumn
+import org.opendc.trace.column
import java.time.Duration
import java.time.Instant