summaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-ct/src/test
diff options
context:
space:
mode:
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>2020-04-23 08:02:47 +0200
committerRemigiusz Janeczek <remigiusz.janeczek@nokia.com>2020-04-23 13:17:18 +0200
commit66254ca1c5df0d7971764799088c8f20c79f4ca7 (patch)
tree0fe0f7bdedc9b90ebf942b0999c40134e49721b7 /sources/hv-collector-ct/src/test
parent77f5d0a87ae482c222bf2ef61f0b8ff9b3e5ff68 (diff)
Add metric for total latency without routing
Add metric for time between Producer and HV-VES output without sending to Kafka Refactor metrics test Add new latencies and individual cores usage to Grafana Issue-ID: DCAEGEN2-1576 Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com> Change-Id: I6112db76be1c7108c18336b50f9f12d5ce62c24a
Diffstat (limited to 'sources/hv-collector-ct/src/test')
-rw-r--r--sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt b/sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt
index 12555965..4a5474c6 100644
--- a/sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt
+++ b/sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt
@@ -42,6 +42,7 @@ class FakeMetrics : Metrics {
var lastProcessingTimeMicros: Double = -1.0; private set
var lastProcessingTimeWithoutRoutingMicros: Double = -1.0; private set
var lastToCollectorTravelTime: Double = -1.0; private set
+ var lastTotalLatencyWithoutRouting: Double = -1.0; private set
var messagesSentCount: Int = 0; private set
var clientRejectionCause = mutableMapOf<ClientRejectionCause, Int>(); private set
@@ -63,6 +64,7 @@ class FakeMetrics : Metrics {
override fun notifyMessageReadyForRouting(msg: VesMessage) {
lastProcessingTimeWithoutRoutingMicros = Duration.between(msg.wtpFrame.receivedAt, Instant.now()).toNanos() / 1000.0
+ lastTotalLatencyWithoutRouting = Duration.between(TimeUtils.epochMicroToInstant(msg.header.lastEpochMicrosec), Instant.now()).toNanos() / 1000.0
}
override fun notifyMessageSent(msg: RoutedMessage) {