From 44215bd668c5fa3efe2f57fc577824478b00af57 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 1 Sep 2022 14:38:34 +0200 Subject: refactor(sim/compute): Re-implement using flow2 This change re-implements the OpenDC compute simulator framework using the new flow2 framework for modelling multi-edge flow networks. The re-implementation is written in Java and focusses on performance and clean API surface. --- .../experiments/capelin/CapelinIntegrationTest.kt | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'opendc-experiments/opendc-experiments-capelin/src/test') diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt index 70363b6c..47058caa 100644 --- a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt +++ b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt @@ -120,11 +120,11 @@ class CapelinIntegrationTest { { assertEquals(0, monitor.serversActive, "All VMs should finish after a run") }, { assertEquals(0, monitor.attemptsFailure, "No VM should be unscheduled") }, { assertEquals(0, monitor.serversPending, "No VM should not be in the queue") }, - { assertEquals(223393683, monitor.idleTime) { "Incorrect idle time" } }, - { assertEquals(66977508, monitor.activeTime) { "Incorrect active time" } }, - { assertEquals(3160381, monitor.stealTime) { "Incorrect steal time" } }, + { assertEquals(223394204, monitor.idleTime) { "Incorrect idle time" } }, + { assertEquals(66976984, monitor.activeTime) { "Incorrect active time" } }, + { assertEquals(3160316, monitor.stealTime) { "Incorrect steal time" } }, { assertEquals(0, monitor.lostTime) { "Incorrect lost time" } }, - { assertEquals(5.840939264814157E9, monitor.energyUsage, 0.01) { "Incorrect power draw" } } + { assertEquals(5.84093E9, monitor.energyUsage, 1E4) { "Incorrect power draw" } } ) } @@ -160,11 +160,11 @@ class CapelinIntegrationTest { // Note that these values have been verified beforehand assertAll( - { assertEquals(10999592, monitor.idleTime) { "Idle time incorrect" } }, - { assertEquals(9741207, monitor.activeTime) { "Active time incorrect" } }, + { assertEquals(10999504, monitor.idleTime) { "Idle time incorrect" } }, + { assertEquals(9741294, monitor.activeTime) { "Active time incorrect" } }, { assertEquals(0, monitor.stealTime) { "Steal time incorrect" } }, { assertEquals(0, monitor.lostTime) { "Lost time incorrect" } }, - { assertEquals(7.011676470304312E8, monitor.energyUsage, 0.01) { "Incorrect power draw" } } + { assertEquals(7.0116E8, monitor.energyUsage, 1E4) { "Incorrect power draw" } } ) } @@ -199,10 +199,10 @@ class CapelinIntegrationTest { // Note that these values have been verified beforehand assertAll( - { assertEquals(6028050, monitor.idleTime) { "Idle time incorrect" } }, - { assertEquals(14712749, monitor.activeTime) { "Active time incorrect" } }, - { assertEquals(12532907, monitor.stealTime) { "Steal time incorrect" } }, - { assertEquals(470593, monitor.lostTime) { "Lost time incorrect" } } + { assertEquals(6027979, monitor.idleTime) { "Idle time incorrect" } }, + { assertEquals(14712820, monitor.activeTime) { "Active time incorrect" } }, + { assertEquals(12532979, monitor.stealTime) { "Steal time incorrect" } }, + { assertEquals(445913, monitor.lostTime) { "Lost time incorrect" } } ) } @@ -229,8 +229,8 @@ class CapelinIntegrationTest { // Note that these values have been verified beforehand assertAll( - { assertEquals(10085158, monitor.idleTime) { "Idle time incorrect" } }, - { assertEquals(8539158, monitor.activeTime) { "Active time incorrect" } }, + { assertEquals(10085103, monitor.idleTime) { "Idle time incorrect" } }, + { assertEquals(8539212, monitor.activeTime) { "Active time incorrect" } }, { assertEquals(0, monitor.stealTime) { "Steal time incorrect" } }, { assertEquals(0, monitor.lostTime) { "Lost time incorrect" } }, { assertEquals(2328039558, monitor.uptime) { "Uptime incorrect" } } -- cgit v1.2.3