From d55f5c0c3df4b2ea136100e61424810ede749778 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Fri, 14 Dec 2018 12:05:47 +0100 Subject: Metric: Processing time Add processing time metric measured as difference between "sent to DMaaP" and "WTP decoded" events. Change-Id: I73bb665145019fcca5ae36e2199ed0e1cc088fdf Issue-ID: DCAEGEN2-1036 Signed-off-by: Piotr Jaszczyk --- .../main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sources/hv-collector-domain/src/main') diff --git a/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt b/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt index 1257c6bb..d1fdb10c 100644 --- a/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt +++ b/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt @@ -22,6 +22,8 @@ package org.onap.dcae.collectors.veshv.domain import arrow.core.Either import arrow.core.Either.Companion.left import arrow.core.Either.Companion.right +import java.time.Instant +import java.time.temporal.Temporal /** @@ -58,7 +60,8 @@ data class WireFrameMessage(val payload: ByteData, val versionMajor: Short, val versionMinor: Short, val payloadType: Int, - val payloadSize: Int + val payloadSize: Int, + val receivedAt: Temporal = Instant.now() ) { constructor(payload: ByteArray) : this( ByteData(payload), -- cgit 1.2.3-korg