summaryrefslogtreecommitdiff
path: root/simulator/opendc/opendc-experiments-sc20/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-09-17 16:49:16 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-09-17 16:49:16 +0200
commit6b02680813d3bb00ba67d667df92682ab2592009 (patch)
tree5d628d5b35098282a20d2c748a8a05a6c4badf4c /simulator/opendc/opendc-experiments-sc20/src
parentb8c3b07804475c8ca4c7187f3690d9dfacaf43fe (diff)
Require specification of single portfolio
This change adds the requirement for the command line interface to specify at least a single portfolio to run. Previously, the experiment runner would start and terminate silently without reporting that no portfolios were run. This behavior is confusing especially for users not familiar with the portfolios concept.
Diffstat (limited to 'simulator/opendc/opendc-experiments-sc20/src')
-rw-r--r--simulator/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/simulator/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt b/simulator/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt
index c5e4f90e..ec721ff0 100644
--- a/simulator/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt
+++ b/simulator/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Main.kt
@@ -53,7 +53,7 @@ private val logger = KotlinLogging.logger {}
/**
* Represents the command for running the experiment.
*/
-class ExperimentCli : CliktCommand(name = "sc20-experiment") {
+class ExperimentCli : CliktCommand(name = "sc20-experiment", help = "Run experiments from the Capelin paper") {
/**
* The path to the directory where the topology descriptions are located.
*/
@@ -72,14 +72,14 @@ class ExperimentCli : CliktCommand(name = "sc20-experiment") {
* The path to the performance interference model.
*/
private val performanceInterferenceStream by option("--performance-interference-model", help = "path to the performance interference file")
- .file()
+ .file(canBeDir = false)
.convert { it.inputStream() as InputStream }
/**
* The path to the original VM placements file.
*/
private val vmPlacements by option("--vm-placements-file", help = "path to the VM placement file")
- .file()
+ .file(canBeDir = false)
.convert {
Sc20VmPlacementReader(it.inputStream().buffered()).construct()
}
@@ -88,7 +88,7 @@ class ExperimentCli : CliktCommand(name = "sc20-experiment") {
/**
* The selected portfolios to run.
*/
- private val portfolios by option("--portfolio")
+ private val portfolios by option("--portfolio", help = "portfolio of scenarios to explore")
.choice(
"hor-ver" to { experiment: Experiment, i: Int -> HorVerPortfolio(experiment, i) }
as (Experiment, Int) -> Portfolio,
@@ -100,12 +100,12 @@ class ExperimentCli : CliktCommand(name = "sc20-experiment") {
"more-hpc" to { experiment, i -> MoreHpcPortfolio(experiment, i) },
ignoreCase = true
)
- .multiple()
+ .multiple(required = true)
/**
* The maximum number of worker threads to use.
*/
- private val parallelism by option("--parallelism")
+ private val parallelism by option("--parallelism", help = "maximum number of concurrent simulation runs")
.int()
.default(Runtime.getRuntime().availableProcessors())