diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2025-03-24 09:15:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 09:15:53 +0100 |
| commit | 24f89ae21df182bb91d92e4a60b4049829ac4d9e (patch) | |
| tree | fd74543f27aabac92a9554808aeedbb60f657b21 /opendc-compute/opendc-compute-simulator/src/main/java/org | |
| parent | fb7d3010d6141dd518d8ebfacd41d399c3f9758d (diff) | |
Updated AllocationPolicy input (#324)
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src/main/java/org')
2 files changed, 9 insertions, 9 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java index 0538a951..657e7f1e 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java +++ b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java @@ -413,7 +413,7 @@ public final class ComputeService implements AutoCloseable, CarbonReceiver { long now = clock.millis(); SchedulingRequest request = new SchedulingRequest(task, now); - task.launchedAt = Instant.ofEpochMilli(now); + task.scheduledAt = Instant.ofEpochMilli(now); taskQueue.add(request); tasksPending++; requestSchedulingCycle(); diff --git a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ServiceTask.java b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ServiceTask.java index 4d5611a8..9fb9b5f0 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ServiceTask.java +++ b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ServiceTask.java @@ -56,12 +56,12 @@ public class ServiceTask { private ServiceFlavor flavor; public Workload workload; - private Map<String, ?> meta; // TODO: remove this + private final Map<String, ?> meta; // TODO: remove this private final List<TaskWatcher> watchers = new ArrayList<>(); private TaskState state = TaskState.CREATED; - Instant launchedAt = null; - Instant createdAt; + Instant scheduledAt = null; + Instant submittedAt; Instant finishedAt; SimHost host = null; private SchedulingRequest request = null; @@ -88,7 +88,7 @@ public class ServiceTask { this.workload = workload; this.meta = meta; - this.createdAt = this.service.getClock().instant(); + this.submittedAt = this.service.getClock().instant(); } @NotNull @@ -136,13 +136,13 @@ public class ServiceTask { } @Nullable - public Instant getLaunchedAt() { - return launchedAt; + public Instant getScheduledAt() { + return scheduledAt; } @Nullable - public Instant getCreatedAt() { - return createdAt; + public Instant getSubmittedAt() { + return submittedAt; } @Nullable |
