From 8bae0f3053a53aac9d483ae97d99f2e7e80b42ef Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 1 Sep 2021 22:30:39 +0200 Subject: refactor(capelin): Migrate trace reader to new trace API This change updates the trace reading classes in the Capelin experiment to use the new trace API in order to re-use many of the trace reading parts. --- .../kotlin/org/opendc/trace/ResourceColumns.kt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt') diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt index 65055762..8945823a 100644 --- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt +++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/ResourceColumns.kt @@ -23,7 +23,29 @@ @file:JvmName("ResourceColumns") package org.opendc.trace +import java.time.Instant + /** * Identifier of the resource. */ public val RESOURCE_ID: TableColumn = stringColumn("resource:id") + +/** + * Start time for the resource. + */ +public val RESOURCE_START_TIME: TableColumn = TableColumn("resource:start_time", Instant::class.java) + +/** + * End time for the resource. + */ +public val RESOURCE_END_TIME: TableColumn = TableColumn("resource:end_time", Instant::class.java) + +/** + * Number of CPUs for the resource. + */ +public val RESOURCE_NCPUS: TableColumn = intColumn("resource:num_cpus") + +/** + * Memory capacity for the resource. + */ +public val RESOURCE_MEM_CAPACITY: TableColumn = doubleColumn("resource:mem_capacity") -- cgit v1.2.3