summaryrefslogtreecommitdiff
path: root/simulator/opendc-experiments
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-04-07 16:26:00 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-04-07 20:38:46 +0200
commit4e9f72b50473d73f9ca9e30a7fbeb97a8a1c0555 (patch)
tree6d4855c6a93cfc41064e73b169e2f39d5530a5ae /simulator/opendc-experiments
parent95a0ed6911f136fb25bb76d6b6e010bf66b8ba5b (diff)
simulator: Move away from StateFlow for low-level monitoring
This change removes the StateFlow speed property on the SimResourceSource, as the overhead of emitting changes to the StateFlow is too high in a single-thread context. Our new approach is to use direct callbacks and counters.
Diffstat (limited to 'simulator/opendc-experiments')
-rw-r--r--simulator/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/simulator/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt b/simulator/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
index 02cfdc06..0441cfed 100644
--- a/simulator/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
+++ b/simulator/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
@@ -119,7 +119,7 @@ class CapelinIntegrationTest {
{ assertEquals(0, monitorResults.unscheduledVms, "No VM should not be unscheduled") },
{ assertEquals(0, monitorResults.queuedVms, "No VM should not be in the queue") },
{ assertEquals(1672916917970, monitor.totalRequestedBurst) { "Incorrect requested burst" } },
- { assertEquals(435179794565, monitor.totalGrantedBurst) { "Incorrect granted burst" } },
+ { assertEquals(434262255818, monitor.totalGrantedBurst) { "Incorrect granted burst" } },
{ assertEquals(1236692477983, monitor.totalOvercommissionedBurst) { "Incorrect overcommitted burst" } },
{ assertEquals(0, monitor.totalInterferedBurst) { "Incorrect interfered burst" } }
)
@@ -157,7 +157,7 @@ class CapelinIntegrationTest {
// Note that these values have been verified beforehand
assertAll(
{ assertEquals(702636229989, monitor.totalRequestedBurst) { "Total requested work incorrect" } },
- { assertEquals(172807361391, monitor.totalGrantedBurst) { "Total granted work incorrect" } },
+ { assertEquals(172636987071, monitor.totalGrantedBurst) { "Total granted work incorrect" } },
{ assertEquals(528959213229, monitor.totalOvercommissionedBurst) { "Total overcommitted work incorrect" } },
{ assertEquals(0, monitor.totalInterferedBurst) { "Total interfered work incorrect" } }
)