summaryrefslogtreecommitdiff
path: root/simulator/opendc-utils
AgeCommit message (Collapse)Author
2021-04-25build: Migrate to flat project structureFabian Mastenbroek
This change updates the project structure to become flattened. Previously, the simulator, frontend and API each lived into their own directory. With this change, all modules of the project live in the top-level directory of the repository. This should improve discoverability of modules of the project.
2021-04-21simulator: Migrate to SimulationCoroutineDispatcherFabian Mastenbroek
This change migrates the remainder of the codebase to the SimulationCoroutineDispatcher implementation.
2021-04-21simulator: Introduce SimulationCoroutineDispatcherFabian Mastenbroek
This change introduces the SimulationCoroutineDispatcher implementation which replaces the TestCoroutineDispatcher for running single-threaded simulations. Previously, we used the TestCoroutineDispatcher from the kotlinx-coroutines-test modules for running simulations. However, this module is aimed at coroutine tests and not at simulations. In particular, having to construct a Clock object each time for the TestCoroutineDispatcher caused a lot of unnecessary lines. With the new approach, the SimulationCoroutineDispatcher automatically exposes a usable Clock object. In addition to ergonomic benefits, the SimulationCoroutineDispatcher is much faster than the TestCoroutineDispatcher due to the assumption that simulations run in only a single thread. As a result, the dispatcher does not need to perform synchronization and can use the fast PriorityQueue implementation.
2021-04-07utils: Prevent use of Intrinsics.areEqual in scheduler hot pathFabian Mastenbroek
This change changes the TimerScheduler implementation to prevent calling Intrinsics.areEqual in the hot path. Profiling shows that especially this call has a high overhead.
2021-04-07utils: Cache variables in TimerScheduler's hot pathsFabian Mastenbroek
This change updates the TimerScheduler implementation to cache several variables in the hot paths of the implementation.
2021-03-27compute: Migrate compute service simulator to OpenTelemetryFabian Mastenbroek
This change updates the compute service simulator to use OpenTelemetry for reporting metrics of the (simulated) hosts as opposed to using custom event flows. This approach is more generic, flexible and possibly offers better performance as we can collect metrics of all services in a single sweep, as opposed to listening to several services and each invoking the handlers.
2021-03-22simulator: Re-design consumer interface to support capacity negotiationFabian Mastenbroek
This change re-designs the SimResourceConsumer interface to support in the future capacity negotiation. This basically means that the consumer will be informed directly when not enough capacity is available, instead of after the deadline specified by the consumer.
2021-03-17simulator: Make hypervisors generic for the resource typeFabian Mastenbroek
This change moves the hypervisor implementations to the opendc-simulator-resources module and makes them generic to the resource type that is being used (e.g., CPU, disk or networking).
2021-03-16utils: Prevent memory leakage in TimerSchedulerFabian Mastenbroek
This change fixes a possible memory leakage issue in TimerScheduler when a large number of timers was scheduled for the same timestamp.
2021-03-16simulator: Add generic framework for resource consumption modelingFabian Mastenbroek
This change adds a generic framework for modeling resource consumptions and adapts opendc-simulator-compute to model machines and VMs on top of this framework. This framework anticipates the addition of additional resource types such as memory, disk and network to the OpenDC codebase.
2021-03-09utils: Remove unused StateFlowFabian Mastenbroek
This change removes the unused StateFlow from the utils module. It has been replaced by the proper implementation in the kotlinx-coroutines library.
2021-03-07compute: Separate cloud compute layer from bare-metal layerFabian Mastenbroek
This change separates the cloud compute layer in OpenDC (e.g., Server) from the bare-metal layer (e.g., Node), such that Node and BareMetalDriver are unaware of the existence of Server and co.
2021-02-23Use Java Platform for shared dependency constraintsFabian Mastenbroek
This change uses the Java Platform functionality from Gradle to enable shared dependency constraints across modules.
2021-02-23Utilize version constraints for shared versionsFabian Mastenbroek
This change updates the Gradle configuration to utilize version constraints to force the same dependency version across modules.
2021-02-23Move dependency versions to gradle.propertiesFabian Mastenbroek
This change moves the version of the dependencies from buildSrc to gradle.properties to prevent recompilation when changing dependency versions.
2021-02-23Extract testing conventions from Kotlin conventionsFabian Mastenbroek
This change extracts the configuration for test from the Kotlin library conventions.
2021-02-23Remove unnecessary dependencies on JUnit Platform LauncherFabian Mastenbroek
This change removes unnecessary dependencies on JUnit Platform launcher from the repository. Previously, the launcher was used to bootstrap tests for Gradle when it did not natively support JUnit Platform. Gradle now has native support for JUnit Platform, so the dependency is not needed anymore.
2021-01-11Convert to pull-based workload modelFabian Mastenbroek
This change converts the low-level workload model to be pull-based. This reduces the overhead that we experienced with our previous co-routine based approach.
2020-10-01Move OpenDC modules into simulator rootFabian Mastenbroek
This change moves the OpenDC modules previously living in the simulator/opendc directory to the simulator directory itself given that we do not make a distinction between OpenDC and odcsim anymore.