summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-09-13 14:48:02 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-09-17 16:48:02 +0200
commit5f0b6b372487d79594cf59010822e160f351e0be (patch)
treeacad4d2e496da334bafc1fd256e73bbd3d5c481c /opendc-compute/opendc-compute-simulator/src
parenteef8ea3ab40a4e4a12ba96f839c35c5804884bc1 (diff)
refactor(telemetry): Simplify CoroutineMetricReader
This change simplifies the CoroutineMetricReader implementation by removing the seperation of reader and exporter jobs.
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
index 31215e9a..9fa8af34 100644
--- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
+++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt
@@ -46,6 +46,7 @@ import org.opendc.simulator.core.runBlockingSimulation
import org.opendc.simulator.resources.SimResourceInterpreter
import org.opendc.telemetry.sdk.metrics.export.CoroutineMetricReader
import org.opendc.telemetry.sdk.toOtelClock
+import java.time.Duration
import java.util.*
import kotlin.coroutines.resume
@@ -149,7 +150,7 @@ internal class SimHostTest {
override fun shutdown(): CompletableResultCode = CompletableResultCode.ofSuccess()
},
- exportInterval = duration * 1000L
+ exportInterval = Duration.ofSeconds(duration)
)
coroutineScope {
@@ -261,7 +262,7 @@ internal class SimHostTest {
override fun shutdown(): CompletableResultCode = CompletableResultCode.ofSuccess()
},
- exportInterval = duration * 1000L
+ exportInterval = Duration.ofSeconds(duration)
)
coroutineScope {