You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/12 08:16:15 UTC

[GitHub] [flink-kubernetes-operator] SteNicholas commented on a diff in pull request #312: [FLINK-28480] Forward timeControllerExecution time as histogram for JOSDK Metrics interface

SteNicholas commented on code in PR #312:
URL: https://github.com/apache/flink-kubernetes-operator/pull/312#discussion_r918682179


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/metrics/OperatorJosdkMetrics.java:
##########
@@ -113,6 +137,19 @@ public void failedReconciliation(ResourceID resourceID, Exception exception) {
         return map;
     }
 
+    private Histogram histogram(String... names) {
+        MetricGroup group = operatorMetricGroup.addGroup(OPERATOR_SDK_GROUP);
+        for (String name : names) {
+            group = group.addGroup(name);
+        }
+        var finalGroup = group;
+        return histograms.computeIfAbsent(
+                String.join(".", group.getScopeComponents()),
+                s ->
+                        finalGroup.histogram(

Review Comment:
   @gyfora, IMO, the `TimeNanos` makes sense because this use the `clock.relativeTimeNanos` not the seconds. WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org