From: Robert Varga Date: Fri, 3 May 2019 11:01:14 +0000 (+0200) Subject: Improve segmented journal JMX beans X-Git-Tag: release/neon-sr1~4 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=faa7cb4fe505ccc4b60d284ca917ab529cebcf8b Improve segmented journal JMX beans This patch updates metric naming to properly tie them to individual journals -- so that the statistics are actually useful. JIRA: CONTROLLER-1884 Change-Id: I6f4f398894860566e234562d731462535b62801e Signed-off-by: Robert Varga (cherry picked from commit bb366ba1be306e7678d81a116c1415876fa9fc75) --- diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java index c5fd3cf171..1739b25cab 100644 --- a/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java +++ b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java @@ -191,7 +191,7 @@ final class SegmentedJournalActor extends AbstractActor { super.preStart(); final MetricRegistry registry = MetricsReporter.getInstance(MeteringBehavior.DOMAIN).getMetricsRegistry(); - final String actorName = self().path().toStringWithoutAddress(); + final String actorName = self().path().parent().toStringWithoutAddress() + '/' + directory.getName(); batchWriteTime = registry.timer(MetricRegistry.name(actorName, "batchWriteTime")); messageWriteCount = registry.meter(MetricRegistry.name(actorName, "messageWriteCount"));