summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-10-01 01:55:20 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-10-01 10:19:17 +0200
commita283fac5e4d2a6be229acba191acdcbf7eba6dcd (patch)
tree378ee03042636dde384e4c7eb98aef00f5d3213c
parent8a9f5573bef3f68316add17c04a47cc4e5fe75fa (diff)
Migrate to org.opendc namespace
This change moves the OpenDC simulator codebase to the org.opendc namespace of which we control the domain. Previously, we used the com.atlarge package of which we did not control the domain, which might lead to difficulties in the future.
-rw-r--r--simulator/build.gradle.kts2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/VmImage.kt32
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/VmWorkload.kt25
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/HypervisorView.kt15
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningService.kt42
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AllocationPolicy.kt25
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt15
-rw-r--r--simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt15
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Flavor.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/MemoryUnit.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/MemoryUnit.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingNode.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingNode.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingUnit.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingUnit.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Server.kt)14
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerEvent.kt)8
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerState.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerContext.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerContext.kt)14
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerManagementContext.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerManagementContext.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ShutdownException.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ShutdownException.kt)9
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/EmptyImage.kt)10
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsApplicationImage.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImage.kt)10
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsHistoryFragment.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsHistoryFragment.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/Image.kt)10
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/VmImage.kt54
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/PerformanceInterferenceModel.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/PerformanceInterferenceModel.kt)15
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt47
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Metadata.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Node.kt)12
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeEvent.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeState.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/BareMetalDriver.kt)18
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriver.kt)50
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/power/PowerModels.kt)10
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/ProvisioningService.kt)14
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningService.kt)12
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/Hypervisor.kt)8
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorEvent.kt)10
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorImage.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorImage.kt)16
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimpleVirtDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/SimpleVirtDriver.kt)54
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/VirtDriver.kt)22
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt37
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/SimpleVirtProvisioningService.kt)52
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningEvent.kt)2
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt68
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt50
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt)8
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt37
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt)12
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt37
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt)8
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt)12
-rw-r--r--simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt)28
-rw-r--r--simulator/opendc-compute/src/test/kotlin/org/opendc/compute/core/image/FlopsApplicationImageTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImageTest.kt)2
-rw-r--r--simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt)16
-rw-r--r--simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt)14
-rw-r--r--simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/HypervisorTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt)28
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/Environment.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Environment.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/Identity.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Identity.kt)8
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/Platform.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Platform.kt)8
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/User.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/User.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/Zone.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Zone.kt)10
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/CorrelatedFaultInjector.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/CorrelatedFaultInjector.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FailureDomain.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FailureDomain.kt)2
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FaultInjector.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FaultInjector.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/UncorrelatedFaultInjector.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/UncorrelatedFaultInjector.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/power/PowerModel.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/PowerModel.kt)2
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/power/Powerable.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/Powerable.kt)2
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/Resource.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/Resource.kt)8
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/TagContainer.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/TagContainer.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceKey.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceKey.kt)10
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistry.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistry.kt)6
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistryImpl.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistryImpl.kt)9
-rw-r--r--simulator/opendc-core/src/main/kotlin/org/opendc/core/workload/Workload.kt (renamed from simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/workload/Workload.kt)10
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc18/build.gradle.kts2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/com/atlarge/opendc/experiments/sc18/TestExperiment.kt)30
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/Main.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt)28
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Experiment.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Experiment.kt)20
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/ExperimentHelpers.kt)87
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolio.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolio.kt)14
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolios.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolios.kt)11
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Run.kt)27
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Scenario.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Scenario.kt)16
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Topology.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Topology.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Workload.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Workload.kt)12
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt)18
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt)20
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt)14
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt)10
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentDescriptor.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentDescriptor.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentRunner.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentRunner.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt)16
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt)18
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/Event.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/Event.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/HostEvent.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/HostEvent.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt)2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/RunEvent.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/RunEvent.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/VmEvent.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/VmEvent.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt)10
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt)10
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt)10
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt)22
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt)18
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt)24
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20TraceConverter.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt)18
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/WorkloadSampler.kt)21
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/resources/log4j2.xml11
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt (renamed from simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/com/atlarge/opendc/experiments/sc20/Sc20IntegrationTest.kt)39
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt)30
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt)37
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt)32
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt)4
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt)4
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt)2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt)37
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt)39
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt)2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt)14
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt)24
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt)8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt (renamed from simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt)20
-rw-r--r--simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt23
-rw-r--r--simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt45
-rw-r--r--simulator/opendc-runner-web/build.gradle.kts2
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt (renamed from simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/Main.kt)46
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ResultProcessor.kt (renamed from simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ResultProcessor.kt)24
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ScenarioManager.kt (renamed from simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ScenarioManager.kt)24
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt (renamed from simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/TopologyParser.kt)50
-rw-r--r--simulator/opendc-runner-web/src/main/resources/log4j2.xml9
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/JobState.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/JobState.kt)8
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerListener.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerListener.kt)6
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowService.kt)53
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskState.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskStatus.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskStatus.kt)2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowEvent.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowEvent.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowSchedulerMode.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowSchedulerMode.kt)8
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowService.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowService.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/StagePolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/StagePolicy.kt)8
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt)18
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt)13
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt)19
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt)20
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt)14
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt)10
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt)6
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt)6
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskOrderPolicy.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskOrderPolicy.kt)6
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Job.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Job.kt)12
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Metadata.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Metadata.kt)2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Task.kt (renamed from simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Task.kt)8
-rw-r--r--simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt (renamed from simulator/opendc-workflows/src/test/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt)25
184 files changed, 1514 insertions, 1290 deletions
diff --git a/simulator/build.gradle.kts b/simulator/build.gradle.kts
index 554c8790..b104654b 100644
--- a/simulator/build.gradle.kts
+++ b/simulator/build.gradle.kts
@@ -25,6 +25,6 @@ plugins {
}
allprojects {
- group = "com.atlarge.opendc"
+ group = "org.opendc"
version = "2.0.0"
}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/VmImage.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/VmImage.kt
deleted file mode 100644
index 0e1af093..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/VmImage.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.atlarge.opendc.compute.core.image
-
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.core.resource.TagContainer
-import java.util.UUID
-import kotlin.math.min
-
-class VmImage(
- public override val uid: UUID,
- public override val name: String,
- public override val tags: TagContainer,
- public val flopsHistory: Sequence<FlopsHistoryFragment>,
- public val maxCores: Int,
- public val requiredMemory: Long
-) : Image {
-
- override suspend fun invoke(ctx: ServerContext) {
- var offset = ctx.clock.millis()
-
- val batch = flopsHistory.map { fragment ->
- val cores = min(fragment.cores, ctx.server.flavor.cpuCount)
- val burst = LongArray(cores) { fragment.flops / cores }
- val usage = DoubleArray(cores) { fragment.usage / cores }
- offset += fragment.duration
- ServerContext.Slice(burst, usage, offset)
- }
-
- ctx.run(batch)
- }
-
- override fun toString(): String = "VmImage(uid=$uid, name=$name, cores=$maxCores, requiredMemory=$requiredMemory)"
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/VmWorkload.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/VmWorkload.kt
deleted file mode 100644
index 098eb8ca..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/VmWorkload.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.atlarge.opendc.compute.core.workload
-
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.core.workload.Workload
-import java.util.UUID
-
-/**
- * A workload that represents a VM.
- *
- * @property uid A unique identified of this VM.
- * @property name The name of this VM.
- * @property owner The owner of the VM.
- * @property image The image of the VM.
- */
-data class VmWorkload(
- override val uid: UUID,
- override val name: String,
- override val owner: User,
- val image: VmImage
-) : Workload {
- override fun equals(other: Any?): Boolean = other is VmWorkload && uid == other.uid
-
- override fun hashCode(): Int = uid.hashCode()
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/HypervisorView.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/HypervisorView.kt
deleted file mode 100644
index e52a1698..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/HypervisorView.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.atlarge.opendc.compute.virt.service
-
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import java.util.UUID
-
-class HypervisorView(
- val uid: UUID,
- var server: Server,
- var numberOfActiveServers: Int,
- var availableMemory: Long,
- var provisionedCores: Int
-) {
- lateinit var driver: VirtDriver
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningService.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningService.kt
deleted file mode 100644
index c4cbd711..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningService.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.atlarge.opendc.compute.virt.service
-
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import com.atlarge.opendc.compute.virt.service.allocation.AllocationPolicy
-import kotlinx.coroutines.flow.Flow
-
-/**
- * A service for VM provisioning on a cloud.
- */
-interface VirtProvisioningService {
- /**
- * The policy used for allocating a VM on the available hypervisors.
- */
- val allocationPolicy: AllocationPolicy
-
- /**
- * The events emitted by the service.
- */
- public val events: Flow<VirtProvisioningEvent>
-
- /**
- * Obtain the active hypervisors for this provisioner.
- */
- public suspend fun drivers(): Set<VirtDriver>
-
- /**
- * Submit the specified [Image] to the provisioning service.
- *
- * @param name The name of the server to deploy.
- * @param image The image to be deployed.
- * @param flavor The flavor of the machine instance to run this [image] on.
- */
- public suspend fun deploy(name: String, image: Image, flavor: Flavor): Server
-
- /**
- * Terminate the provisioning service releasing all the leased bare-metal machines.
- */
- public suspend fun terminate()
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AllocationPolicy.kt
deleted file mode 100644
index b7c9388d..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AllocationPolicy.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.atlarge.opendc.compute.virt.service.allocation
-
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
-
-/**
- * A policy for selecting the [Node] an image should be deployed to,
- */
-public interface AllocationPolicy {
- /**
- * The logic of the allocation policy.
- */
- public interface Logic {
- /**
- * Select the node on which the server should be scheduled.
- */
- public fun select(hypervisors: Set<HypervisorView>, image: SimpleVirtProvisioningService.ImageView): HypervisorView?
- }
-
- /**
- * Builds the logic of the policy.
- */
- operator fun invoke(): Logic
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt
deleted file mode 100644
index c081244f..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.atlarge.opendc.compute.virt.service.allocation
-
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-
-/**
- * Allocation policy that selects the node with the most available memory.
- *
- * @param reversed A flag to reverse the order (least amount of memory scores the best).
- */
-public class AvailableMemoryAllocationPolicy(val reversed: Boolean = false) : AllocationPolicy {
- override fun invoke(): AllocationPolicy.Logic = object : ComparableAllocationPolicyLogic {
- override val comparator: Comparator<HypervisorView> = compareBy<HypervisorView> { -it.availableMemory }
- .run { if (reversed) reversed() else this }
- }
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt
deleted file mode 100644
index 7e3e5864..00000000
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.atlarge.opendc.compute.virt.service.allocation
-
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-
-/**
- * Allocation policy that selects the node with the least amount of active servers.
- *
- * @param reversed A flag to reverse the order, such that the node with the most active servers is selected.
- */
-public class NumberOfActiveServersAllocationPolicy(val reversed: Boolean = false) : AllocationPolicy {
- override fun invoke(): AllocationPolicy.Logic = object : ComparableAllocationPolicyLogic {
- override val comparator: Comparator<HypervisorView> = compareBy<HypervisorView> { it.numberOfActiveServers }
- .run { if (reversed) reversed() else this }
- }
-}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Flavor.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt
index a49d3abf..e5ca115f 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Flavor.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
/**
* Flavors define the compute and memory capacity of [Server] instance. To put it simply, a flavor is an available
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/MemoryUnit.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/MemoryUnit.kt
index ce57fc72..f41c41c4 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/MemoryUnit.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/MemoryUnit.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
/**
* A memory unit of a compute resource, either virtual or physical.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingNode.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingNode.kt
index 91f5dde9..23c82816 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingNode.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingNode.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
/**
* A processing node/package/socket containing possibly several CPU cores.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingUnit.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingUnit.kt
index ba148ee0..e6ee7f9a 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ProcessingUnit.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ProcessingUnit.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
/**
* A single logical compute unit of processor node, either virtual or physical.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Server.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt
index 01968cd8..948f622f 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/Server.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,13 +20,13 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.core.resource.Resource
-import com.atlarge.opendc.core.resource.TagContainer
-import com.atlarge.opendc.core.services.ServiceRegistry
import kotlinx.coroutines.flow.Flow
+import org.opendc.compute.core.image.Image
+import org.opendc.core.resource.Resource
+import org.opendc.core.resource.TagContainer
+import org.opendc.core.services.ServiceRegistry
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerEvent.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt
index 1595937c..fbef8a7d 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerEvent.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
-import com.atlarge.opendc.core.services.ServiceKey
+import org.opendc.core.services.ServiceKey
/**
* An event that is emitted by a [Server].
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerState.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt
index 27372a5e..4b9d7c13 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/ServerState.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core
+package org.opendc.compute.core
/**
* An enumeration describing the possible states of a server.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerContext.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerContext.kt
index 817bee4b..3cab94c0 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerContext.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerContext.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,14 +20,14 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.execution
+package org.opendc.compute.core.execution
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.core.services.ServiceKey
import kotlinx.coroutines.selects.SelectClause0
import kotlinx.coroutines.selects.select
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.image.Image
+import org.opendc.core.services.ServiceKey
import java.time.Clock
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerManagementContext.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerManagementContext.kt
index 5a9b725b..51727e43 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ServerManagementContext.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ServerManagementContext.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.execution
+package org.opendc.compute.core.execution
/**
* An extended [ServerContext] providing several methods for managing the execution context.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ShutdownException.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ShutdownException.kt
index e4da557b..d751fb5e 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/execution/ShutdownException.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ShutdownException.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.execution
+package org.opendc.compute.core.execution
import kotlinx.coroutines.CancellationException
@@ -30,7 +28,8 @@ import kotlinx.coroutines.CancellationException
* This exception is thrown by the underlying [ServerContext] to indicate that a shutdown flow
* has been sent to the server.
*/
-public class ShutdownException(message: String? = null, override val cause: Throwable? = null) : CancellationException(message)
+public class ShutdownException(message: String? = null, override val cause: Throwable? = null) :
+ CancellationException(message)
/**
* This method terminates the current active coroutine if the specified [CancellationException] is caused
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/EmptyImage.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt
index 8f6c4682..1f760978 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/EmptyImage.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.image
+package org.opendc.compute.core.image
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.core.resource.TagContainer
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.core.resource.TagContainer
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImage.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsApplicationImage.kt
index d65e7e94..9a95520e 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImage.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsApplicationImage.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.image
+package org.opendc.compute.core.image
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.core.resource.TagContainer
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.core.resource.TagContainer
import java.util.UUID
import kotlin.math.min
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsHistoryFragment.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsHistoryFragment.kt
index 5b0035e3..7097c818 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/FlopsHistoryFragment.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/FlopsHistoryFragment.kt
@@ -1,3 +1,3 @@
-package com.atlarge.opendc.compute.core.image
+package org.opendc.compute.core.image
data class FlopsHistoryFragment(val tick: Long, val flops: Long, val duration: Long, val usage: Double, val cores: Int)
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/Image.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt
index 52d4d7b5..d04920c3 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/image/Image.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.image
+package org.opendc.compute.core.image
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.core.resource.Resource
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.core.resource.Resource
/**
* An image containing a bootable operating system that can directly be executed by physical or virtual server.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/VmImage.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/VmImage.kt
new file mode 100644
index 00000000..b6622fa4
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/VmImage.kt
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.core.image
+
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.core.resource.TagContainer
+import java.util.*
+import kotlin.math.min
+
+class VmImage(
+ public override val uid: UUID,
+ public override val name: String,
+ public override val tags: TagContainer,
+ public val flopsHistory: Sequence<FlopsHistoryFragment>,
+ public val maxCores: Int,
+ public val requiredMemory: Long
+) : Image {
+
+ override suspend fun invoke(ctx: ServerContext) {
+ var offset = ctx.clock.millis()
+
+ val batch = flopsHistory.map { fragment ->
+ val cores = min(fragment.cores, ctx.server.flavor.cpuCount)
+ val burst = LongArray(cores) { fragment.flops / cores }
+ val usage = DoubleArray(cores) { fragment.usage / cores }
+ offset += fragment.duration
+ ServerContext.Slice(burst, usage, offset)
+ }
+
+ ctx.run(batch)
+ }
+
+ override fun toString(): String = "VmImage(uid=$uid, name=$name, cores=$maxCores, requiredMemory=$requiredMemory)"
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/PerformanceInterferenceModel.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/PerformanceInterferenceModel.kt
index 3f885f89..f84366b2 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/core/workload/PerformanceInterferenceModel.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/PerformanceInterferenceModel.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.workload
+package org.opendc.compute.core.workload
-import com.atlarge.opendc.compute.core.Server
+import org.opendc.compute.core.Server
import java.util.*
import kotlin.random.Random
@@ -57,7 +55,12 @@ class PerformanceInterferenceModel(
private fun doesMatch(item: PerformanceInterferenceModelItem): Boolean {
var count = 0
- for (name in item.workloadNames.subSet(colocatedWorkloads.firstKey(), colocatedWorkloads.lastKey() + "\u0000")) {
+ for (
+ name in item.workloadNames.subSet(
+ colocatedWorkloads.firstKey(),
+ colocatedWorkloads.lastKey() + "\u0000"
+ )
+ ) {
count += colocatedWorkloads.getOrDefault(name, 0)
if (count > 1)
return true
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt
new file mode 100644
index 00000000..d8edb416
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.core.workload
+
+import org.opendc.compute.core.image.VmImage
+import org.opendc.core.User
+import org.opendc.core.workload.Workload
+import java.util.UUID
+
+/**
+ * A workload that represents a VM.
+ *
+ * @property uid A unique identified of this VM.
+ * @property name The name of this VM.
+ * @property owner The owner of the VM.
+ * @property image The image of the VM.
+ */
+data class VmWorkload(
+ override val uid: UUID,
+ override val name: String,
+ override val owner: User,
+ val image: VmImage
+) : Workload {
+ override fun equals(other: Any?): Boolean = other is VmWorkload && uid == other.uid
+
+ override fun hashCode(): Int = uid.hashCode()
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Metadata.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt
index a3a851fe..389f4ab9 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Metadata.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal
+package org.opendc.compute.metal
/*
* Common metadata keys for bare-metal nodes.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Node.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt
index 7cb4c0c5..5cb4be1a 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/Node.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal
+package org.opendc.compute.metal
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.core.Identity
import kotlinx.coroutines.flow.Flow
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.image.Image
+import org.opendc.core.Identity
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeEvent.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt
index 7719db24..d367f2e6 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeEvent.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal
+package org.opendc.compute.metal
/**
* An event that is emitted by a [Node].
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeState.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt
index ca9cf509..e76e0b43 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/NodeState.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal
+package org.opendc.compute.metal
/**
* An enumeration describing the possible states of a bare-metal compute node.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/BareMetalDriver.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt
index 41cec291..2d7ba2ed 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/BareMetalDriver.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.driver
+package org.opendc.compute.metal.driver
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.core.failure.FailureDomain
-import com.atlarge.opendc.core.power.Powerable
-import com.atlarge.opendc.core.services.AbstractServiceKey
import kotlinx.coroutines.flow.Flow
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.metal.Node
+import org.opendc.core.failure.FailureDomain
+import org.opendc.core.power.Powerable
+import org.opendc.core.services.AbstractServiceKey
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriver.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriver.kt
index 0c758e6b..98ba8994 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriver.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriver.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,26 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.driver
-
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.ServerState
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.compute.core.execution.ServerManagementContext
-import com.atlarge.opendc.compute.core.execution.ShutdownException
-import com.atlarge.opendc.compute.core.image.EmptyImage
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.compute.metal.NodeEvent
-import com.atlarge.opendc.compute.metal.NodeState
-import com.atlarge.opendc.compute.metal.power.ConstantPowerModel
-import com.atlarge.opendc.core.power.PowerModel
-import com.atlarge.opendc.core.services.ServiceKey
-import com.atlarge.opendc.core.services.ServiceRegistry
+package org.opendc.compute.metal.driver
+
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Delay
import kotlinx.coroutines.DisposableHandle
@@ -55,6 +35,24 @@ import kotlinx.coroutines.intrinsics.startCoroutineCancellable
import kotlinx.coroutines.launch
import kotlinx.coroutines.selects.SelectClause0
import kotlinx.coroutines.selects.SelectInstance
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.ServerState
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.compute.core.execution.ServerManagementContext
+import org.opendc.compute.core.execution.ShutdownException
+import org.opendc.compute.core.image.EmptyImage
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.metal.Node
+import org.opendc.compute.metal.NodeEvent
+import org.opendc.compute.metal.NodeState
+import org.opendc.compute.metal.power.ConstantPowerModel
+import org.opendc.core.power.PowerModel
+import org.opendc.core.services.ServiceKey
+import org.opendc.core.services.ServiceRegistry
import org.opendc.utils.flow.EventFlow
import org.opendc.utils.flow.StateFlow
import java.lang.Exception
@@ -114,7 +112,8 @@ public class SimpleBareMetalDriver(
/**
* The machine state.
*/
- private val nodeState = StateFlow(Node(uid, name, metadata + ("driver" to this), NodeState.SHUTOFF, EmptyImage, null, events))
+ private val nodeState =
+ StateFlow(Node(uid, name, metadata + ("driver" to this), NodeState.SHUTOFF, EmptyImage, null, events))
override val node: Flow<Node> = nodeState
@@ -405,7 +404,8 @@ public class SimpleBareMetalDriver(
for (i in 0 until min(cpus.size, slice.burst.size)) {
val cpu = cpus[i]
val usage = min(slice.limit[i], cpu.frequency)
- val cpuDuration = ceil(slice.burst[i] / usage * 1000).toLong() // Convert from seconds to milliseconds
+ val cpuDuration =
+ ceil(slice.burst[i] / usage * 1000).toLong() // Convert from seconds to milliseconds
totalUsage += usage / cpu.frequency
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/power/PowerModels.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt
index 9ddbe08e..9286626c 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/power/PowerModels.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.power
+package org.opendc.compute.metal.power
-import com.atlarge.opendc.compute.metal.driver.BareMetalDriver
-import com.atlarge.opendc.core.power.PowerModel
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
+import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.core.power.PowerModel
/**
* A power model which emits a single value.
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/ProvisioningService.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt
index a54d8df4..9b056adf 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/ProvisioningService.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.service
+package org.opendc.compute.metal.service
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.compute.metal.driver.BareMetalDriver
-import com.atlarge.opendc.core.services.AbstractServiceKey
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.metal.Node
+import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.core.services.AbstractServiceKey
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningService.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt
index f64f9b5a..3d126ba1 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningService.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.service
+package org.opendc.compute.metal.service
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.compute.metal.driver.BareMetalDriver
import kotlinx.coroutines.CancellationException
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.metal.Node
+import org.opendc.compute.metal.driver.BareMetalDriver
/**
* A very basic implementation of the [ProvisioningService].
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/Hypervisor.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt
index 69b0124d..5dd98bbc 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/Hypervisor.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt
+package org.opendc.compute.virt
-import com.atlarge.opendc.core.Identity
import kotlinx.coroutines.flow.Flow
+import org.opendc.core.Identity
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorEvent.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt
index 7c088bc8..1e2e285c 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorEvent.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt
+package org.opendc.compute.virt
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.core.Server
+import org.opendc.compute.virt.driver.VirtDriver
/**
* An event that is emitted by a [VirtDriver].
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorImage.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorImage.kt
index bd395f0d..84d26593 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/HypervisorImage.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorImage.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt
+package org.opendc.compute.virt
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.virt.driver.SimpleVirtDriver
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import com.atlarge.opendc.core.resource.TagContainer
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.suspendCancellableCoroutine
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.virt.driver.SimpleVirtDriver
+import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.core.resource.TagContainer
import java.util.UUID
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt
index 0586ae00..83dd70d4 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt
@@ -1,3 +1,3 @@
-package com.atlarge.opendc.compute.virt.driver
+package org.opendc.compute.virt.driver
public class InsufficientMemoryOnServerException : IllegalStateException("Insufficient memory left on server.")
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/SimpleVirtDriver.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimpleVirtDriver.kt
index fa172e6e..4d39dc4b 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/SimpleVirtDriver.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimpleVirtDriver.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,22 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.driver
-
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.ServerState
-import com.atlarge.opendc.compute.core.execution.ServerContext
-import com.atlarge.opendc.compute.core.execution.ServerManagementContext
-import com.atlarge.opendc.compute.core.execution.ShutdownException
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.virt.HypervisorEvent
-import com.atlarge.opendc.core.services.ServiceKey
-import com.atlarge.opendc.core.services.ServiceRegistry
+package org.opendc.compute.virt.driver
+
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.Flow
@@ -46,6 +30,20 @@ import kotlinx.coroutines.selects.SelectClause0
import kotlinx.coroutines.selects.SelectInstance
import kotlinx.coroutines.selects.select
import mu.KotlinLogging
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.ServerState
+import org.opendc.compute.core.execution.ServerContext
+import org.opendc.compute.core.execution.ServerManagementContext
+import org.opendc.compute.core.execution.ShutdownException
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.virt.HypervisorEvent
+import org.opendc.core.services.ServiceKey
+import org.opendc.core.services.ServiceRegistry
import org.opendc.utils.flow.EventFlow
import java.time.Clock
import java.util.UUID
@@ -207,7 +205,8 @@ class SimpleVirtDriver(
vms -= command.vm
vcpus.removeAll(command.vm.vcpus)
}
- is SchedulerCommand.Interrupt -> {}
+ is SchedulerCommand.Interrupt -> {
+ }
}
}
@@ -290,7 +289,8 @@ class SimpleVirtDriver(
// time, so not all of the burst may be executed.
select<Boolean> {
schedulingQueue.onReceive { schedulingQueue.offer(it); true }
- hostContext.onRun(ServerContext.Slice(burst, usage, deadline), ServerContext.TriggerMode.DEADLINE).invoke { false }
+ hostContext.onRun(ServerContext.Slice(burst, usage, deadline), ServerContext.TriggerMode.DEADLINE)
+ .invoke { false }
}
val end = clock.millis()
@@ -301,7 +301,8 @@ class SimpleVirtDriver(
}
// The total requested burst that the VMs wanted to run in the time-frame that we ran.
- val totalRequestedSubBurst = vcpus.map { ceil((duration * 1000) / (it.vm.deadline - start) * it.burst).toLong() }.sum()
+ val totalRequestedSubBurst =
+ vcpus.map { ceil((duration * 1000) / (it.vm.deadline - start) * it.burst).toLong() }.sum()
val totalRemainder = burst.sum()
val totalGrantedBurst = totalAllocatedBurst - totalRemainder
@@ -358,7 +359,10 @@ class SimpleVirtDriver(
min(totalRequestedSubBurst, totalGrantedBurst), // We can run more than requested due to timing
totalOvercommissionedBurst,
totalInterferedBurst, // Might be smaller than zero due to FP rounding errors,
- min(totalAllocatedUsage, totalRequestedUsage), // The allocated usage might be slightly higher due to FP rounding
+ min(
+ totalAllocatedUsage,
+ totalRequestedUsage
+ ), // The allocated usage might be slightly higher due to FP rounding
totalRequestedUsage,
vmCount, // Some VMs might already have finished, so keep initial VM count
server
@@ -540,7 +544,9 @@ class SimpleVirtDriver(
* @param server The details of the VM.
* @param events The event stream to publish to.
*/
- private inner class VmServerContext(server: Server, val events: EventFlow<ServerEvent>) : ServerManagementContext, DisposableHandle {
+ private inner class VmServerContext(server: Server, val events: EventFlow<ServerEvent>) :
+ ServerManagementContext,
+ DisposableHandle {
private var finalized: Boolean = false
private var initialized: Boolean = false
private val vm: Vm
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/VirtDriver.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt
index 1002d382..b169a00b 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/driver/VirtDriver.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,14 +20,14 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.driver
+package org.opendc.compute.virt.driver
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.virt.HypervisorEvent
-import com.atlarge.opendc.core.services.AbstractServiceKey
import kotlinx.coroutines.flow.Flow
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.virt.HypervisorEvent
+import org.opendc.core.services.AbstractServiceKey
import java.util.UUID
/**
@@ -50,7 +48,11 @@ public interface VirtDriver {
* @param flavor The flavor of the server which this driver is controlling.
* @return The virtual server spawned by this method.
*/
- public suspend fun spawn(name: String, image: Image, flavor: Flavor): Server
+ public suspend fun spawn(
+ name: String,
+ image: Image,
+ flavor: Flavor
+ ): Server
companion object Key : AbstractServiceKey<VirtDriver>(UUID.randomUUID(), "virtual-driver")
}
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt
new file mode 100644
index 00000000..197b4392
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service
+
+import org.opendc.compute.core.Server
+import org.opendc.compute.virt.driver.VirtDriver
+import java.util.UUID
+
+class HypervisorView(
+ val uid: UUID,
+ var server: Server,
+ var numberOfActiveServers: Int,
+ var availableMemory: Long,
+ var provisionedCores: Int
+) {
+ lateinit var driver: VirtDriver
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/SimpleVirtProvisioningService.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt
index 5e151cbb..c5d2fd66 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/SimpleVirtProvisioningService.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt
@@ -1,23 +1,45 @@
-package com.atlarge.opendc.compute.virt.service
-
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.ServerState
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.virt.HypervisorEvent
-import com.atlarge.opendc.compute.virt.HypervisorImage
-import com.atlarge.opendc.compute.virt.driver.InsufficientMemoryOnServerException
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import com.atlarge.opendc.compute.virt.service.allocation.AllocationPolicy
-import com.atlarge.opendc.core.services.ServiceKey
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service
+
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import mu.KotlinLogging
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.ServerState
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.virt.HypervisorEvent
+import org.opendc.compute.virt.HypervisorImage
+import org.opendc.compute.virt.driver.InsufficientMemoryOnServerException
+import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.virt.service.allocation.AllocationPolicy
+import org.opendc.core.services.ServiceKey
import org.opendc.utils.flow.EventFlow
import java.time.Clock
import kotlin.coroutines.Continuation
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningEvent.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt
index c3fb99f9..13930320 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/VirtProvisioningEvent.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.service
+package org.opendc.compute.virt.service
/**
* An event that is emitted by the [VirtProvisioningService].
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt
new file mode 100644
index 00000000..a111603f
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service
+
+import kotlinx.coroutines.flow.Flow
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.image.Image
+import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.virt.service.allocation.AllocationPolicy
+
+/**
+ * A service for VM provisioning on a cloud.
+ */
+interface VirtProvisioningService {
+ /**
+ * The policy used for allocating a VM on the available hypervisors.
+ */
+ val allocationPolicy: AllocationPolicy
+
+ /**
+ * The events emitted by the service.
+ */
+ public val events: Flow<VirtProvisioningEvent>
+
+ /**
+ * Obtain the active hypervisors for this provisioner.
+ */
+ public suspend fun drivers(): Set<VirtDriver>
+
+ /**
+ * Submit the specified [Image] to the provisioning service.
+ *
+ * @param name The name of the server to deploy.
+ * @param image The image to be deployed.
+ * @param flavor The flavor of the machine instance to run this [image] on.
+ */
+ public suspend fun deploy(
+ name: String,
+ image: Image,
+ flavor: Flavor
+ ): Server
+
+ /**
+ * Terminate the provisioning service releasing all the leased bare-metal machines.
+ */
+ public suspend fun terminate()
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt
new file mode 100644
index 00000000..c2f730b9
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service.allocation
+
+import org.opendc.compute.metal.Node
+import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+
+/**
+ * A policy for selecting the [Node] an image should be deployed to,
+ */
+public interface AllocationPolicy {
+ /**
+ * The logic of the allocation policy.
+ */
+ public interface Logic {
+ /**
+ * Select the node on which the server should be scheduled.
+ */
+ public fun select(
+ hypervisors: Set<HypervisorView>,
+ image: SimpleVirtProvisioningService.ImageView
+ ): HypervisorView?
+ }
+
+ /**
+ * Builds the logic of the policy.
+ */
+ operator fun invoke(): Logic
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt
index 79b622d2..80debff7 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.service.allocation
+package org.opendc.compute.virt.service.allocation
-import com.atlarge.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.HypervisorView
/**
* An [AllocationPolicy] that selects the machine with the highest/lowest amount of memory per core.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt
new file mode 100644
index 00000000..259077aa
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service.allocation
+
+import org.opendc.compute.virt.service.HypervisorView
+
+/**
+ * Allocation policy that selects the node with the most available memory.
+ *
+ * @param reversed A flag to reverse the order (least amount of memory scores the best).
+ */
+public class AvailableMemoryAllocationPolicy(val reversed: Boolean = false) : AllocationPolicy {
+ override fun invoke(): AllocationPolicy.Logic = object : ComparableAllocationPolicyLogic {
+ override val comparator: Comparator<HypervisorView> = compareBy<HypervisorView> { -it.availableMemory }
+ .run { if (reversed) reversed() else this }
+ }
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt
index 79dd95f3..4bccaef8 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.service.allocation
+package org.opendc.compute.virt.service.allocation
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
/**
* The logic for an [AllocationPolicy] that uses a [Comparator] to select the appropriate node.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt
new file mode 100644
index 00000000..c385e686
--- /dev/null
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service.allocation
+
+import org.opendc.compute.virt.service.HypervisorView
+
+/**
+ * Allocation policy that selects the node with the least amount of active servers.
+ *
+ * @param reversed A flag to reverse the order, such that the node with the most active servers is selected.
+ */
+public class NumberOfActiveServersAllocationPolicy(val reversed: Boolean = false) : AllocationPolicy {
+ override fun invoke(): AllocationPolicy.Logic = object : ComparableAllocationPolicyLogic {
+ override val comparator: Comparator<HypervisorView> = compareBy<HypervisorView> { it.numberOfActiveServers }
+ .run { if (reversed) reversed() else this }
+ }
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt
index e1a995a0..f5d4abc5 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.service.allocation
+package org.opendc.compute.virt.service.allocation
-import com.atlarge.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.HypervisorView
/**
* An [AllocationPolicy] that takes into account the number of vCPUs that have been provisioned on this machine
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt
index 07dcf1c5..d40b2bc2 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt.service.allocation
+package org.opendc.compute.virt.service.allocation
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
import kotlin.random.Random
/**
diff --git a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt
index 59acfce2..fb086027 100644
--- a/simulator/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt
+++ b/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt
@@ -1,8 +1,30 @@
-package com.atlarge.opendc.compute.virt.service.allocation
+/*
+ * Copyright (c) 2020 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 org.opendc.compute.virt.service.allocation
-import com.atlarge.opendc.compute.virt.service.HypervisorView
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
import mu.KotlinLogging
+import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
private val logger = KotlinLogging.logger {}
diff --git a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImageTest.kt b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/core/image/FlopsApplicationImageTest.kt
index 417db77d..309dceb8 100644
--- a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/core/image/FlopsApplicationImageTest.kt
+++ b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/core/image/FlopsApplicationImageTest.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.core.image
+package org.opendc.compute.core.image
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
diff --git a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt
index 7b57327e..9c9dc864 100644
--- a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt
+++ b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimpleBareMetalDriverTest.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,13 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.driver
+package org.opendc.compute.metal.driver
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.ServerState
-import com.atlarge.opendc.compute.core.image.FlopsApplicationImage
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.launchIn
@@ -38,6 +31,11 @@ import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.withContext
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.ServerState
+import org.opendc.compute.core.image.FlopsApplicationImage
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.util.UUID
diff --git a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt
index 0a85e0f9..91d4787c 100644
--- a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt
+++ b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,18 +20,18 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.metal.service
+package org.opendc.compute.metal.service
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.image.FlopsApplicationImage
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import org.junit.jupiter.api.Test
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.image.FlopsApplicationImage
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.util.UUID
diff --git a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/HypervisorTest.kt
index dca0b292..68efb1a3 100644
--- a/simulator/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt
+++ b/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/HypervisorTest.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,16 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.compute.virt
+package org.opendc.compute.virt
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.core.image.FlopsApplicationImage
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.launchIn
@@ -42,6 +32,14 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.core.image.FlopsApplicationImage
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.virt.driver.VirtDriver
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.util.UUID
@@ -67,7 +65,8 @@ internal class HypervisorTest {
val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 1)
val cpus = List(1) { ProcessingUnit(cpuNode, it, 2000.0) }
- val metalDriver = SimpleBareMetalDriver(this, clock, UUID.randomUUID(), "test", emptyMap(), cpus, emptyList())
+ val metalDriver =
+ SimpleBareMetalDriver(this, clock, UUID.randomUUID(), "test", emptyMap(), cpus, emptyList())
metalDriver.init()
metalDriver.setImage(vmm)
@@ -132,7 +131,8 @@ internal class HypervisorTest {
val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 2)
val cpus = List(2) { ProcessingUnit(cpuNode, it, 3200.0) }
- val metalDriver = SimpleBareMetalDriver(this, clock, UUID.randomUUID(), "test", emptyMap(), cpus, emptyList())
+ val metalDriver =
+ SimpleBareMetalDriver(this, clock, UUID.randomUUID(), "test", emptyMap(), cpus, emptyList())
metalDriver.init()
metalDriver.setImage(vmm)
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Environment.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Environment.kt
index 62309bf9..3baef092 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Environment.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Environment.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core
+package org.opendc.core
/**
* A description of a large-scale computing environment. This description includes including key size and topology
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Identity.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Identity.kt
index c87e934f..9c1464af 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Identity.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Identity.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core
+package org.opendc.core
-import java.util.UUID
+import java.util.*
/**
* An object that has a unique identity.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Platform.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Platform.kt
index 0b2437c6..076df255 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Platform.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Platform.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core
+package org.opendc.core
-import java.util.UUID
+import java.util.*
/**
* A representation of a cloud platform such as Amazon Web Services (AWS), Microsoft Azure or Google Cloud.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/User.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/User.kt
index 6105ae9e..d4b237e7 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/User.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/User.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core
+package org.opendc.core
/**
* A user of the cloud network.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Zone.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Zone.kt
index d8851bcd..0bca4ee5 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/Zone.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/Zone.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core
+package org.opendc.core
-import com.atlarge.opendc.core.services.ServiceRegistry
-import java.util.UUID
+import org.opendc.core.services.ServiceRegistry
+import java.util.*
/**
* An isolated location within a topology region from which public cloud services operate, roughly equivalent to a
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/CorrelatedFaultInjector.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/CorrelatedFaultInjector.kt
index 87d6b7bd..f3bd7f5a 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/CorrelatedFaultInjector.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/CorrelatedFaultInjector.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.failure
+package org.opendc.core.failure
import kotlinx.coroutines.*
import java.time.Clock
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FailureDomain.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FailureDomain.kt
index d56df3c9..0795b09a 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FailureDomain.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FailureDomain.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.failure
+package org.opendc.core.failure
import kotlinx.coroutines.CoroutineScope
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FaultInjector.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FaultInjector.kt
index ac7a08de..ad776641 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/FaultInjector.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/FaultInjector.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.failure
+package org.opendc.core.failure
/**
* An interface for stochastically injecting faults into a running system.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/UncorrelatedFaultInjector.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/UncorrelatedFaultInjector.kt
index e96974f7..6c019763 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/failure/UncorrelatedFaultInjector.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/failure/UncorrelatedFaultInjector.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.failure
+package org.opendc.core.failure
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/PowerModel.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/power/PowerModel.kt
index 51c9f379..e93023d8 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/PowerModel.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/power/PowerModel.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.power
+package org.opendc.core.power
import kotlinx.coroutines.flow.Flow
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/Powerable.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/power/Powerable.kt
index 4473a571..4a225d9d 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/power/Powerable.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/power/Powerable.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.power
+package org.opendc.core.power
import kotlinx.coroutines.flow.Flow
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/Resource.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/Resource.kt
index 25a494bc..5bb2c2ce 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/Resource.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/Resource.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.resource
+package org.opendc.core.resource
-import com.atlarge.opendc.core.Identity
+import org.opendc.core.Identity
/**
* Represents a generic cloud resource.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/TagContainer.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/TagContainer.kt
index 6ba1cf0b..842710d2 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/resource/TagContainer.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/resource/TagContainer.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.resource
+package org.opendc.core.resource
/**
* An immutable map containing the tags of some resource.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceKey.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceKey.kt
index 290bf439..6d475f87 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceKey.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceKey.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.services
+package org.opendc.core.services
-import com.atlarge.opendc.core.Identity
-import java.util.UUID
+import org.opendc.core.Identity
+import java.util.*
/**
* An interface for identifying service implementations of the same type (providing the same service).
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistry.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistry.kt
index 75aa778f..7434d91c 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistry.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistry.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.services
+package org.opendc.core.services
/**
* An immutable service registry interface.
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistryImpl.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistryImpl.kt
index 0686ebaf..e117bec6 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/services/ServiceRegistryImpl.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/services/ServiceRegistryImpl.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.services
+package org.opendc.core.services
/**
* Default implementation of the [ServiceRegistry] interface.
@@ -38,7 +36,8 @@ internal class ServiceRegistryImpl(private val map: Map<ServiceKey<*>, Any>) : S
return map[key] as T
}
- override fun <T : Any> put(key: ServiceKey<T>, service: T): ServiceRegistry = ServiceRegistryImpl(map.plus(key to service))
+ override fun <T : Any> put(key: ServiceKey<T>, service: T): ServiceRegistry =
+ ServiceRegistryImpl(map.plus(key to service))
override fun toString(): String = map.toString()
}
diff --git a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/workload/Workload.kt b/simulator/opendc-core/src/main/kotlin/org/opendc/core/workload/Workload.kt
index def5d6e4..656020ef 100644
--- a/simulator/opendc-core/src/main/kotlin/com/atlarge/opendc/core/workload/Workload.kt
+++ b/simulator/opendc-core/src/main/kotlin/org/opendc/core/workload/Workload.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.core.workload
+package org.opendc.core.workload
-import com.atlarge.opendc.core.Identity
-import com.atlarge.opendc.core.User
+import org.opendc.core.Identity
+import org.opendc.core.User
/**
* A high-level abstraction that represents the actual work that a set of compute resources perform, such
diff --git a/simulator/opendc-experiments/opendc-experiments-sc18/build.gradle.kts b/simulator/opendc-experiments/opendc-experiments-sc18/build.gradle.kts
index 5fe0d25d..393fd0d0 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc18/build.gradle.kts
+++ b/simulator/opendc-experiments/opendc-experiments-sc18/build.gradle.kts
@@ -29,7 +29,7 @@ plugins {
}
application {
- mainClassName = "com.atlarge.opendc.experiments.sc18.TestExperiment"
+ mainClassName = "org.opendc.experiments.sc18.TestExperiment"
}
dependencies {
diff --git a/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/com/atlarge/opendc/experiments/sc18/TestExperiment.kt b/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt
index 0cece647..18dce054 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/com/atlarge/opendc/experiments/sc18/TestExperiment.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,26 +20,26 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc18
+package org.opendc.experiments.sc18
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.format.environment.sc18.Sc18EnvironmentReader
-import com.atlarge.opendc.format.trace.gwf.GwfTraceReader
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.WorkflowEvent
-import com.atlarge.opendc.workflows.service.WorkflowSchedulerMode
-import com.atlarge.opendc.workflows.service.stage.job.NullJobAdmissionPolicy
-import com.atlarge.opendc.workflows.service.stage.job.SubmissionTimeJobOrderPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.FirstFitResourceSelectionPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.FunctionalResourceFilterPolicy
-import com.atlarge.opendc.workflows.service.stage.task.NullTaskEligibilityPolicy
-import com.atlarge.opendc.workflows.service.stage.task.SubmissionTimeTaskOrderPolicy
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.test.TestCoroutineScope
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.format.environment.sc18.Sc18EnvironmentReader
+import org.opendc.format.trace.gwf.GwfTraceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.WorkflowEvent
+import org.opendc.workflows.service.WorkflowSchedulerMode
+import org.opendc.workflows.service.stage.job.NullJobAdmissionPolicy
+import org.opendc.workflows.service.stage.job.SubmissionTimeJobOrderPolicy
+import org.opendc.workflows.service.stage.resource.FirstFitResourceSelectionPolicy
+import org.opendc.workflows.service.stage.resource.FunctionalResourceFilterPolicy
+import org.opendc.workflows.service.stage.task.NullTaskEligibilityPolicy
+import org.opendc.workflows.service.stage.task.SubmissionTimeTaskOrderPolicy
import java.io.File
import kotlin.math.max
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts b/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
index 0a7b663c..4bfe21d2 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
@@ -29,7 +29,7 @@ plugins {
}
application {
- mainClassName = "com.atlarge.opendc.experiments.sc20.MainKt"
+ mainClassName = "org.opendc.experiments.sc20.MainKt"
applicationDefaultJvmArgs = listOf("-Xms2500M")
}
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/Main.kt
index cd85351e..9f096038 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/Main.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20
+package org.opendc.experiments.sc20
-import com.atlarge.opendc.experiments.sc20.experiment.*
-import com.atlarge.opendc.experiments.sc20.reporter.ConsoleExperimentReporter
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.execution.ThreadPoolExperimentScheduler
-import com.atlarge.opendc.experiments.sc20.runner.internal.DefaultExperimentRunner
-import com.atlarge.opendc.format.trace.sc20.Sc20PerformanceInterferenceReader
-import com.atlarge.opendc.format.trace.sc20.Sc20VmPlacementReader
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.convert
import com.github.ajalt.clikt.parameters.options.default
@@ -42,6 +33,13 @@ import com.github.ajalt.clikt.parameters.types.choice
import com.github.ajalt.clikt.parameters.types.file
import com.github.ajalt.clikt.parameters.types.int
import mu.KotlinLogging
+import org.opendc.experiments.sc20.experiment.*
+import org.opendc.experiments.sc20.reporter.ConsoleExperimentReporter
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.execution.ThreadPoolExperimentScheduler
+import org.opendc.experiments.sc20.runner.internal.DefaultExperimentRunner
+import org.opendc.format.trace.sc20.Sc20PerformanceInterferenceReader
+import org.opendc.format.trace.sc20.Sc20VmPlacementReader
import java.io.File
import java.io.InputStream
@@ -71,7 +69,10 @@ class ExperimentCli : CliktCommand(name = "sc20-experiment", help = "Run experim
/**
* The path to the performance interference model.
*/
- private val performanceInterferenceStream by option("--performance-interference-model", help = "path to the performance interference file")
+ private val performanceInterferenceStream by option(
+ "--performance-interference-model",
+ help = "path to the performance interference file"
+ )
.file(canBeDir = false)
.convert { it.inputStream() as InputStream }
@@ -130,7 +131,8 @@ class ExperimentCli : CliktCommand(name = "sc20-experiment", help = "Run experim
performanceInterferenceStream?.let { Sc20PerformanceInterferenceReader(it) }
logger.info { "Creating experiment descriptor" }
- val descriptor = object : Experiment(environmentPath, tracePath, output, performanceInterferenceModel, vmPlacements, bufferSize) {
+ val descriptor = object :
+ Experiment(environmentPath, tracePath, output, performanceInterferenceModel, vmPlacements, bufferSize) {
private val descriptor = this
override val children: Sequence<ExperimentDescriptor> = sequence {
for ((i, producer) in portfolios.withIndex()) {
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Experiment.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Experiment.kt
index f3ac2554..e93d8c1e 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Experiment.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Experiment.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
+package org.opendc.experiments.sc20.experiment
-import com.atlarge.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
-import com.atlarge.opendc.experiments.sc20.telemetry.RunEvent
-import com.atlarge.opendc.experiments.sc20.telemetry.parquet.ParquetRunEventWriter
-import com.atlarge.opendc.format.trace.PerformanceInterferenceModelReader
+import org.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
+import org.opendc.experiments.sc20.telemetry.RunEvent
+import org.opendc.experiments.sc20.telemetry.parquet.ParquetRunEventWriter
+import org.opendc.format.trace.PerformanceInterferenceModelReader
import java.io.File
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/ExperimentHelpers.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
index b68ee97e..c2e5b619 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,34 +20,37 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
-
-import com.atlarge.opendc.compute.core.Flavor
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.compute.metal.NODE_CLUSTER
-import com.atlarge.opendc.compute.metal.driver.BareMetalDriver
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.virt.HypervisorEvent
-import com.atlarge.opendc.compute.virt.driver.SimpleVirtDriver
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
-import com.atlarge.opendc.compute.virt.service.VirtProvisioningEvent
-import com.atlarge.opendc.compute.virt.service.allocation.AllocationPolicy
-import com.atlarge.opendc.core.failure.CorrelatedFaultInjector
-import com.atlarge.opendc.core.failure.FailureDomain
-import com.atlarge.opendc.core.failure.FaultInjector
-import com.atlarge.opendc.experiments.sc20.experiment.monitor.ExperimentMonitor
-import com.atlarge.opendc.experiments.sc20.trace.Sc20StreamingParquetTraceReader
-import com.atlarge.opendc.format.environment.EnvironmentReader
-import com.atlarge.opendc.format.trace.TraceReader
-import kotlinx.coroutines.*
+package org.opendc.experiments.sc20.experiment
+
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.Channel
+import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.takeWhile
+import kotlinx.coroutines.launch
import mu.KotlinLogging
+import org.opendc.compute.core.Flavor
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.metal.NODE_CLUSTER
+import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.virt.HypervisorEvent
+import org.opendc.compute.virt.driver.SimpleVirtDriver
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.virt.service.VirtProvisioningEvent
+import org.opendc.compute.virt.service.allocation.AllocationPolicy
+import org.opendc.core.failure.CorrelatedFaultInjector
+import org.opendc.core.failure.FailureDomain
+import org.opendc.core.failure.FaultInjector
+import org.opendc.experiments.sc20.experiment.monitor.ExperimentMonitor
+import org.opendc.experiments.sc20.trace.Sc20StreamingParquetTraceReader
+import org.opendc.format.environment.EnvironmentReader
+import org.opendc.format.trace.TraceReader
import java.io.File
import java.time.Clock
import kotlin.math.ln
@@ -96,7 +97,12 @@ suspend fun createFailureDomain(
/**
* Obtain the [FaultInjector] to use for the experiments.
*/
-fun createFaultInjector(coroutineScope: CoroutineScope, clock: Clock, random: Random, failureInterval: Double): FaultInjector {
+fun createFaultInjector(
+ coroutineScope: CoroutineScope,
+ clock: Clock,
+ random: Random,
+ failureInterval: Double
+): FaultInjector {
// Parameters from A. Iosup, A Framework for the Study of Grid Inter-Operation Mechanisms, 2009
// GRID'5000
return CorrelatedFaultInjector(
@@ -112,7 +118,12 @@ fun createFaultInjector(coroutineScope: CoroutineScope, clock: Clock, random: Ra
/**
* Create the trace reader from which the VM workloads are read.
*/
-fun createTraceReader(path: File, performanceInterferenceModel: PerformanceInterferenceModel, vms: List<String>, seed: Int): Sc20StreamingParquetTraceReader {
+fun createTraceReader(
+ path: File,
+ performanceInterferenceModel: PerformanceInterferenceModel,
+ vms: List<String>,
+ seed: Int
+): Sc20StreamingParquetTraceReader {
return Sc20StreamingParquetTraceReader(
path,
performanceInterferenceModel,
@@ -148,7 +159,12 @@ suspend fun createProvisioner(
* Attach the specified monitor to the VM provisioner.
*/
@OptIn(ExperimentalCoroutinesApi::class)
-suspend fun attachMonitor(coroutineScope: CoroutineScope, clock: Clock, scheduler: SimpleVirtProvisioningService, monitor: ExperimentMonitor) {
+suspend fun attachMonitor(
+ coroutineScope: CoroutineScope,
+ clock: Clock,
+ scheduler: SimpleVirtProvisioningService,
+ monitor: ExperimentMonitor
+) {
val hypervisors = scheduler.drivers()
// Monitor hypervisor events
@@ -202,7 +218,15 @@ suspend fun attachMonitor(coroutineScope: CoroutineScope, clock: Clock, schedule
/**
* Process the trace.
*/
-suspend fun processTrace(coroutineScope: CoroutineScope, clock: Clock, reader: TraceReader<VmWorkload>, scheduler: SimpleVirtProvisioningService, chan: Channel<Unit>, monitor: ExperimentMonitor, vmPlacements: Map<String, String> = emptyMap()) {
+suspend fun processTrace(
+ coroutineScope: CoroutineScope,
+ clock: Clock,
+ reader: TraceReader<VmWorkload>,
+ scheduler: SimpleVirtProvisioningService,
+ chan: Channel<Unit>,
+ monitor: ExperimentMonitor,
+ vmPlacements: Map<String, String> = emptyMap()
+) {
try {
var submitted = 0
@@ -216,7 +240,10 @@ suspend fun processTrace(coroutineScope: CoroutineScope, clock: Clock, reader: T
val server = scheduler.deploy(
workload.image.name,
workload.image,
- Flavor(workload.image.maxCores, workload.image.requiredMemory)
+ Flavor(
+ workload.image.maxCores,
+ workload.image.requiredMemory
+ )
)
// Monitor server events
server.events
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolio.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolio.kt
index 6a40f5fb..fb58e651 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolio.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolio.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
+package org.opendc.experiments.sc20.experiment
-import com.atlarge.opendc.experiments.sc20.experiment.model.OperationalPhenomena
-import com.atlarge.opendc.experiments.sc20.experiment.model.Topology
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
+import org.opendc.experiments.sc20.experiment.model.OperationalPhenomena
+import org.opendc.experiments.sc20.experiment.model.Topology
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
/**
* A portfolio represents a collection of scenarios are tested.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolios.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolios.kt
index 09a6ce40..53d6fc21 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Portfolios.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Portfolios.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
+package org.opendc.experiments.sc20.experiment
-import com.atlarge.opendc.experiments.sc20.experiment.model.*
+import org.opendc.experiments.sc20.experiment.model.*
public class HorVerPortfolio(parent: Experiment, id: Int) : Portfolio(parent, id, "horizontal_vs_vertical") {
override val topologies = listOf(
@@ -127,7 +125,8 @@ public class CompositeWorkloadPortfolio(parent: Experiment, id: Int) : Portfolio
)
}
-public class OperationalPhenomenaPortfolio(parent: Experiment, id: Int) : Portfolio(parent, id, "operational_phenomena") {
+public class OperationalPhenomenaPortfolio(parent: Experiment, id: Int) :
+ Portfolio(parent, id, "operational_phenomena") {
override val topologies = listOf(
Topology("base")
)
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Run.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt
index 76a10e56..95987d07 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Run.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,27 +20,22 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
+package org.opendc.experiments.sc20.experiment
-import com.atlarge.opendc.compute.virt.service.allocation.AvailableCoreMemoryAllocationPolicy
-import com.atlarge.opendc.compute.virt.service.allocation.AvailableMemoryAllocationPolicy
-import com.atlarge.opendc.compute.virt.service.allocation.NumberOfActiveServersAllocationPolicy
-import com.atlarge.opendc.compute.virt.service.allocation.ProvisionedCoresAllocationPolicy
-import com.atlarge.opendc.compute.virt.service.allocation.RandomAllocationPolicy
-import com.atlarge.opendc.compute.virt.service.allocation.ReplayAllocationPolicy
-import com.atlarge.opendc.experiments.sc20.experiment.model.CompositeWorkload
-import com.atlarge.opendc.experiments.sc20.experiment.monitor.ParquetExperimentMonitor
-import com.atlarge.opendc.experiments.sc20.runner.TrialExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
-import com.atlarge.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
-import com.atlarge.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
-import com.atlarge.opendc.format.environment.sc20.Sc20ClusterEnvironmentReader
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.cancel
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import mu.KotlinLogging
+import org.opendc.compute.virt.service.allocation.*
+import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
+import org.opendc.experiments.sc20.experiment.monitor.ParquetExperimentMonitor
+import org.opendc.experiments.sc20.runner.TrialExperimentDescriptor
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
+import org.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
+import org.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
+import org.opendc.format.environment.sc20.Sc20ClusterEnvironmentReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.io.File
import kotlin.random.Random
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Scenario.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Scenario.kt
index 98bc7fc2..5cffae63 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/Scenario.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Scenario.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,13 +20,13 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment
+package org.opendc.experiments.sc20.experiment
-import com.atlarge.opendc.experiments.sc20.experiment.model.OperationalPhenomena
-import com.atlarge.opendc.experiments.sc20.experiment.model.Topology
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.experiment.model.OperationalPhenomena
+import org.opendc.experiments.sc20.experiment.model.Topology
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.experiments.sc20.runner.ContainerExperimentDescriptor
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
/**
* A scenario represents a single point in the design space (a unique combination of parameters).
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt
index af99df84..b22f4c9e 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/OperationalPhenomena.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment.model
+package org.opendc.experiments.sc20.experiment.model
/**
* Operation phenomena during experiments.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Topology.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Topology.kt
index ea09688b..95062fda 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Topology.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Topology.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment.model
+package org.opendc.experiments.sc20.experiment.model
/**
* The topology topology on which we test the workload.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Workload.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Workload.kt
index d75ca6f9..a9719114 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/model/Workload.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/model/Workload.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment.model
+package org.opendc.experiments.sc20.experiment.model
enum class SamplingStrategy {
REGULAR,
@@ -33,7 +31,11 @@ enum class SamplingStrategy {
/**
* A workload that is considered for a scenario.
*/
-public open class Workload(open val name: String, val fraction: Double, val samplingStrategy: SamplingStrategy = SamplingStrategy.REGULAR)
+public open class Workload(
+ open val name: String,
+ val fraction: Double,
+ val samplingStrategy: SamplingStrategy = SamplingStrategy.REGULAR
+)
/**
* A workload that is composed of multiple workloads.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
index 1f674f00..8d41f29e 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment.monitor
+package org.opendc.experiments.sc20.experiment.monitor
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import com.atlarge.opendc.compute.virt.service.VirtProvisioningEvent
+import org.opendc.compute.core.Server
+import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.virt.service.VirtProvisioningEvent
import java.io.Closeable
/**
@@ -45,7 +43,8 @@ interface ExperimentMonitor : Closeable {
time: Long,
driver: VirtDriver,
server: Server
- ) {}
+ ) {
+ }
/**
* Report the power consumption of a host.
@@ -66,7 +65,8 @@ interface ExperimentMonitor : Closeable {
numberOfDeployedImages: Int,
hostServer: Server,
duration: Long = 5 * 60 * 1000L
- ) {}
+ ) {
+ }
/**
* This method is invoked for a provisioner event.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
index a06317cb..b1583f87 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,16 +20,16 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.experiment.monitor
+package org.opendc.experiments.sc20.experiment.monitor
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.virt.driver.VirtDriver
-import com.atlarge.opendc.compute.virt.service.VirtProvisioningEvent
-import com.atlarge.opendc.experiments.sc20.telemetry.HostEvent
-import com.atlarge.opendc.experiments.sc20.telemetry.ProvisionerEvent
-import com.atlarge.opendc.experiments.sc20.telemetry.parquet.ParquetHostEventWriter
-import com.atlarge.opendc.experiments.sc20.telemetry.parquet.ParquetProvisionerEventWriter
import mu.KotlinLogging
+import org.opendc.compute.core.Server
+import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.virt.service.VirtProvisioningEvent
+import org.opendc.experiments.sc20.telemetry.HostEvent
+import org.opendc.experiments.sc20.telemetry.ProvisionerEvent
+import org.opendc.experiments.sc20.telemetry.parquet.ParquetHostEventWriter
+import org.opendc.experiments.sc20.telemetry.parquet.ParquetProvisionerEventWriter
import java.io.File
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt
index 4472def9..af61622a 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/reporter/ConsoleExperimentReporter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.reporter
+package org.opendc.experiments.sc20.reporter
-import com.atlarge.opendc.experiments.sc20.experiment.Run
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
import me.tongfei.progressbar.ProgressBar
import me.tongfei.progressbar.ProgressBarBuilder
import mu.KotlinLogging
+import org.opendc.experiments.sc20.experiment.Run
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
/**
* A reporter that reports the experiment progress to the console.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt
index dac32586..d70e8c9a 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ContainerExperimentDescriptor.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner
+package org.opendc.experiments.sc20.runner
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
import kotlinx.coroutines.launch
import kotlinx.coroutines.supervisorScope
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
/**
* An abstract [ExperimentDescriptor] specifically for containers.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentDescriptor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentDescriptor.kt
index 64b6b767..e087c7fd 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentDescriptor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentDescriptor.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner
+package org.opendc.experiments.sc20.runner
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
import java.io.Serializable
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentRunner.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentRunner.kt
index 77f970fe..49d57629 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/ExperimentRunner.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/ExperimentRunner.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner
+package org.opendc.experiments.sc20.runner
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
/**
* An [ExperimentRunner] facilitates discovery and execution of experiments.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt
index cf05416a..abc52997 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/TrialExperimentDescriptor.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner
+package org.opendc.experiments.sc20.runner
/**
* An abstract [ExperimentDescriptor] specifically for trials.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt
index 9a04c491..942eb891 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionContext.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.execution
+package org.opendc.experiments.sc20.runner.execution
/**
* The execution context of an experiment.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt
index f6df0524..9e8b46e9 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionListener.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.execution
+package org.opendc.experiments.sc20.runner.execution
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
/**
* Listener to be notified of experiment execution events by experiment runners.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt
index 057e1f92..a765c264 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentExecutionResult.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.execution
+package org.opendc.experiments.sc20.runner.execution
import java.io.Serializable
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt
index 96678abf..49a137cc 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ExperimentScheduler.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.execution
+package org.opendc.experiments.sc20.runner.execution
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
import java.io.Closeable
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt
index ddd64560..fb684678 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/execution/ThreadPoolExperimentScheduler.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,14 +20,14 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.execution
+package org.opendc.experiments.sc20.runner.execution
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.launch
import kotlinx.coroutines.supervisorScope
import kotlinx.coroutines.sync.Semaphore
import kotlinx.coroutines.withContext
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
import java.util.concurrent.Executors
/**
@@ -37,7 +35,8 @@ import java.util.concurrent.Executors
*
* @param parallelism The maximum amount of parallel workers (default is the number of available processors).
*/
-class ThreadPoolExperimentScheduler(parallelism: Int = Runtime.getRuntime().availableProcessors() + 1) : ExperimentScheduler {
+class ThreadPoolExperimentScheduler(parallelism: Int = Runtime.getRuntime().availableProcessors() + 1) :
+ ExperimentScheduler {
private val dispatcher = Executors.newCachedThreadPool().asCoroutineDispatcher()
private val tickets = Semaphore(parallelism)
@@ -54,7 +53,10 @@ class ThreadPoolExperimentScheduler(parallelism: Int = Runtime.getRuntime().avai
launch { context.listener.descriptorRegistered(descriptor) }
}
- override fun executionFinished(descriptor: ExperimentDescriptor, result: ExperimentExecutionResult) {
+ override fun executionFinished(
+ descriptor: ExperimentDescriptor,
+ result: ExperimentExecutionResult
+ ) {
launch { context.listener.executionFinished(descriptor, result) }
}
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt
index 3b80276f..953669dc 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/runner/internal/DefaultExperimentRunner.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.runner.internal
+package org.opendc.experiments.sc20.runner.internal
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentDescriptor
-import com.atlarge.opendc.experiments.sc20.runner.ExperimentRunner
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
-import com.atlarge.opendc.experiments.sc20.runner.execution.ExperimentScheduler
import kotlinx.coroutines.runBlocking
+import org.opendc.experiments.sc20.runner.ExperimentDescriptor
+import org.opendc.experiments.sc20.runner.ExperimentRunner
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionContext
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionListener
+import org.opendc.experiments.sc20.runner.execution.ExperimentExecutionResult
+import org.opendc.experiments.sc20.runner.execution.ExperimentScheduler
import java.util.concurrent.ConcurrentHashMap
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/Event.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/Event.kt
index c1e14e2a..ba7d2f65 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/Event.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/Event.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry
+package org.opendc.experiments.sc20.telemetry
/**
* An event that occurs within the system.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/HostEvent.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/HostEvent.kt
index b9030172..1d491e53 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/HostEvent.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/HostEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry
+package org.opendc.experiments.sc20.telemetry
-import com.atlarge.opendc.compute.core.Server
+import org.opendc.compute.core.Server
/**
* A periodic report of the host machine metrics.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt
index df619632..22795c8b 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/ProvisionerEvent.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry
+package org.opendc.experiments.sc20.telemetry
/**
* A periodic report of the provisioner's metrics.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/RunEvent.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/RunEvent.kt
index 497d2c3f..b426fe11 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/RunEvent.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/RunEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry
+package org.opendc.experiments.sc20.telemetry
-import com.atlarge.opendc.experiments.sc20.experiment.Run
+import org.opendc.experiments.sc20.experiment.Run
/**
* A periodic report of the host machine metrics.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/VmEvent.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/VmEvent.kt
index 7289fb21..89ee2a5a 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/VmEvent.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/VmEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry
+package org.opendc.experiments.sc20.telemetry
-import com.atlarge.opendc.compute.core.Server
+import org.opendc.compute.core.Server
/**
* A periodic report of a virtual machine's metrics.
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt
index 0a310027..82ce8a22 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetEventWriter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry.parquet
+package org.opendc.experiments.sc20.telemetry.parquet
-import com.atlarge.opendc.experiments.sc20.telemetry.Event
import mu.KotlinLogging
import org.apache.avro.Schema
import org.apache.avro.generic.GenericData
import org.apache.hadoop.fs.Path
import org.apache.parquet.avro.AvroParquetWriter
import org.apache.parquet.hadoop.metadata.CompressionCodecName
+import org.opendc.experiments.sc20.telemetry.Event
import java.io.Closeable
import java.io.File
import java.util.concurrent.ArrayBlockingQueue
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt
index 3bc09435..3219bd0b 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetHostEventWriter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry.parquet
+package org.opendc.experiments.sc20.telemetry.parquet
-import com.atlarge.opendc.experiments.sc20.telemetry.HostEvent
import org.apache.avro.Schema
import org.apache.avro.SchemaBuilder
import org.apache.avro.generic.GenericData
+import org.opendc.experiments.sc20.telemetry.HostEvent
import java.io.File
/**
@@ -60,7 +58,7 @@ public class ParquetHostEventWriter(path: File, bufferSize: Int) :
val schema: Schema = SchemaBuilder
.record("host_metrics")
- .namespace("com.atlarge.opendc.experiments.sc20")
+ .namespace("org.opendc.experiments.sc20")
.fields()
// .name("portfolio_id").type().intType().noDefault()
// .name("scenario_id").type().intType().noDefault()
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt
index 1f3b0472..f17f9458 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetProvisionerEventWriter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry.parquet
+package org.opendc.experiments.sc20.telemetry.parquet
-import com.atlarge.opendc.experiments.sc20.telemetry.ProvisionerEvent
import org.apache.avro.Schema
import org.apache.avro.SchemaBuilder
import org.apache.avro.generic.GenericData
+import org.opendc.experiments.sc20.telemetry.ProvisionerEvent
import java.io.File
/**
@@ -52,7 +50,7 @@ public class ParquetProvisionerEventWriter(path: File, bufferSize: Int) :
val schema: Schema = SchemaBuilder
.record("provisioner_metrics")
- .namespace("com.atlarge.opendc.experiments.sc20")
+ .namespace("org.opendc.experiments.sc20")
.fields()
.name("timestamp").type().longType().noDefault()
.name("host_total_count").type().intType().noDefault()
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt
index 98afe3b8..35f8e2b5 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/telemetry/parquet/ParquetRunEventWriter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.telemetry.parquet
+package org.opendc.experiments.sc20.telemetry.parquet
-import com.atlarge.opendc.experiments.sc20.telemetry.RunEvent
import org.apache.avro.Schema
import org.apache.avro.SchemaBuilder
import org.apache.avro.generic.GenericData
+import org.opendc.experiments.sc20.telemetry.RunEvent
import java.io.File
/**
@@ -60,7 +58,7 @@ public class ParquetRunEventWriter(path: File, bufferSize: Int) :
val schema: Schema = SchemaBuilder
.record("runs")
- .namespace("com.atlarge.opendc.experiments.sc20")
+ .namespace("org.opendc.experiments.sc20")
.fields()
.name("portfolio_id").type().intType().noDefault()
.name("portfolio_name").type().stringType().noDefault()
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
index 06bececf..5045b2df 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,16 +20,16 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.trace
+package org.opendc.experiments.sc20.trace
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.experiments.sc20.experiment.model.CompositeWorkload
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.util.TreeSet
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
index f1c1dc25..def1c2f4 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,18 +20,18 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.trace
+package org.opendc.experiments.sc20.trace
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
import mu.KotlinLogging
import org.apache.avro.generic.GenericData
import org.apache.hadoop.fs.Path
import org.apache.parquet.avro.AvroParquetReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.File
import java.util.UUID
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
index 9fa33c3f..51108dda 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,16 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.trace
+package org.opendc.experiments.sc20.trace
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
import mu.KotlinLogging
import org.apache.avro.generic.GenericData
import org.apache.hadoop.fs.Path
@@ -41,6 +31,14 @@ import org.apache.parquet.filter2.predicate.FilterApi
import org.apache.parquet.filter2.predicate.Statistics
import org.apache.parquet.filter2.predicate.UserDefinedPredicate
import org.apache.parquet.io.api.Binary
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.File
import java.io.Serializable
import java.util.SortedSet
@@ -206,7 +204,7 @@ class Sc20StreamingParquetTraceReader(
val externalBuffer = mutableListOf<FlopsHistoryFragment>()
buffers.getOrPut(id) { mutableListOf() }.add(externalBuffer)
val fragments = sequence<FlopsHistoryFragment> {
- repeat@while (true) {
+ repeat@ while (true) {
if (externalBuffer.isEmpty()) {
if (hasNext) {
pull(buffers)
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20TraceConverter.kt
index a2ce3109..26c27b68 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20TraceConverter.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,8 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.trace
+package org.opendc.experiments.sc20.trace
-import com.atlarge.opendc.format.trace.sc20.Sc20VmPlacementReader
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.groups.OptionGroup
@@ -45,6 +42,7 @@ import org.apache.hadoop.fs.Path
import org.apache.parquet.avro.AvroParquetWriter
import org.apache.parquet.hadoop.ParquetWriter
import org.apache.parquet.hadoop.metadata.CompressionCodecName
+import org.opendc.format.trace.sc20.Sc20VmPlacementReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
@@ -81,7 +79,7 @@ class TraceConverterCli : CliktCommand(name = "trace-converter") {
override fun run() {
val metaSchema = SchemaBuilder
.record("meta")
- .namespace("com.atlarge.opendc.format.sc20")
+ .namespace("org.opendc.format.sc20")
.fields()
.name("id").type().stringType().noDefault()
.name("submissionTime").type().longType().noDefault()
@@ -91,7 +89,7 @@ class TraceConverterCli : CliktCommand(name = "trace-converter") {
.endRecord()
val schema = SchemaBuilder
.record("trace")
- .namespace("com.atlarge.opendc.format.sc20")
+ .namespace("org.opendc.format.sc20")
.fields()
.name("id").type().stringType().noDefault()
.name("time").type().longType().noDefault()
@@ -263,7 +261,8 @@ class SolvinityConversion : TraceConversion("Solvinity") {
continue
}
- val timestamp = (values[timestampCol].trim().toLong() - 5 * 60) * 1000L - minTimestamp
+ val timestamp =
+ (values[timestampCol].trim().toLong() - 5 * 60) * 1000L - minTimestamp
if (begin > timestamp || timestamp > end) {
continue
}
@@ -384,7 +383,8 @@ class BitbrainsConversion : TraceConversion("Bitbrains") {
val timestamp = (values[timestampCol].trim().toLong() - 5 * 60) * 1000L
cores = values[coreCol].trim().toInt()
- requiredMemory = max(requiredMemory, values[provisionedMemoryCol].trim().toDouble().toLong())
+ requiredMemory =
+ max(requiredMemory, values[provisionedMemoryCol].trim().toDouble().toLong())
maxCores = max(maxCores, cores)
minTime = min(minTime, timestamp)
val cpuUsage = values[cpuUsageCol].trim().toDouble() // MHz
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/WorkloadSampler.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt
index 3a2ed4b7..14e65eb6 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/WorkloadSampler.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,15 +20,15 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20.trace
+package org.opendc.experiments.sc20.trace
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.experiments.sc20.experiment.model.CompositeWorkload
-import com.atlarge.opendc.experiments.sc20.experiment.model.SamplingStrategy
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.format.trace.TraceEntry
import mu.KotlinLogging
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
+import org.opendc.experiments.sc20.experiment.model.SamplingStrategy
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.format.trace.TraceEntry
import java.util.*
import kotlin.random.Random
@@ -211,4 +209,5 @@ private fun sample(entry: TraceEntry<VmWorkload>, i: Int): TraceEntry<VmWorkload
return VmTraceEntry(vmWorkload, entry.submissionTime)
}
-private class VmTraceEntry(override val workload: VmWorkload, override val submissionTime: Long) : TraceEntry<VmWorkload>
+private class VmTraceEntry(override val workload: VmWorkload, override val submissionTime: Long) :
+ TraceEntry<VmWorkload>
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/resources/log4j2.xml b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/resources/log4j2.xml
index 6906bfc3..5ce99dfb 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/resources/log4j2.xml
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/resources/log4j2.xml
@@ -26,20 +26,17 @@
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
- <PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false" />
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false"/>
</Console>
</Appenders>
<Loggers>
- <Logger name="com.atlarge.odcsim" level="info" additivity="false">
+ <Logger name="org.opendc" level="warn" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
- <Logger name="com.atlarge.opendc" level="warn" additivity="false">
+ <Logger name="org.opendc.experiments.sc20" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
- <Logger name="com.atlarge.opendc.experiments.sc20" level="info" additivity="false">
- <AppenderRef ref="Console"/>
- </Logger>
- <Logger name="com.atlarge.opendc.experiments.sc20.trace" level="debug" additivity="false">
+ <Logger name="org.opendc.experiments.sc20.trace" level="debug" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="org.apache.hadoop" level="warn" additivity="false">
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/com/atlarge/opendc/experiments/sc20/Sc20IntegrationTest.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt
index ebee1543..230e7f36 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/com/atlarge/opendc/experiments/sc20/Sc20IntegrationTest.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,34 +20,33 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.experiments.sc20
-
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.compute.virt.service.SimpleVirtProvisioningService
-import com.atlarge.opendc.compute.virt.service.allocation.AvailableCoreMemoryAllocationPolicy
-import com.atlarge.opendc.experiments.sc20.experiment.attachMonitor
-import com.atlarge.opendc.experiments.sc20.experiment.createFailureDomain
-import com.atlarge.opendc.experiments.sc20.experiment.createProvisioner
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.experiments.sc20.experiment.monitor.ExperimentMonitor
-import com.atlarge.opendc.experiments.sc20.experiment.processTrace
-import com.atlarge.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
-import com.atlarge.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
-import com.atlarge.opendc.format.environment.EnvironmentReader
-import com.atlarge.opendc.format.environment.sc20.Sc20ClusterEnvironmentReader
-import com.atlarge.opendc.format.trace.TraceReader
+package org.opendc.experiments.sc20
+
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.cancel
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import org.junit.jupiter.api.AfterEach
-import org.junit.jupiter.api.Assertions.assertAll
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.virt.service.allocation.AvailableCoreMemoryAllocationPolicy
+import org.opendc.experiments.sc20.experiment.attachMonitor
+import org.opendc.experiments.sc20.experiment.createFailureDomain
+import org.opendc.experiments.sc20.experiment.createProvisioner
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.experiments.sc20.experiment.monitor.ExperimentMonitor
+import org.opendc.experiments.sc20.experiment.processTrace
+import org.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
+import org.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
+import org.opendc.format.environment.EnvironmentReader
+import org.opendc.format.environment.sc20.Sc20ClusterEnvironmentReader
+import org.opendc.format.trace.TraceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.io.File
import java.time.Clock
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt
index 570b936d..dd1f8edb 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment
+package org.opendc.format.environment
-import com.atlarge.opendc.core.Environment
import kotlinx.coroutines.CoroutineScope
+import org.opendc.core.Environment
import java.io.Closeable
import java.time.Clock
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt
index f3e70982..c313467f 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Model.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Model.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.format.environment.sc18
+/*
+ * Copyright (c) 2020 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 org.opendc.format.environment.sc18
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
index 188d9fd8..16bb92c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,26 +20,26 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc18
+package org.opendc.format.environment.sc18
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.InputStream
import java.time.Clock
-import java.util.UUID
+import java.util.*
/**
* A parser for the JSON experiment setup files used for the SC18 paper: "A Reference Architecture for Topology
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt
index 0a8f1c14..58af8453 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Model.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Model.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.format.environment.sc20
+/*
+ * Copyright (c) 2020 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 org.opendc.format.environment.sc20
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
index d7845081..2232b548 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,28 +20,27 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc20
-
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.NODE_CLUSTER
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.power.LinearLoadPowerModel
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
+package org.opendc.format.environment.sc20
+
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.NODE_CLUSTER
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.power.LinearLoadPowerModel
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.time.Clock
-import java.util.Random
-import java.util.UUID
+import java.util.*
/**
* A [EnvironmentReader] for the internal environment format.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
index adfa1cf0..74afd8c4 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,27 +20,27 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.environment.sc20
+package org.opendc.format.environment.sc20
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.power.LinearLoadPowerModel
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.power.LinearLoadPowerModel
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.io.InputStream
import java.time.Clock
-import java.util.UUID
+import java.util.*
/**
* A parser for the JSON experiment setup files used for the SC20 paper.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt
index 407bc0b4..768974e1 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/PerformanceInterferenceModelReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/PerformanceInterferenceModelReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
import java.io.Closeable
import kotlin.random.Random
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt
index d4ad33f7..d532ab35 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceEntry.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceEntry.kt
@@ -22,9 +22,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
/**
* An entry in a workload trace.
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt
index 6d29cdb4..81c1294a 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
import java.io.Closeable
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt
index 94ee6f31..56b1b025 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/TraceWriter.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/TraceWriter.kt
@@ -22,9 +22,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
-import com.atlarge.opendc.core.workload.Workload
+import org.opendc.core.workload.Workload
import java.io.Closeable
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt
index 7caebb76..7f9e9960 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/VmPlacementReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/VmPlacementReader.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace
+package org.opendc.format.trace
import java.io.Closeable
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
index 6ee43b6a..26c599c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,20 +20,20 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.bitbrains
+package org.opendc.format.trace.bitbrains
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
/**
* A [TraceReader] for the public VM workload trace format.
@@ -104,7 +102,15 @@ class BitbrainsTraceReader(
flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores))
} else {
if (flopsHistory.last().flops != flops) {
- flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores))
+ flopsHistory.add(
+ FlopsHistoryFragment(
+ timestamp,
+ flops,
+ traceInterval,
+ cpuUsage,
+ cores
+ )
+ )
} else {
val oldFragment = flopsHistory.removeAt(flopsHistory.size - 1)
flopsHistory.add(
@@ -125,7 +131,8 @@ class BitbrainsTraceReader(
val relevantPerformanceInterferenceModelItems =
PerformanceInterferenceModel(
- performanceInterferenceModel.items.filter { it.workloadNames.contains(vmId.toString()) }.toSortedSet()
+ performanceInterferenceModel.items.filter { it.workloadNames.contains(vmId.toString()) }
+ .toSortedSet()
)
val vmWorkload = VmWorkload(
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
index 6db3975e..4382e0b5 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,19 +20,36 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.gwf
+package org.opendc.format.trace.gwf
-import com.atlarge.opendc.compute.core.image.FlopsApplicationImage
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
-import com.atlarge.opendc.workflows.workload.Job
-import com.atlarge.opendc.workflows.workload.Task
-import com.atlarge.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
+import org.opendc.compute.core.image.FlopsApplicationImage
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
+import org.opendc.workflows.workload.Job
+import org.opendc.workflows.workload.Task
+import org.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
import java.io.BufferedReader
import java.io.File
import java.io.InputStream
-import java.util.UUID
+import java.util.*
+import kotlin.collections.HashSet
+import kotlin.collections.Iterator
+import kotlin.collections.List
+import kotlin.collections.MutableSet
+import kotlin.collections.component1
+import kotlin.collections.component2
+import kotlin.collections.emptyMap
+import kotlin.collections.filter
+import kotlin.collections.forEach
+import kotlin.collections.getOrPut
+import kotlin.collections.map
+import kotlin.collections.mapIndexed
+import kotlin.collections.mapOf
+import kotlin.collections.mutableMapOf
+import kotlin.collections.set
+import kotlin.collections.sortedBy
+import kotlin.collections.toMap
import kotlin.math.max
import kotlin.math.min
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
index ade47e1b..0da1f7c2 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/PerformanceInterferenceEntry.kt
@@ -1,4 +1,4 @@
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
internal data class PerformanceInterferenceEntry(
val vms: List<String>,
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
index 0e8e1fd2..0ab7d035 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20PerformanceInterferenceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,16 +20,16 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModelItem
-import com.atlarge.opendc.format.trace.PerformanceInterferenceModelReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.PerformanceInterferenceModelItem
+import org.opendc.format.trace.PerformanceInterferenceModelReader
import java.io.InputStream
-import java.util.TreeSet
+import java.util.*
import kotlin.random.Random
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
index 28dc7793..e26e59a8 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,20 +20,20 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
-import com.atlarge.opendc.compute.core.workload.PerformanceInterferenceModel
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.IMAGE_PERF_INTERFERENCE_MODEL
+import org.opendc.compute.core.workload.PerformanceInterferenceModel
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
import kotlin.math.max
import kotlin.math.min
import kotlin.random.Random
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
index 5295ae03..93428d49 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20VmPlacementReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.sc20
+package org.opendc.format.trace.sc20
-import com.atlarge.opendc.format.trace.VmPlacementReader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
+import org.opendc.format.trace.VmPlacementReader
import java.io.InputStream
/**
diff --git a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
index f7c74562..6fb29a03 100644
--- a/simulator/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,18 +20,18 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.format.trace.swf
+package org.opendc.format.trace.swf
-import com.atlarge.opendc.compute.core.image.FlopsHistoryFragment
-import com.atlarge.opendc.compute.core.image.VmImage
-import com.atlarge.opendc.compute.core.workload.VmWorkload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.format.trace.TraceEntry
-import com.atlarge.opendc.format.trace.TraceReader
+import org.opendc.compute.core.image.FlopsHistoryFragment
+import org.opendc.compute.core.image.VmImage
+import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.core.User
+import org.opendc.format.trace.TraceEntry
+import org.opendc.format.trace.TraceReader
import java.io.BufferedReader
import java.io.File
import java.io.FileReader
-import java.util.UUID
+import java.util.*
/**
* A [TraceReader] for reading SWF traces into VM-modeled workloads.
diff --git a/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt
deleted file mode 100644
index 41ad8aba..00000000
--- a/simulator/opendc-format/src/test/kotlin/com/atlarge/opendc/format/trace/swf/SwfTraceReaderTest.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.atlarge.opendc.format.trace.swf
-
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
-import java.io.File
-
-class SwfTraceReaderTest {
- @Test
- internal fun testParseSwf() {
- val reader = SwfTraceReader(File(SwfTraceReaderTest::class.java.getResource("/swf_trace.txt").toURI()))
- var entry = reader.next()
- assertEquals(0, entry.submissionTime)
- // 1961 slices for waiting, 3 full and 1 partial running slices
- assertEquals(1965, entry.workload.image.flopsHistory.toList().size)
-
- entry = reader.next()
- assertEquals(164472, entry.submissionTime)
- // 1188 slices for waiting, 0 full and 1 partial running slices
- assertEquals(1189, entry.workload.image.flopsHistory.toList().size)
- assertEquals(5_100_000L, entry.workload.image.flopsHistory.toList().last().flops)
- assertEquals(0.25, entry.workload.image.flopsHistory.toList().last().usage)
- }
-}
diff --git a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
new file mode 100644
index 00000000..40132ad3
--- /dev/null
+++ b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2020 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 org.opendc.format.trace.swf
+
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+import java.io.File
+
+class SwfTraceReaderTest {
+ @Test
+ internal fun testParseSwf() {
+ val reader = SwfTraceReader(File(SwfTraceReaderTest::class.java.getResource("/swf_trace.txt").toURI()))
+ var entry = reader.next()
+ assertEquals(0, entry.submissionTime)
+ // 1961 slices for waiting, 3 full and 1 partial running slices
+ assertEquals(1965, entry.workload.image.flopsHistory.toList().size)
+
+ entry = reader.next()
+ assertEquals(164472, entry.submissionTime)
+ // 1188 slices for waiting, 0 full and 1 partial running slices
+ assertEquals(1189, entry.workload.image.flopsHistory.toList().size)
+ assertEquals(5_100_000L, entry.workload.image.flopsHistory.toList().last().flops)
+ assertEquals(0.25, entry.workload.image.flopsHistory.toList().last().usage)
+ }
+}
diff --git a/simulator/opendc-runner-web/build.gradle.kts b/simulator/opendc-runner-web/build.gradle.kts
index 8c83db87..7e81347c 100644
--- a/simulator/opendc-runner-web/build.gradle.kts
+++ b/simulator/opendc-runner-web/build.gradle.kts
@@ -29,7 +29,7 @@ plugins {
}
application {
- mainClassName = "com.atlarge.opendc.runner.web.MainKt"
+ mainClassName = "org.opendc.runner.web.MainKt"
}
dependencies {
diff --git a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/Main.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
index ac4d9087..69b2e69d 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/Main.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
@@ -1,15 +1,27 @@
-package com.atlarge.opendc.runner.web
-
-import com.atlarge.opendc.compute.virt.service.allocation.*
-import com.atlarge.opendc.experiments.sc20.experiment.attachMonitor
-import com.atlarge.opendc.experiments.sc20.experiment.createFailureDomain
-import com.atlarge.opendc.experiments.sc20.experiment.createProvisioner
-import com.atlarge.opendc.experiments.sc20.experiment.model.Workload
-import com.atlarge.opendc.experiments.sc20.experiment.monitor.ParquetExperimentMonitor
-import com.atlarge.opendc.experiments.sc20.experiment.processTrace
-import com.atlarge.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
-import com.atlarge.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
-import com.atlarge.opendc.format.trace.sc20.Sc20PerformanceInterferenceReader
+/*
+ * Copyright (c) 2020 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 org.opendc.runner.web
+
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.*
import com.github.ajalt.clikt.parameters.types.file
@@ -26,6 +38,16 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.test.TestCoroutineScope
import mu.KotlinLogging
import org.bson.Document
+import org.opendc.compute.virt.service.allocation.*
+import org.opendc.experiments.sc20.experiment.attachMonitor
+import org.opendc.experiments.sc20.experiment.createFailureDomain
+import org.opendc.experiments.sc20.experiment.createProvisioner
+import org.opendc.experiments.sc20.experiment.model.Workload
+import org.opendc.experiments.sc20.experiment.monitor.ParquetExperimentMonitor
+import org.opendc.experiments.sc20.experiment.processTrace
+import org.opendc.experiments.sc20.trace.Sc20ParquetTraceReader
+import org.opendc.experiments.sc20.trace.Sc20RawParquetTraceReader
+import org.opendc.format.trace.sc20.Sc20PerformanceInterferenceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
import java.io.File
import java.util.*
diff --git a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ResultProcessor.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ResultProcessor.kt
index c0b0ac31..5cae6aa8 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ResultProcessor.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ResultProcessor.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.runner.web
+/*
+ * Copyright (c) 2020 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 org.opendc.runner.web
import org.apache.spark.sql.Column
import org.apache.spark.sql.Dataset
diff --git a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ScenarioManager.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ScenarioManager.kt
index 6ec4995d..0c6c8fee 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/ScenarioManager.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/ScenarioManager.kt
@@ -1,4 +1,26 @@
-package com.atlarge.opendc.runner.web
+/*
+ * Copyright (c) 2020 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 org.opendc.runner.web
import com.mongodb.client.MongoCollection
import com.mongodb.client.model.Filters
diff --git a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/TopologyParser.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
index f9b1c6c4..884833cb 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/com/atlarge/opendc/runner/web/TopologyParser.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
@@ -1,18 +1,27 @@
-package com.atlarge.opendc.runner.web
+/*
+ * Copyright (c) 2020 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 org.opendc.runner.web
-import com.atlarge.opendc.compute.core.MemoryUnit
-import com.atlarge.opendc.compute.core.ProcessingNode
-import com.atlarge.opendc.compute.core.ProcessingUnit
-import com.atlarge.opendc.compute.metal.NODE_CLUSTER
-import com.atlarge.opendc.compute.metal.driver.SimpleBareMetalDriver
-import com.atlarge.opendc.compute.metal.power.LinearLoadPowerModel
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.compute.metal.service.SimpleProvisioningService
-import com.atlarge.opendc.core.Environment
-import com.atlarge.opendc.core.Platform
-import com.atlarge.opendc.core.Zone
-import com.atlarge.opendc.core.services.ServiceRegistry
-import com.atlarge.opendc.format.environment.EnvironmentReader
import com.mongodb.client.AggregateIterable
import com.mongodb.client.MongoCollection
import com.mongodb.client.model.Aggregates
@@ -22,6 +31,19 @@ import com.mongodb.client.model.Projections
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import org.bson.Document
+import org.opendc.compute.core.MemoryUnit
+import org.opendc.compute.core.ProcessingNode
+import org.opendc.compute.core.ProcessingUnit
+import org.opendc.compute.metal.NODE_CLUSTER
+import org.opendc.compute.metal.driver.SimpleBareMetalDriver
+import org.opendc.compute.metal.power.LinearLoadPowerModel
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.core.Environment
+import org.opendc.core.Platform
+import org.opendc.core.Zone
+import org.opendc.core.services.ServiceRegistry
+import org.opendc.format.environment.EnvironmentReader
import java.time.Clock
import java.util.*
diff --git a/simulator/opendc-runner-web/src/main/resources/log4j2.xml b/simulator/opendc-runner-web/src/main/resources/log4j2.xml
index 1d873554..16cedf34 100644
--- a/simulator/opendc-runner-web/src/main/resources/log4j2.xml
+++ b/simulator/opendc-runner-web/src/main/resources/log4j2.xml
@@ -26,17 +26,14 @@
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
- <PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false" />
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false"/>
</Console>
</Appenders>
<Loggers>
- <Logger name="com.atlarge.odcsim" level="info" additivity="false">
+ <Logger name="org.opendc" level="warn" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
- <Logger name="com.atlarge.opendc" level="warn" additivity="false">
- <AppenderRef ref="Console"/>
- </Logger>
- <Logger name="com.atlarge.opendc.runner" level="info" additivity="false">
+ <Logger name="org.opendc.runner" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="org.apache.hadoop" level="warn" additivity="false">
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/JobState.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/JobState.kt
index 1cb2de97..a8d10d22 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/JobState.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/JobState.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.workflows.workload.Job
+import org.opendc.workflows.workload.Job
class JobState(val job: Job, val submittedAt: Long) {
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerListener.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerListener.kt
index 73c3e752..d03a646c 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerListener.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerListener.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,7 +20,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
interface StageWorkflowSchedulerListener {
fun cycleStarted(scheduler: StageWorkflowService) {}
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowService.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
index 3a5b963c..6262c61f 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowService.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,30 +20,29 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
-
-import com.atlarge.opendc.compute.core.Server
-import com.atlarge.opendc.compute.core.ServerEvent
-import com.atlarge.opendc.compute.core.ServerState
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.workflows.service.stage.job.JobAdmissionPolicy
-import com.atlarge.opendc.workflows.service.stage.job.JobOrderPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.ResourceFilterPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.ResourceSelectionPolicy
-import com.atlarge.opendc.workflows.service.stage.task.TaskEligibilityPolicy
-import com.atlarge.opendc.workflows.service.stage.task.TaskOrderPolicy
-import com.atlarge.opendc.workflows.workload.Job
+package org.opendc.workflows.service
+
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
+import org.opendc.compute.core.Server
+import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.ServerState
+import org.opendc.compute.metal.Node
+import org.opendc.compute.metal.service.ProvisioningService
import org.opendc.utils.flow.EventFlow
+import org.opendc.workflows.service.stage.job.JobAdmissionPolicy
+import org.opendc.workflows.service.stage.job.JobOrderPolicy
+import org.opendc.workflows.service.stage.resource.ResourceFilterPolicy
+import org.opendc.workflows.service.stage.resource.ResourceSelectionPolicy
+import org.opendc.workflows.service.stage.task.TaskEligibilityPolicy
+import org.opendc.workflows.service.stage.task.TaskOrderPolicy
+import org.opendc.workflows.workload.Job
import java.time.Clock
-import java.util.PriorityQueue
-import java.util.Queue
+import java.util.*
/**
* A [WorkflowService] that distributes work through a multi-stage process based on the Reference Architecture for
@@ -310,7 +307,14 @@ class StageWorkflowService(
ServerState.ACTIVE -> {
val task = taskByServer.getValue(server)
task.startedAt = clock.millis()
- eventFlow.emit(WorkflowEvent.TaskStarted(this@StageWorkflowService, task.job.job, task.task, clock.millis()))
+ eventFlow.emit(
+ WorkflowEvent.TaskStarted(
+ this@StageWorkflowService,
+ task.job.job,
+ task.task,
+ clock.millis()
+ )
+ )
rootListener.taskStarted(task)
}
ServerState.SHUTOFF, ServerState.ERROR -> {
@@ -321,7 +325,14 @@ class StageWorkflowService(
job.tasks.remove(task)
available += task.host!!
activeTasks -= task
- eventFlow.emit(WorkflowEvent.TaskFinished(this@StageWorkflowService, task.job.job, task.task, clock.millis()))
+ eventFlow.emit(
+ WorkflowEvent.TaskFinished(
+ this@StageWorkflowService,
+ task.job.job,
+ task.task,
+ clock.millis()
+ )
+ )
rootListener.taskFinished(task)
// Add job roots to the scheduling queue
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskState.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt
index acd5731b..e7795dd5 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskState.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.workload.Task
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.workload.Task
class TaskState(val job: JobState, val task: Task) {
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskStatus.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskStatus.kt
index c53c6171..99f5bb87 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/TaskStatus.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskStatus.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
/**
* The state of a workflow task.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowEvent.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowEvent.kt
index 2ca5a19d..dadccb50 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowEvent.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowEvent.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.workflows.workload.Job
-import com.atlarge.opendc.workflows.workload.Task
+import org.opendc.workflows.workload.Job
+import org.opendc.workflows.workload.Task
/**
* An event emitted by the [WorkflowService].
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowSchedulerMode.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowSchedulerMode.kt
index cb075b18..3eff0062 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowSchedulerMode.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowSchedulerMode.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.yield
+import org.opendc.workflows.service.stage.StagePolicy
/**
* The operating mode of a workflow scheduler.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowService.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowService.kt
index ad818dde..17a2d875 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/WorkflowService.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/WorkflowService.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.core.services.AbstractServiceKey
-import com.atlarge.opendc.workflows.workload.Job
import kotlinx.coroutines.flow.Flow
-import java.util.UUID
+import org.opendc.core.services.AbstractServiceKey
+import org.opendc.workflows.workload.Job
+import java.util.*
/**
* A service for cloud workflow management.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/StagePolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/StagePolicy.kt
index c7cc3d84..68a8a424 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/StagePolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/StagePolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,9 +20,9 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage
+package org.opendc.workflows.service.stage
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.StageWorkflowService
import java.io.Serializable
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt
index bbdb9f71..9ac6a97f 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/DurationJobOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,14 +20,14 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.workload.Job
-import com.atlarge.opendc.workflows.workload.Task
-import com.atlarge.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.workload.Job
+import org.opendc.workflows.workload.Task
+import org.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
/**
* A [JobOrderPolicy] that orders jobs based on its critical path length.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt
index 535d7792..8d45918b 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobAdmissionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.stage.StagePolicy
/**
* A policy interface for admitting [JobState]s to a scheduling cycle.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobOrderPolicy.kt
index ba57f064..e65a2ea7 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/JobOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/JobOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.stage.StagePolicy
/**
* A policy interface for ordering admitted workflows in the scheduling queue.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt
index 6b1faf20..7ee15e6b 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LimitJobAdmissionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [JobAdmissionPolicy] that limits the amount of active jobs in the system.
@@ -34,9 +32,7 @@ import com.atlarge.opendc.workflows.service.StageWorkflowService
*/
data class LimitJobAdmissionPolicy(val limit: Int) : JobAdmissionPolicy {
override fun invoke(scheduler: StageWorkflowService) = object : JobAdmissionPolicy.Logic {
- override fun invoke(
- job: JobState
- ): JobAdmissionPolicy.Advice =
+ override fun invoke(job: JobState): JobAdmissionPolicy.Advice =
if (scheduler.activeJobs.size < limit)
JobAdmissionPolicy.Advice.ADMIT
else
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt
index e1c27472..31e6d043 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/LoadJobAdmissionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [JobAdmissionPolicy] that limits the amount of jobs based on the average system load.
@@ -34,9 +32,7 @@ import com.atlarge.opendc.workflows.service.StageWorkflowService
*/
data class LoadJobAdmissionPolicy(val limit: Double) : JobAdmissionPolicy {
override fun invoke(scheduler: StageWorkflowService) = object : JobAdmissionPolicy.Logic {
- override fun invoke(
- job: JobState
- ): JobAdmissionPolicy.Advice =
+ override fun invoke(job: JobState): JobAdmissionPolicy.Advice =
if (scheduler.load < limit)
JobAdmissionPolicy.Advice.ADMIT
else
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt
index 46888467..e671db52 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/NullJobAdmissionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,17 +20,18 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [JobAdmissionPolicy] that admits all jobs.
*/
object NullJobAdmissionPolicy : JobAdmissionPolicy {
override fun invoke(scheduler: StageWorkflowService) = object : JobAdmissionPolicy.Logic {
- override fun invoke(job: JobState): JobAdmissionPolicy.Advice = JobAdmissionPolicy.Advice.ADMIT
+ override fun invoke(job: JobState): JobAdmissionPolicy.Advice =
+ JobAdmissionPolicy.Advice.ADMIT
}
override fun toString(): String = "Always"
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt
index 14a3d98d..7f5abd68 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/RandomJobOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,13 +20,16 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.workload.Job
-import java.util.Random
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.workload.Job
+import java.util.*
+import kotlin.collections.HashMap
+import kotlin.collections.getValue
+import kotlin.collections.set
/**
* A [JobOrderPolicy] that randomly orders jobs.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt
index 3bce43cf..05953a9b 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SizeJobOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [SizeJobOrderPolicy] that orders jobs based on the number of tasks it has.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt
index d6e24b2b..9a48f934 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/job/SubmissionTimeJobOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.job
+package org.opendc.workflows.service.stage.job
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [JobOrderPolicy] orders jobs in FIFO order.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
index a5671d45..64b46330 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.resource
+package org.opendc.workflows.service.stage.resource
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.service.StageWorkflowService
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.service.StageWorkflowService
/**
* A [ResourceSelectionPolicy] that selects the first machine that is available.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
index 0e83d8d7..e505539d 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.resource
+package org.opendc.workflows.service.stage.resource
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [ResourceFilterPolicy] based on the amount of cores available on the machine and the cores required for
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
index 9b05cbac..68c78cd6 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.resource
+package org.opendc.workflows.service.stage.resource
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import java.util.Random
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.service.StageWorkflowService
+import java.util.*
/**
* A [ResourceSelectionPolicy] that randomly orders the machines.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
index 28ef970f..43744417 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.resource
+package org.opendc.workflows.service.stage.resource
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.service.TaskState
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.stage.StagePolicy
/**
* This interface represents stages **R2**, **R3** and **R4** stage of the Reference Architecture for Schedulers and
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
index 43053097..2cc9bc3b 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.resource
+package org.opendc.workflows.service.stage.resource
-import com.atlarge.opendc.compute.metal.Node
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.compute.metal.Node
+import org.opendc.workflows.service.stage.StagePolicy
/**
* This interface represents the **R5** stage of the Reference Architecture for Schedulers and matches the the selected
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt
index b084d26c..ef2f9db4 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/ActiveTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the number of active relative tasks (w.r.t. its job) in the system.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt
index 2255d40c..11ac612e 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/BalancingTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
import kotlin.math.max
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt
index d0cf1374..c3e3720a 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/CompletionTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the number of completed relative tasks.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt
index 73d83d21..60e27118 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependenciesTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the number of dependency tasks it has.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt
index 85b3543f..97a6dfb0 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DependentsTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the number of dependent tasks it has.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt
index 426a76a4..9cd83eac 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationHistoryTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the average duration of the preceding tasks in the job.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt
index 23b47891..d5a8a104 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/DurationTaskOrderPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,13 +20,17 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
-import com.atlarge.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
-import java.util.UUID
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
+import org.opendc.workflows.workload.WORKFLOW_TASK_DEADLINE
+import java.util.*
+import kotlin.collections.HashMap
+import kotlin.collections.getValue
+import kotlin.collections.minusAssign
+import kotlin.collections.set
/**
* A [TaskOrderPolicy] orders tasks based on the pre-specified (approximate) duration of the task.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt
index c039bf6f..9b06f7d9 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitPerJobTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,12 +20,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.JobState
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.JobState
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskEligibilityPolicy] that limits the number of active tasks of a job in the system.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt
index 75322ef5..e0ac3bc4 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LimitTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskEligibilityPolicy] that limits the total number of active tasks in the system.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt
index 090f7be7..e1f0a0b7 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/LoadTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskEligibilityPolicy] that limits the number of active tasks in the system based on the average system load.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt
index 889f2ab5..4f34b692 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/NullTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,10 +20,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskEligibilityPolicy] that always allows new tasks to enter.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt
index d6f49d14..8a2e26ad 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskEligibilityPolicy.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2020 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
-import java.util.Random
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
+import java.util.*
/**
* A [TaskEligibilityPolicy] that randomly accepts tasks in the system with some [probability].
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt
index 4c309085..df03ba80 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/RandomTaskOrderPolicy.kt
@@ -22,12 +22,12 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowSchedulerListener
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
-import com.atlarge.opendc.workflows.workload.Task
+import org.opendc.workflows.service.StageWorkflowSchedulerListener
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
+import org.opendc.workflows.workload.Task
import kotlin.random.Random
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt
index a261965f..e6727e8a 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/SubmissionTimeTaskOrderPolicy.kt
@@ -22,10 +22,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.StageWorkflowService
-import com.atlarge.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.StageWorkflowService
+import org.opendc.workflows.service.TaskState
/**
* A [TaskOrderPolicy] that orders tasks based on the order of arrival in the queue.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt
index 72a7fdd0..1eb2fab0 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskEligibilityPolicy.kt
@@ -22,10 +22,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.TaskState
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.stage.StagePolicy
/**
* A policy interface for determining the eligibility of tasks in a scheduling cycle.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskOrderPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskOrderPolicy.kt
index e74082c2..0a3ce077 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/service/stage/task/TaskOrderPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/task/TaskOrderPolicy.kt
@@ -22,10 +22,10 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service.stage.task
+package org.opendc.workflows.service.stage.task
-import com.atlarge.opendc.workflows.service.TaskState
-import com.atlarge.opendc.workflows.service.stage.StagePolicy
+import org.opendc.workflows.service.TaskState
+import org.opendc.workflows.service.stage.StagePolicy
/**
* This interface represents the **T2** stage of the Reference Architecture for Topology Schedulers and provides the
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Job.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Job.kt
index 02969d8a..30285507 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Job.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Job.kt
@@ -1,7 +1,5 @@
/*
- * MIT License
- *
- * Copyright (c) 2019 atlarge-research
+ * Copyright (c) 2020 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
@@ -22,11 +20,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.workload
+package org.opendc.workflows.workload
-import com.atlarge.opendc.core.User
-import com.atlarge.opendc.core.workload.Workload
-import java.util.UUID
+import org.opendc.core.User
+import org.opendc.core.workload.Workload
+import java.util.*
/**
* A workload that represents a directed acyclic graph (DAG) of tasks with control and data dependencies between tasks.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Metadata.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Metadata.kt
index 067f1179..99bd1cd3 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Metadata.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Metadata.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.workload
+package org.opendc.workflows.workload
/**
* Meta-data key for the deadline of a task.
diff --git a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Task.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Task.kt
index 82521faa..864eede5 100644
--- a/simulator/opendc-workflows/src/main/kotlin/com/atlarge/opendc/workflows/workload/Task.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/workload/Task.kt
@@ -22,11 +22,11 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.workload
+package org.opendc.workflows.workload
-import com.atlarge.opendc.compute.core.image.Image
-import com.atlarge.opendc.core.Identity
-import java.util.UUID
+import org.opendc.compute.core.image.Image
+import org.opendc.core.Identity
+import java.util.*
/**
* A stage of a [Job].
diff --git a/simulator/opendc-workflows/src/test/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
index 114003a3..6e9e7430 100644
--- a/simulator/opendc-workflows/src/test/kotlin/com/atlarge/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
+++ b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
@@ -22,26 +22,29 @@
* SOFTWARE.
*/
-package com.atlarge.opendc.workflows.service
+package org.opendc.workflows.service
-import com.atlarge.opendc.compute.metal.service.ProvisioningService
-import com.atlarge.opendc.format.environment.sc18.Sc18EnvironmentReader
-import com.atlarge.opendc.format.trace.gwf.GwfTraceReader
-import com.atlarge.opendc.workflows.service.stage.job.NullJobAdmissionPolicy
-import com.atlarge.opendc.workflows.service.stage.job.SubmissionTimeJobOrderPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.FirstFitResourceSelectionPolicy
-import com.atlarge.opendc.workflows.service.stage.resource.FunctionalResourceFilterPolicy
-import com.atlarge.opendc.workflows.service.stage.task.NullTaskEligibilityPolicy
-import com.atlarge.opendc.workflows.service.stage.task.SubmissionTimeTaskOrderPolicy
-import kotlinx.coroutines.*
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.async
+import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotEquals
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
+import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.format.environment.sc18.Sc18EnvironmentReader
+import org.opendc.format.trace.gwf.GwfTraceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
+import org.opendc.workflows.service.stage.job.NullJobAdmissionPolicy
+import org.opendc.workflows.service.stage.job.SubmissionTimeJobOrderPolicy
+import org.opendc.workflows.service.stage.resource.FirstFitResourceSelectionPolicy
+import org.opendc.workflows.service.stage.resource.FunctionalResourceFilterPolicy
+import org.opendc.workflows.service.stage.task.NullTaskEligibilityPolicy
+import org.opendc.workflows.service.stage.task.SubmissionTimeTaskOrderPolicy
import kotlin.math.max
/**