diff options
Diffstat (limited to 'simulator/opendc-runner-web')
| -rw-r--r-- | simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt | 6 | ||||
| -rw-r--r-- | simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/WebExperimentMonitor.kt | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt index 90918f44..a368dfee 100644 --- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt +++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt @@ -234,7 +234,7 @@ public class RunnerCli : CliktCommand(name = "runner") { ) "mem-inv" -> FilterScheduler( filters = listOf(ComputeFilter(), ComputeCapabilitiesFilter()), - weighers = listOf(MemoryWeigher() to -1.0) + weighers = listOf(MemoryWeigher() to 1.0) ) "core-mem" -> FilterScheduler( filters = listOf(ComputeFilter(), ComputeCapabilitiesFilter()), @@ -242,7 +242,7 @@ public class RunnerCli : CliktCommand(name = "runner") { ) "core-mem-inv" -> FilterScheduler( filters = listOf(ComputeFilter(), ComputeCapabilitiesFilter()), - weighers = listOf(CoreMemoryWeigher() to -1.0) + weighers = listOf(CoreMemoryWeigher() to 1.0) ) "active-servers" -> FilterScheduler( filters = listOf(ComputeFilter(), ComputeCapabilitiesFilter()), @@ -276,7 +276,7 @@ public class RunnerCli : CliktCommand(name = "runner") { ) val topologyId = scenario.getEmbedded(listOf("topology", "topologyId"), ObjectId::class.java) val environment = TopologyParser(topologies, topologyId) - val failureFrequency = operational.get("failureFrequency", Number::class.java)?.toDouble() ?: 24.0 * 7 + val failureFrequency = if (operational.getBoolean("failuresEnabled", false)) 24.0 * 7 else 0.0 withComputeService(clock, meterProvider, environment, allocationPolicy) { scheduler -> val failureDomain = if (failureFrequency > 0) { diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/WebExperimentMonitor.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/WebExperimentMonitor.kt index 8f39b8ac..c913f82f 100644 --- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/WebExperimentMonitor.kt +++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/WebExperimentMonitor.kt @@ -84,7 +84,7 @@ public class WebExperimentMonitor : ExperimentMonitor { hostAggregateMetrics.totalGrantedBurst + event.grantedBurst, hostAggregateMetrics.totalOvercommittedBurst + event.overcommissionedBurst, hostAggregateMetrics.totalInterferedBurst + event.interferedBurst, - hostAggregateMetrics.totalPowerDraw + (slices * (event.powerDraw / 12)), + hostAggregateMetrics.totalPowerDraw + (event.duration * event.powerDraw) / 3600, hostAggregateMetrics.totalFailureSlices + if (event.host.state != HostState.UP) slices else 0, hostAggregateMetrics.totalFailureVmSlices + if (event.host.state != HostState.UP) event.vmCount * slices else 0 ) |
