summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-telemetry
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-02-16 15:11:05 +0100
committerGitHub <noreply@github.com>2024-02-16 15:11:05 +0100
commitd28002a3c151d198298574312f32f1cb43f3a660 (patch)
tree9bdb705dcaf6f99f0189cb2d62421e555635bec2 /opendc-compute/opendc-compute-telemetry
parent29f3fd2f2b88b68524e54b9ed00cce5fd6b6c949 (diff)
Metric update (#205)
* Updated metrics to consistently be ms * Updated metrics to consistently be ms * Updated metric documentation on the site * Updated some tests to work with the updated metrics
Diffstat (limited to 'opendc-compute/opendc-compute-telemetry')
-rw-r--r--opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetHostDataWriter.kt4
-rw-r--r--opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServerDataWriter.kt6
-rw-r--r--opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServiceDataWriter.kt3
-rw-r--r--opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/table/HostTableReader.kt8
4 files changed, 10 insertions, 11 deletions
diff --git a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetHostDataWriter.kt b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetHostDataWriter.kt
index 8871570d..a6799ef8 100644
--- a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetHostDataWriter.kt
+++ b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetHostDataWriter.kt
@@ -170,7 +170,7 @@ public class ParquetHostDataWriter(path: File, bufferSize: Int) :
.addFields(
Types
.required(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("timestamp"),
Types
.required(PrimitiveType.PrimitiveTypeName.BINARY)
@@ -232,7 +232,7 @@ public class ParquetHostDataWriter(path: File, bufferSize: Int) :
.named("downtime"),
Types
.optional(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("boot_time")
)
.named("host")
diff --git a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServerDataWriter.kt b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServerDataWriter.kt
index 6645028e..e8a28016 100644
--- a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServerDataWriter.kt
+++ b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServerDataWriter.kt
@@ -152,7 +152,7 @@ public class ParquetServerDataWriter(path: File, bufferSize: Int) :
.addFields(
Types
.required(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("timestamp"),
Types
.required(PrimitiveType.PrimitiveTypeName.BINARY)
@@ -195,11 +195,11 @@ public class ParquetServerDataWriter(path: File, bufferSize: Int) :
.named("downtime"),
Types
.optional(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("provision_time"),
Types
.optional(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("boot_time")
)
diff --git a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServiceDataWriter.kt b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServiceDataWriter.kt
index 6908a018..a487203e 100644
--- a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServiceDataWriter.kt
+++ b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/export/parquet/ParquetServiceDataWriter.kt
@@ -25,7 +25,6 @@ package org.opendc.compute.telemetry.export.parquet
import org.apache.hadoop.conf.Configuration
import org.apache.parquet.hadoop.api.WriteSupport
import org.apache.parquet.io.api.RecordConsumer
-import org.apache.parquet.schema.LogicalTypeAnnotation
import org.apache.parquet.schema.MessageType
import org.apache.parquet.schema.PrimitiveType
import org.apache.parquet.schema.Types
@@ -102,7 +101,7 @@ public class ParquetServiceDataWriter(path: File, bufferSize: Int) :
.addFields(
Types
.required(PrimitiveType.PrimitiveTypeName.INT64)
- .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
+// .`as`(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS))
.named("timestamp"),
Types
.required(PrimitiveType.PrimitiveTypeName.INT32)
diff --git a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/table/HostTableReader.kt b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/table/HostTableReader.kt
index 9af0a0c0..bfe2f281 100644
--- a/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/table/HostTableReader.kt
+++ b/opendc-compute/opendc-compute-telemetry/src/main/kotlin/org/opendc/compute/telemetry/table/HostTableReader.kt
@@ -84,22 +84,22 @@ public interface HostTableReader {
public val cpuUtilization: Double
/**
- * The duration (in seconds) that a CPU was active in the host.
+ * The duration (in ms) that a CPU was active in the host.
*/
public val cpuActiveTime: Long
/**
- * The duration (in seconds) that a CPU was idle in the host.
+ * The duration (in ms) that a CPU was idle in the host.
*/
public val cpuIdleTime: Long
/**
- * The duration (in seconds) that a vCPU wanted to run, but no capacity was available.
+ * The duration (in ms) that a vCPU wanted to run, but no capacity was available.
*/
public val cpuStealTime: Long
/**
- * The duration (in seconds) of CPU time that was lost due to interference.
+ * The duration (in ms) of CPU time that was lost due to interference.
*/
public val cpuLostTime: Long