diff options
| author | Radu Nicolae <rnicolae04@gmail.com> | 2025-06-16 18:01:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-16 18:01:07 +0200 |
| commit | 0df3d9ced743ac3385dd710c7133a6cf369b051c (patch) | |
| tree | eff5d6d67c275643e229731ba08c5fe7dc4ccd0a /opendc-compute | |
| parent | c7e303ad1b5217e2ff24cee9538ac841d6149706 (diff) | |
integrated M3SA, updated with tests and CpuPowerModels
Diffstat (limited to 'opendc-compute')
2 files changed, 15 insertions, 2 deletions
diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt index afc3ee62..b6c945d2 100644 --- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt +++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt @@ -173,7 +173,15 @@ private fun HostJSONSpec.toHostSpec(clusterName: String): HostSpec { ) val powerModel = - getPowerModel(powerModel.modelType, powerModel.power.toWatts(), powerModel.maxPower.toWatts(), powerModel.idlePower.toWatts()) + getPowerModel( + powerModel.modelType, + powerModel.power.toWatts(), + powerModel.maxPower.toWatts(), + powerModel.idlePower.toWatts(), + powerModel.calibrationFactor, + powerModel.asymUtil, + powerModel.dvfs, + ) val hostSpec = HostSpec( diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt index f9675b31..8cbf818b 100644 --- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt +++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt @@ -123,7 +123,9 @@ public data class PowerModelSpec( val power: Power = Power.ofWatts(400), val maxPower: Power, val idlePower: Power, - val carbonTracePaths: String? = null, + val calibrationFactor: Double = 1.0, + val asymUtil: Double = 0.0, + val dvfs: Boolean = true, ) { init { require(maxPower >= idlePower) { "The max power of a power model can not be less than the idle power" } @@ -136,6 +138,9 @@ public data class PowerModelSpec( power = Power.ofWatts(350), maxPower = Power.ofWatts(400.0), idlePower = Power.ofWatts(200.0), + calibrationFactor = 1.0, + asymUtil = 0.0, + dvfs = true, ) } } |
