summaryrefslogtreecommitdiff
path: root/opendc
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-03-19 12:26:37 +0100
committerGeorgios Andreadis <info@gandreadis.com>2020-03-19 12:26:37 +0100
commita465f3eac0fb2718859f1adea8cce0fe69bd18f7 (patch)
tree765610632bd14ee835c26d4e9092f95029b2ec00 /opendc
parentbc1f311e2d74d969717d670552e0511bb2bc9c61 (diff)
Merge changes
Diffstat (limited to 'opendc')
-rw-r--r--opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt11
1 files changed, 9 insertions, 2 deletions
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 82ca2061..f0d3fc8d 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
@@ -44,6 +44,7 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import java.io.File
+import java.io.FileInputStream
import java.io.FileReader
import java.util.ServiceLoader
import kotlin.math.max
@@ -51,6 +52,7 @@ import kotlin.math.max
class ExperimentParameters(parser: ArgParser) {
val traceDirectory by parser.storing("path to the trace directory")
val environmentFile by parser.storing("path to the environment file")
+ val performanceInterferenceFile by parser.storing("path to the performance interference file").default { null }
val outputFile by parser.storing("path to where the output should be stored")
.default { "sc20-experiment-results.csv" }
val selectedVms by parser.storing("the VMs to run") { parseVMs(this) }
@@ -98,9 +100,14 @@ fun main(args: Array<String>) {
val environment = Sc20ClusterEnvironmentReader(File(environmentFile))
.use { it.construct(root) }
- val performanceInterferenceModel = Sc20PerformanceInterferenceReader(
+ val performanceInterferenceStream = if (performanceInterferenceFile != null) {
+ FileInputStream(File(performanceInterferenceFile!!))
+ } else {
object {}.javaClass.getResourceAsStream("/env/performance-interference.json")
- ).construct()
+ }
+
+ val performanceInterferenceModel = Sc20PerformanceInterferenceReader(performanceInterferenceStream)
+ .construct()
println(simulationContext.clock.instant())