diff options
| author | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-17 18:08:56 +0200 |
|---|---|---|
| committer | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-17 18:08:56 +0200 |
| commit | 4562f52c9b540944200b33d4ffbd60b3cbc5ee79 (patch) | |
| tree | 82d028faf5a0555cb80ce9602890a3257ef695c2 /opendc-compute | |
| parent | 78a9d920cc8aca951aff798272b0d5e7a2e356b9 (diff) | |
Diffstat (limited to 'opendc-compute')
3 files changed, 6 insertions, 3 deletions
diff --git a/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/models/TraceBasedFailureModel.kt b/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/models/TraceBasedFailureModel.kt index 3bd253da..6cb02bb8 100644 --- a/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/models/TraceBasedFailureModel.kt +++ b/opendc-compute/opendc-compute-failure/src/main/kotlin/org/opendc/compute/failure/models/TraceBasedFailureModel.kt @@ -98,6 +98,10 @@ public class TraceBasedFailureModel( pathToFile: String, startPoint: Double, ): List<Failure> { + /* + I assume this returns a file descriptor. + @Mateusz Kwiatkowski + */ val trace = Trace.open(File(pathToFile), "failure") val reader = checkNotNull(trace.getTable(TABLE_FAILURES)).newReader() diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt index baadd806..0edd97cf 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt @@ -60,9 +60,6 @@ public class SmartScheduler : ComputeScheduler { return SchedulingResult(SchedulingResultType.EMPTY) } - // Benefits of a digital twin: during operations you make sure what is happening in the real world. - // The use-case is making split-second automated decisions before operators can make them. - // Make a strong case for making a Digital Twin. override fun removeTask( task: ServiceTask, host: HostView?, diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/telemetry/KafkaComputeMonitor.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/telemetry/KafkaComputeMonitor.kt index c8368af2..ddd4a28a 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/telemetry/KafkaComputeMonitor.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/telemetry/KafkaComputeMonitor.kt @@ -47,6 +47,8 @@ public class KafkaComputeMonitor : ComputeMonitor { .setTasksactive(reader.tasksActive) .setCpuutilization(reader.cpuUtilization) .setEnergyusage(reader.energyUsage) + .setUptime(reader.uptime.toDouble()) + .setDowntime(reader.downtime.toDouble()) .build() this.send(packet) |
