summaryrefslogtreecommitdiff
path: root/opendc/opendc-experiments-sc20/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-04-12 13:59:00 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-04-12 13:59:00 +0200
commit8d4d552e706ad5c5adebc774920337b4f201ac1f (patch)
treedb0332a19de49d5e4580bfd4f0ddfbc2ab887f18 /opendc/opendc-experiments-sc20/src/main
parent5f141c8b6aa6cfe96333f0cc02015e490b90fca6 (diff)
bug: Fix invalid FLOPs value for trace fragments
This change fixes the invalid FLOPs values for the trace fragments which were multiplied twice by the number of cores of the VM.
Diffstat (limited to 'opendc/opendc-experiments-sc20/src/main')
-rw-r--r--opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt8
-rw-r--r--opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt2
2 files changed, 8 insertions, 2 deletions
diff --git a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
index c0d6de03..245aa250 100644
--- a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
+++ b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
@@ -17,7 +17,7 @@ class Sc20Monitor(
private val lastServerStates = mutableMapOf<Server, Pair<ServerState, Long>>()
init {
- outputFile.write("time,duration,requestedBurst,grantedBurst,overcommissionedBurst,interferedBurst,numberOfDeployedImages,server,hostState,hostUsage,powerDraw,failedVms\n")
+ outputFile.write("time,duration,requestedBurst,grantedBurst,overcommissionedBurst,interferedBurst,cpuUsage,cpuDemand,numberOfDeployedImages,server,hostState,hostUsage,powerDraw,failedVms\n")
}
suspend fun onVmStateChanged(server: Server) {}
@@ -32,6 +32,8 @@ class Sc20Monitor(
0,
0,
0,
+ 0.0,
+ 0.0,
0,
server,
duration
@@ -49,6 +51,8 @@ class Sc20Monitor(
grantedBurst: Long,
overcommissionedBurst: Long,
interferedBurst: Long,
+ cpuUsage: Double,
+ cpuDemand: Double,
numberOfDeployedImages: Int,
hostServer: Server,
duration: Long = 5 * 60 * 1000L
@@ -60,7 +64,7 @@ class Sc20Monitor(
val usage = driver.usage.first()
val powerDraw = driver.powerDraw.first()
- outputFile.write("$time,$duration,$requestedBurst,$grantedBurst,$overcommissionedBurst,$interferedBurst,$numberOfDeployedImages,${hostServer.uid},${hostServer.state},$usage,$powerDraw")
+ outputFile.write("$time,$duration,$requestedBurst,$grantedBurst,$overcommissionedBurst,$interferedBurst,$cpuUsage,$cpuDemand,$numberOfDeployedImages,${hostServer.uid},${hostServer.state},$usage,$powerDraw")
outputFile.newLine()
}
diff --git a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
index ede18b40..c75bde30 100644
--- a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
+++ b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
@@ -201,6 +201,8 @@ fun main(args: Array<String>) {
event.grantedBurst,
event.overcommissionedBurst,
event.interferedBurst,
+ event.cpuUsage,
+ event.cpuDemand,
event.numberOfDeployedImages,
event.hostServer
)