You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "gyfora (via GitHub)" <gi...@apache.org> on 2023/10/19 14:39:53 UTC

[PR] [FLINK-33318] Expose aggregated collector metrics and measure timeMsPerSecond [flink]

gyfora opened a new pull request, #23554:
URL: https://github.com/apache/flink/pull/23554

   ## What is the purpose of the change
   
   As discussed in https://cwiki.apache.org/confluence/display/FLINK/FLIP-361%3A+Improve+GC+Metrics. This commit adds the All collector group to measure time + count across collectors + adds the timeMsPerSecond metric for each collector group to measure time spent in GC over the last minute similar to other busy/idle etc metrics in Flink
   
   ## Brief change log
   
     - Add new metrics
     - Add tests to cover existing and new metrics
   
   
   ## Verifying this change
   
   Unit tests + manual verification.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? [TODO]
   


-- 
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


Re: [PR] [FLINK-33318] Expose aggregated collector metrics and measure timeMsPerSecond [flink]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #23554:
URL: https://github.com/apache/flink/pull/23554#discussion_r1366778054


##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -222,16 +224,32 @@ private static void instantiateClassLoaderMetrics(MetricGroup metrics) {
         metrics.<Long, Gauge<Long>>gauge("ClassesUnloaded", mxBean::getUnloadedClassCount);
     }
 
-    private static void instantiateGarbageCollectorMetrics(MetricGroup metrics) {
-        List<GarbageCollectorMXBean> garbageCollectors =
-                ManagementFactory.getGarbageCollectorMXBeans();
-
+    @VisibleForTesting
+    public static void instantiateGarbageCollectorMetrics(

Review Comment:
   makes sense I will fix this



-- 
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


Re: [PR] [FLINK-33318] Expose aggregated collector metrics and measure timeMsPerSecond [flink]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #23554:
URL: https://github.com/apache/flink/pull/23554


-- 
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


Re: [PR] [FLINK-33318] Expose aggregated collector metrics and measure timeMsPerSecond [flink]

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #23554:
URL: https://github.com/apache/flink/pull/23554#discussion_r1366386337


##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -222,16 +224,32 @@ private static void instantiateClassLoaderMetrics(MetricGroup metrics) {
         metrics.<Long, Gauge<Long>>gauge("ClassesUnloaded", mxBean::getUnloadedClassCount);
     }
 
-    private static void instantiateGarbageCollectorMetrics(MetricGroup metrics) {
-        List<GarbageCollectorMXBean> garbageCollectors =
-                ManagementFactory.getGarbageCollectorMXBeans();
-
+    @VisibleForTesting
+    public static void instantiateGarbageCollectorMetrics(

Review Comment:
   ```suggestion
       static void instantiateGarbageCollectorMetrics(
   ```
   
   nit: Maybe the `default` scope is enough here?



-- 
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


Re: [PR] [FLINK-33318] Expose aggregated collector metrics and measure timeMsPerSecond [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23554:
URL: https://github.com/apache/flink/pull/23554#issuecomment-1771136942

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c49d5a0d848326446fc38b709aac38927cd7f934",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c49d5a0d848326446fc38b709aac38927cd7f934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c49d5a0d848326446fc38b709aac38927cd7f934 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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