zentol commented on a change in pull request #6551: 
[FLINK-10022][network][metrics] add metrics for input/output buffers
URL: https://github.com/apache/flink/pull/6551#discussion_r209905769
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/IOMetrics.java
 ##########
 @@ -43,38 +43,74 @@
        protected double numBytesInRemotePerSecond;
        protected double numBytesOutPerSecond;
 
-       public IOMetrics(Meter recordsIn, Meter recordsOut, Meter bytesLocalIn, 
Meter bytesRemoteIn, Meter bytesOut) {
+       protected long numBuffersInLocal;
+       protected long numBuffersInRemote;
+       protected long numBuffersOut;
+
+       protected double numBuffersInLocalPerSecond;
+       protected double numBuffersInRemotePerSecond;
+       protected double numBuffersOutPerSecond;
+
+       public IOMetrics(
+                       Meter recordsIn,
+                       Meter recordsOut,
+                       Meter bytesLocalIn,
+                       Meter bytesRemoteIn,
+                       Meter bytesOut,
+                       Meter buffersLocalIn,
+                       Meter buffersRemoteIn,
+                       Meter buffersOut) {
                this.numRecordsIn = recordsIn.getCount();
                this.numRecordsInPerSecond = recordsIn.getRate();
                this.numRecordsOut = recordsOut.getCount();
                this.numRecordsOutPerSecond = recordsOut.getRate();
+
                this.numBytesInLocal = bytesLocalIn.getCount();
                this.numBytesInLocalPerSecond = bytesLocalIn.getRate();
                this.numBytesInRemote = bytesRemoteIn.getCount();
                this.numBytesInRemotePerSecond = bytesRemoteIn.getRate();
                this.numBytesOut = bytesOut.getCount();
                this.numBytesOutPerSecond = bytesOut.getRate();
+
+               this.numBuffersInLocal = buffersLocalIn.getCount();
+               this.numBuffersInLocalPerSecond = buffersLocalIn.getRate();
+               this.numBuffersInRemote = buffersRemoteIn.getCount();
+               this.numBuffersInRemotePerSecond = buffersRemoteIn.getRate();
+               this.numBuffersOut = buffersOut.getCount();
+               this.numBuffersOutPerSecond = buffersOut.getRate();
        }
 
        public IOMetrics(
                        long numBytesInLocal,
                        long numBytesInRemote,
                        long numBytesOut,
+                       long numBuffersInLocal,
+                       long numBuffersInRemote,
+                       long numBuffersOut,
                        long numRecordsIn,
                        long numRecordsOut,
                        double numBytesInLocalPerSecond,
                        double numBytesInRemotePerSecond,
                        double numBytesOutPerSecond,
+                       double numBuffersInLocalPerSecond,
+                       double numBuffersInRemotePerSecond,
+                       double numBuffersOutPerSecond,
                        double numRecordsInPerSecond,
                        double numRecordsOutPerSecond) {
                this.numBytesInLocal = numBytesInLocal;
                this.numBytesInRemote = numBytesInRemote;
                this.numBytesOut = numBytesOut;
+               this.numBuffersInLocal = numBuffersInLocal;
+               this.numBuffersInRemote = numBuffersInRemote;
+               this.numBuffersOut = numBuffersOut;
                this.numRecordsIn = numRecordsIn;
                this.numRecordsOut = numRecordsOut;
                this.numBytesInLocalPerSecond = numBytesInLocalPerSecond;
                this.numBytesInRemotePerSecond = numBytesInRemotePerSecond;
                this.numBytesOutPerSecond = numBytesOutPerSecond;
+               this.numBuffersInLocalPerSecond = numBuffersInLocalPerSecond;
 
 Review comment:
   the `perSecond` metrics appear to be unused. ( I know you probably just 
followed the existing pattern )

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to