summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@yahooinc.com>2022-12-12 16:50:14 +0100
committerØyvind Grønnesby <oyving@yahooinc.com>2022-12-12 21:22:33 +0100
commit4ea035b70e31781783113a4b6eb56c21c7c02bf3 (patch)
tree23701e9f748d3327920ff88bb343a2b7bff6dd5b /controller-server
parent43993948c888686c895e88264965173d27bb14d5 (diff)
Create a metric for maintainer execution time
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintainer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintainer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintainer.java
index f1223c7d162..4e6eda9f0fa 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintainer.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintainer.java
@@ -33,7 +33,7 @@ public abstract class ControllerMaintainer extends Maintainer {
}
public ControllerMaintainer(Controller controller, Duration interval, String name, Set<SystemName> activeSystems) {
- super(name, interval, controller.clock().instant(), controller.jobControl(),
+ super(name, interval, controller.clock(), controller.jobControl(),
new ControllerJobMetrics(controller.metric()), controller.curator().cluster(), true);
this.controller = controller;
this.activeSystems = Set.copyOf(Objects.requireNonNull(activeSystems));
@@ -56,8 +56,9 @@ public abstract class ControllerMaintainer extends Maintainer {
}
@Override
- public void completed(String job, double successFactor) {
+ public void completed(String job, double successFactor, long durationMs) {
metric.set("maintenance.successFactor", successFactor, metric.createContext(Map.of("job", job)));
+ metric.set("maintenance.duration", durationMs, metric.createContext(Map.of("job", job)));
}
}