diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-08-24 13:15:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-24 13:15:26 +0200 |
| commit | ac48fa12f36180de31154a7c828b4dc281dac94b (patch) | |
| tree | 3a1117b62e627094ea2859a8b1cb910ef7046851 /opendc-simulator/opendc-simulator-compute/src/main | |
| parent | 51515bb255b3b32ca3020419a0c84130a4d8d370 (diff) | |
| parent | 5266ecd476a18f601cb4eb6166f4c8338c440210 (diff) | |
merge: Add tests for interference and failures in Capelin
This pull request updates the Capelin experiments to test for interference and failure scenarios.
This allows us to track regressions in these subsystems more easily.
* Clean up Bitbrains trace reader to enable re-use
* Keep trace order after sampling
* Update Bitbrains trace tests
* Add support for reporting interfered work
* Add support for SimHost failure
* Add tests for interference and failures
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src/main')
| -rw-r--r-- | opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/kernel/SimFairShareHypervisor.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/kernel/SimFairShareHypervisor.kt b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/kernel/SimFairShareHypervisor.kt index 17130d34..c31b1f6b 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/kernel/SimFairShareHypervisor.kt +++ b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/kernel/SimFairShareHypervisor.kt @@ -67,6 +67,7 @@ public class SimFairShareHypervisor( private var lastDemand = 0.0 private var lastActual = 0.0 private var lastOvercommit = 0.0 + private var lastInterference = 0.0 private var lastReport = Long.MIN_VALUE override fun onConverge(timestamp: Long) { @@ -79,7 +80,7 @@ public class SimFairShareHypervisor( (counters.demand - lastDemand).toLong(), (counters.actual - lastActual).toLong(), (counters.overcommit - lastOvercommit).toLong(), - 0L, + (counters.interference - lastInterference).toLong(), lastCpuUsage, lastCpuDemand ) @@ -91,6 +92,7 @@ public class SimFairShareHypervisor( lastDemand = counters.demand lastActual = counters.actual lastOvercommit = counters.overcommit + lastInterference = counters.interference val load = lastCpuDemand / ctx.cpus.sumOf { it.model.frequency } triggerGovernors(load) |
