summaryrefslogtreecommitdiff
path: root/opendc/opendc-experiments-sc20/src
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2020-04-12 15:44:53 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2020-04-12 15:44:53 +0200
commit310daf42af741dee2f11d98eb929d2b6c0db141c (patch)
treea0570137b64651bfecd0d3a1d0e0383c2c327cea /opendc/opendc-experiments-sc20/src
parent5f141c8b6aa6cfe96333f0cc02015e490b90fca6 (diff)
parent4a5ef5a41c8e008d5c09261de550d3f55eaa3348 (diff)
Merge branch 'bug/virt-driver-behavior' into '2.x'
Address multiple (performance) issues See merge request opendc/opendc-simulator!58
Diffstat (limited to 'opendc/opendc-experiments-sc20/src')
-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
)