diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-22 10:28:37 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-22 14:49:35 +0200 |
| commit | 6171ab09f1df2ab3475a7b28ece383a9f87a77c5 (patch) | |
| tree | 54a7ae4ef7c482dfdc04ba3eef37ab428bee3b33 /opendc-web/opendc-web-runner | |
| parent | 507ff6223d277ebc6744b92b4030d94f20a92a02 (diff) | |
refactor(sim/compute): Extract Random dependency from interference model
This change moves the Random dependency outside the interference model,
to allow the interference model to be completely immutable and passable
between different simulations.
Diffstat (limited to 'opendc-web/opendc-web-runner')
| -rw-r--r-- | opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt | 3 |
1 files changed, 2 insertions, 1 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 c958bdb2..d5dbed1c 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 @@ -220,6 +220,7 @@ public class OpenDCRunner( coroutineContext, clock, computeScheduler, + seed = 0L, failureModel, interferenceModel.takeIf { phenomena.interference } ) @@ -230,7 +231,7 @@ public class OpenDCRunner( // Instantiate the topology onto the simulator simulator.apply(topology) // Run workload trace - simulator.run(vms, seeder.nextLong(), servers) + simulator.run(vms, servers) val serviceMetrics = simulator.service.getSchedulerStats() logger.debug { |
