summaryrefslogtreecommitdiff
path: root/opendc-experiments/opendc-experiments-tf20
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-02-18 16:41:48 +0100
committerGitHub <noreply@github.com>2022-02-18 16:41:48 +0100
commit0cba027933e19254573f2488086db3e4660f93d2 (patch)
tree510659fc8c85fc4a7196d1a769ed2dbcfd4ed787 /opendc-experiments/opendc-experiments-tf20
parentd7c173f0f7b4cb2584a498155519c287abedeae9 (diff)
parentc82b1725cc606769084155d6c4fba982cd320c41 (diff)
merge: Address technical debt in codebase
This pull request removes some of the existing technical debt in the OpenDC codebase. Close #51 ## Implementation Notes :hammer_and_pick: * Add Pacer to pace scheduling cycles. * Rename utils module to common module * Optimize TimerScheduler * Remove opendc-platform module * Disallow duplicate UIDs for SimHost ## Breaking API Changes :warning: * TimerScheduler does not implement `AutoCloseable` anymore.
Diffstat (limited to 'opendc-experiments/opendc-experiments-tf20')
-rw-r--r--opendc-experiments/opendc-experiments-tf20/build.gradle.kts5
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/network/NetworkController.kt4
2 files changed, 4 insertions, 5 deletions
diff --git a/opendc-experiments/opendc-experiments-tf20/build.gradle.kts b/opendc-experiments/opendc-experiments-tf20/build.gradle.kts
index 882c4894..43093abf 100644
--- a/opendc-experiments/opendc-experiments-tf20/build.gradle.kts
+++ b/opendc-experiments/opendc-experiments-tf20/build.gradle.kts
@@ -29,16 +29,15 @@ plugins {
}
dependencies {
- api(platform(projects.opendcPlatform))
api(projects.opendcHarness.opendcHarnessApi)
implementation(projects.opendcSimulator.opendcSimulatorCore)
implementation(projects.opendcSimulator.opendcSimulatorCompute)
implementation(projects.opendcTelemetry.opendcTelemetrySdk)
- implementation(projects.opendcUtils)
+ implementation(projects.opendcCommon)
implementation(libs.kotlin.logging)
implementation(libs.jackson.module.kotlin) {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect")
}
- implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.30")
+ implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.10")
}
diff --git a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/network/NetworkController.kt b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/network/NetworkController.kt
index 9771cc20..7d65a674 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/network/NetworkController.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/network/NetworkController.kt
@@ -23,7 +23,7 @@
package org.opendc.experiments.tf20.network
import kotlinx.coroutines.channels.Channel
-import org.opendc.utils.TimerScheduler
+import org.opendc.common.util.TimerScheduler
import java.time.Clock
import kotlin.coroutines.CoroutineContext
@@ -89,6 +89,6 @@ public class NetworkController(context: CoroutineContext, clock: Clock) : AutoCl
* Stop the network controller.
*/
override fun close() {
- scheduler.close()
+ scheduler.cancelAll()
}
}