xichen01 commented on code in PR #4753:
URL: https://github.com/apache/ozone/pull/4753#discussion_r1200776488
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -249,9 +249,11 @@ public Response get(
AUDIT.logReadSuccess(buildAuditMessageForSuccess(s3GAction,
getAuditParameters()));
+ int keyCount =
+ response.getCommonPrefixes().size() + response.getContents().size();
getMetrics().updateGetBucketSuccessStats(startNanos);
- response.setKeyCount(
- response.getCommonPrefixes().size() + response.getContents().size());
+ getMetrics().incListKeyCount(keyCount);
Review Comment:
This metric is used to measure the list request load, recording the number
of keys returned by a list requests.
The time taken for a list request to return 1000 keys must be different from
that for 10 keys, using the list count Metric (`incListKeyCount()`) and the
list time consumption Metric (`updateGetBucketSuccessStats()`) can better
locate performance issue.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]