summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-runner/src/main')
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt7
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/internal/WebComputeMonitor.kt6
2 files changed, 7 insertions, 6 deletions
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
index b0f99084..226bad47 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt
@@ -215,7 +215,7 @@ public class OpenDCRunner(
private inner class SimulationTask(
private val scenario: Scenario,
private val repeat: Int,
- private val topology: List<HostSpec>,
+ private val topology: List<HostSpec>
) : RecursiveTask<WebComputeMonitor.Results>() {
override fun compute(): WebComputeMonitor.Results {
val monitor = WebComputeMonitor()
@@ -261,10 +261,11 @@ public class OpenDCRunner(
val phenomena = scenario.phenomena
val failureModel =
- if (phenomena.failures)
+ if (phenomena.failures) {
grid5000(Duration.ofDays(7))
- else
+ } else {
null
+ }
// Run workload trace
service.replay(clock, vms, seed, failureModel = failureModel, interference = phenomena.interference)
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/internal/WebComputeMonitor.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/internal/WebComputeMonitor.kt
index 76377c08..4db70d3d 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/internal/WebComputeMonitor.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/internal/WebComputeMonitor.kt
@@ -66,7 +66,7 @@ internal class WebComputeMonitor : ComputeMonitor {
val totalLostTime: Long = 0L,
val totalPowerDraw: Double = 0.0,
val totalFailureSlices: Double = 0.0,
- val totalFailureVmSlices: Double = 0.0,
+ val totalFailureVmSlices: Double = 0.0
)
private data class HostMetrics(
@@ -84,7 +84,7 @@ internal class WebComputeMonitor : ComputeMonitor {
max(reader.serversPending, serviceMetrics.vmWaitingCount),
max(reader.serversActive, serviceMetrics.vmActiveCount),
max(0, serviceMetrics.vmInactiveCount),
- max(reader.attemptsFailure, serviceMetrics.vmFailedCount),
+ max(reader.attemptsFailure, serviceMetrics.vmFailedCount)
)
}
@@ -115,7 +115,7 @@ internal class WebComputeMonitor : ComputeMonitor {
serviceMetrics.vmTotalCount,
serviceMetrics.vmWaitingCount,
serviceMetrics.vmInactiveCount,
- serviceMetrics.vmFailedCount,
+ serviceMetrics.vmFailedCount
)
}