diff options
author | Remigiusz Janeczek <remigiusz.janeczek@nokia.com> | 2020-04-23 08:02:47 +0200 |
---|---|---|
committer | Remigiusz Janeczek <remigiusz.janeczek@nokia.com> | 2020-04-23 13:17:18 +0200 |
commit | 66254ca1c5df0d7971764799088c8f20c79f4ca7 (patch) | |
tree | 0fe0f7bdedc9b90ebf942b0999c40134e49721b7 /sources/hv-collector-main/src/main | |
parent | 77f5d0a87ae482c222bf2ef61f0b8ff9b3e5ff68 (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-main/src/main')
-rw-r--r-- | sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt index e0d99fc6..a949803f 100644 --- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt +++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt @@ -66,6 +66,10 @@ class MicrometerMetrics internal constructor( .maximumExpectedValue(MAX_BUCKET_DURATION) .publishPercentileHistogram(true) .register(registry) + private val totalLatencyWithoutRouting = Timer.builder(name(MESSAGES, LATENCY, WITHOUT, ROUTING)) + .maximumExpectedValue(MAX_BUCKET_DURATION) + .publishPercentileHistogram(true) + .register(registry) private val totalLatency = Timer.builder(name(MESSAGES, LATENCY)) .maximumExpectedValue(MAX_BUCKET_DURATION) .publishPercentileHistogram(true) @@ -104,7 +108,9 @@ class MicrometerMetrics internal constructor( } override fun notifyMessageReadyForRouting(msg: VesMessage) { - processingTimeWithoutRouting.record(Duration.between(msg.wtpFrame.receivedAt, Instant.now())) + val now = Instant.now() + processingTimeWithoutRouting.record(Duration.between(msg.wtpFrame.receivedAt, now)) + totalLatencyWithoutRouting.record(Duration.between(epochMicroToInstant(msg.header.lastEpochMicrosec), now)) } override fun notifyMessageReceived(msg: WireFrameMessage) { |