You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/18 17:23:06 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #6590: Introduce a metric for query/response size on broker.

mcvsubbu commented on a change in pull request #6590:
URL: https://github.com/apache/incubator-pinot/pull/6590#discussion_r578606293



##########
File path: pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/SingleConnectionBrokerRequestHandler.java
##########
@@ -90,6 +90,8 @@ protected BrokerResponse processBrokerRequest(long requestId, BrokerRequest orig
     Map<ServerRoutingInstance, ServerResponse> response = asyncQueryResponse.getResponse();
     _brokerMetrics
         .addPhaseTiming(rawTableName, BrokerQueryPhase.SCATTER_GATHER, System.nanoTime() - scatterGatherStartTimeNs);
+    _brokerMetrics.addMeteredTableValue(rawTableName, BrokerMeter.REQUEST_SIZE,
+        originalBrokerRequest.toString().length());

Review comment:
       Calling toString() here is not a good idea for high throughput use cases. See if you can get this value from the netty layer.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org