summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-08-18 14:40:28 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-08-24 11:48:26 +0200
commit97a28129e4638f601864a08f483908907b9026e6 (patch)
treededc619bb5220a7e951f1bb0550500d4e55ff6cb
parent1af7b83695d997381163f2b72c67ed26d5b4891f (diff)
fix(capelin): Update Bitbrains trace tests
This change updates the Bitbrains trace tests with the updated trace that does not hardcode the duration of the trace fragments.
-rw-r--r--opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt6
-rw-r--r--opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt12
-rw-r--r--opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/meta.parquetbin2148 -> 2081 bytes
-rw-r--r--opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/trace.parquetbin1672463 -> 1647189 bytes
-rw-r--r--opendc-experiments/opendc-experiments-radice/build.gradle.kts48
5 files changed, 57 insertions, 9 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
index 45fdb268..fc96cec8 100644
--- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
+++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
@@ -116,9 +116,9 @@ internal class SimHostTest {
"workload" to SimTraceWorkload(
sequenceOf(
SimTraceWorkload.Fragment(0, duration * 1000, 2 * 28.0, 2),
- SimTraceWorkload.Fragment(duration * 1000L, duration * 1000, 2 * 3100.0, 2),
- SimTraceWorkload.Fragment(duration * 2000L, duration * 1000, 0.0, 2),
- SimTraceWorkload.Fragment(duration * 3000L, duration * 1000, 2 * 73.0, 2)
+ SimTraceWorkload.Fragment(duration * 1000, duration * 1000, 2 * 3100.0, 2),
+ SimTraceWorkload.Fragment(duration * 2000, duration * 1000, 0.0, 2),
+ SimTraceWorkload.Fragment(duration * 3000, duration * 1000, 2 * 73.0, 2)
),
offset = 1
)
diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
index 393fb88d..0437a022 100644
--- a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
+++ b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
@@ -114,9 +114,9 @@ class CapelinIntegrationTest {
{ assertEquals(0, monitorResults.runningVms, "All VMs should finish after a run") },
{ assertEquals(0, monitorResults.unscheduledVms, "No VM should not be unscheduled") },
{ assertEquals(0, monitorResults.queuedVms, "No VM should not be in the queue") },
- { assertEquals(155252275351, monitor.totalRequestedBurst) { "Incorrect requested burst" } },
- { assertEquals(155086837645, monitor.totalGrantedBurst) { "Incorrect granted burst" } },
- { assertEquals(725049, monitor.totalOvercommissionedBurst) { "Incorrect overcommitted burst" } },
+ { assertEquals(219751355711, monitor.totalRequestedBurst) { "Incorrect requested burst" } },
+ { assertEquals(206351165081, monitor.totalGrantedBurst) { "Incorrect granted burst" } },
+ { assertEquals(1148906334, monitor.totalOvercommissionedBurst) { "Incorrect overcommitted burst" } },
{ assertEquals(0, monitor.totalInterferedBurst) { "Incorrect interfered burst" } }
)
}
@@ -151,9 +151,9 @@ class CapelinIntegrationTest {
// Note that these values have been verified beforehand
assertAll(
- { assertEquals(29454904468, monitor.totalRequestedBurst) { "Total requested work incorrect" } },
- { assertEquals(29355293349, monitor.totalGrantedBurst) { "Total granted work incorrect" } },
- { assertEquals(0, monitor.totalOvercommissionedBurst) { "Total overcommitted work incorrect" } },
+ { assertEquals(37954956986, monitor.totalRequestedBurst) { "Total requested work incorrect" } },
+ { assertEquals(34840774250, monitor.totalGrantedBurst) { "Total granted work incorrect" } },
+ { assertEquals(971076806, monitor.totalOvercommissionedBurst) { "Total overcommitted work incorrect" } },
{ assertEquals(0, monitor.totalInterferedBurst) { "Total interfered work incorrect" } }
)
}
diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/meta.parquet b/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/meta.parquet
index ce7a812c..ee76d38f 100644
--- a/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/meta.parquet
+++ b/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/meta.parquet
Binary files differ
diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/trace.parquet b/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/trace.parquet
index 1d7ce882..9b1cde13 100644
--- a/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/trace.parquet
+++ b/opendc-experiments/opendc-experiments-capelin/src/test/resources/trace/trace.parquet
Binary files differ
diff --git a/opendc-experiments/opendc-experiments-radice/build.gradle.kts b/opendc-experiments/opendc-experiments-radice/build.gradle.kts
new file mode 100644
index 00000000..c1515165
--- /dev/null
+++ b/opendc-experiments/opendc-experiments-radice/build.gradle.kts
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2021 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.
+ */
+
+description = "Experiments for the Risk Analysis work"
+
+/* Build configuration */
+plugins {
+ `experiment-conventions`
+ `testing-conventions`
+}
+
+dependencies {
+ api(platform(projects.opendcPlatform))
+ api(projects.opendcHarness.opendcHarnessApi)
+ implementation(projects.opendcFormat)
+ implementation(projects.opendcSimulator.opendcSimulatorCore)
+ implementation(projects.opendcSimulator.opendcSimulatorCompute)
+ implementation(projects.opendcSimulator.opendcSimulatorFailures)
+ implementation(projects.opendcCompute.opendcComputeSimulator)
+ implementation(projects.opendcTelemetry.opendcTelemetrySdk)
+
+ implementation(libs.kotlin.logging)
+ implementation(libs.config)
+ implementation(libs.progressbar)
+ implementation(libs.clikt)
+
+ implementation(libs.parquet)
+ testImplementation(libs.log4j.slf4j)
+}