diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-18 15:51:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 15:51:13 +0200 |
| commit | 02776c958a3254735b2be7d9fb1627f75e7f80cd (patch) | |
| tree | 155d96b0f1a5173e4ac884ac6c9cbccea011918f /opendc-simulator/opendc-simulator-compute/src | |
| parent | 1ce710ebaa8b071a3b30447d431f4af422f25156 (diff) | |
| parent | 7cbb401a0939cc58daae8b481a97f4b05140ec3b (diff) | |
build: Add support for Java 16
This pull request adds support for building OpenDC using Java 16.
To make this possible, we have upgraded the following dependencies:
- Kotlin from 1.4.3 to 1.5.0
- Jacoco from 0.8.6 to 0.8.7
- Gradle from 7.0 to 7.0.2
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src')
| -rw-r--r-- | opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt index f6324e13..e501033a 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt +++ b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt @@ -80,7 +80,7 @@ public abstract class SimAbstractMachine(private val clock: Clock) : SimMachine override suspend fun run(workload: SimWorkload, meta: Map<String, Any>): Unit = withContext(context) { require(!isTerminated) { "Machine is terminated" } val ctx = Context(meta) - val totalCapacity = model.cpus.sumByDouble { it.frequency } + val totalCapacity = model.cpus.sumOf { it.frequency } _speed = DoubleArray(model.cpus.size) { 0.0 } var totalSpeed = 0.0 |
