diff options
author | 2019-10-07 11:46:48 +0200 | |
---|---|---|
committer | 2019-10-08 20:38:34 +0200 | |
commit | 2e334500fba9893f1f2d2ab3b9528c638d993a03 (patch) | |
tree | e1dcd04962cf25b51c55ace0994954c24f63c1a6 /sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae | |
parent | fb61c90d9e2531588fe2a9491b588a4bc65bcf97 (diff) |
Add graphs for performance monitoring
Performance tests need graphs representing: total, message queue on HV-VES,
offset per kafka topic partition, incoming data rate. Added deletion of producers at test end.
Gauges for offsets turned to Range vector (distinguishable based on tag).
Since Producer is to fast it was reconfigured to send messages with 1 ms interval.
Change-Id: I09fc1edbcd824294d0bb89acc2ea2306a6df00ca
Issue-ID: DCAEGEN2-1807
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Diffstat (limited to 'sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae')
-rw-r--r-- | sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/MicrometerMetricsTest.kt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/MicrometerMetricsTest.kt b/sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/MicrometerMetricsTest.kt index cfe67df2..fec7e54e 100644 --- a/sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/MicrometerMetricsTest.kt +++ b/sources/hv-collector-kafka-consumer/src/test/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/MicrometerMetricsTest.kt @@ -69,33 +69,32 @@ object MicrometerMetricsTest : Spek({ } describe("Gauges") { - val gaugeName1 = "$PREFIX.offset.partition.sample_topic-0" - val gaugeName2 = "$PREFIX.offset.partition.sample_topic-1" + val gaugeName = "$PREFIX.offset.partition" val offset1 = 966L val offset2 = 967L val topicPartition1 = TopicPartition("sample_topic", 0) val topicPartition2 = TopicPartition("sample_topic", 1) on("notifyOffsetChanged") { - it("should update $gaugeName1") { + it("should update $gaugeName") { cut.notifyOffsetChanged(offset1, topicPartition1) - registry.verifyGauge(gaugeName1) { + registry.verifyGauge(name = gaugeName, tagValue = topicPartition1.toString()) { assertThat(it.value()).isCloseTo(offset1.toDouble(), doublePrecision) } } } on("two partition update") { - it("should update $gaugeName1") { + it("should update $gaugeName") { cut.notifyOffsetChanged(offset1, topicPartition1) cut.notifyOffsetChanged(offset2, topicPartition2) - registry.verifyGauge(gaugeName1) { + registry.verifyGauge(name = gaugeName, tagValue = topicPartition1.toString()) { assertThat(it.value()).isCloseTo(offset1.toDouble(), doublePrecision) } - registry.verifyGauge(gaugeName2) { + registry.verifyGauge(name = gaugeName, tagValue = topicPartition2.toString()) { assertThat(it.value()).isCloseTo(offset2.toDouble(), doublePrecision) } } |