From 145153ddda7f9caf95831ab27244351772a121d8 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 15 Jun 2021 11:43:48 +0200 Subject: exp: Fix execution of energy experiments This change fixes the execution of the Energy21 experiments which failed due to various changes in the OpenDC codebase. First, the directory structure is now required to be pre-generated before the writer starts writing the experiment output. Second, we must include the configuration of the Capelin experiment in this experiment in order to workaround an issue with harness filtering. --- .../opendc/experiments/capelin/monitor/ParquetExperimentMonitor.kt | 4 ++-- .../opendc-experiments-energy21/src/main/resources/application.conf | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'opendc-experiments') diff --git a/opendc-experiments/opendc-experiments-capelin/src/main/kotlin/org/opendc/experiments/capelin/monitor/ParquetExperimentMonitor.kt b/opendc-experiments/opendc-experiments-capelin/src/main/kotlin/org/opendc/experiments/capelin/monitor/ParquetExperimentMonitor.kt index 983b4cff..bfdf5f3e 100644 --- a/opendc-experiments/opendc-experiments-capelin/src/main/kotlin/org/opendc/experiments/capelin/monitor/ParquetExperimentMonitor.kt +++ b/opendc-experiments/opendc-experiments-capelin/src/main/kotlin/org/opendc/experiments/capelin/monitor/ParquetExperimentMonitor.kt @@ -43,11 +43,11 @@ private val logger = KotlinLogging.logger {} */ public class ParquetExperimentMonitor(base: File, partition: String, bufferSize: Int) : ExperimentMonitor { private val hostWriter = ParquetHostEventWriter( - File(base, "host-metrics/$partition/data.parquet"), + File(base, "host-metrics/$partition/data.parquet").also { it.parentFile.mkdirs() }, bufferSize ) private val provisionerWriter = ParquetProvisionerEventWriter( - File(base, "provisioner-metrics/$partition/data.parquet"), + File(base, "provisioner-metrics/$partition/data.parquet").also { it.parentFile.mkdirs() }, bufferSize ) diff --git a/opendc-experiments/opendc-experiments-energy21/src/main/resources/application.conf b/opendc-experiments/opendc-experiments-energy21/src/main/resources/application.conf index 3e011862..263da0fe 100644 --- a/opendc-experiments/opendc-experiments-energy21/src/main/resources/application.conf +++ b/opendc-experiments/opendc-experiments-energy21/src/main/resources/application.conf @@ -6,3 +6,9 @@ opendc.experiments.energy21 { # Path to the output directory to write the results to output-path = output } + +opendc.experiments.capelin { + env-path = input/environments/ + trace-path = input/traces/ + output-path = output +} -- cgit v1.2.3