d8tltanc commented on a change in pull request #9485: URL: https://github.com/apache/kafka/pull/9485#discussion_r541212190
########## File path: jmh-benchmarks/src/main/java/org/apache/kafka/jmh/acl/AclAuthorizerBenchmark.java ########## @@ -105,49 +120,76 @@ private void setFieldValue(Object obj, String fieldName, Object value) throws Ex field.set(obj, value); } - private TreeMap<ResourcePattern, VersionedAcls> prepareAclCache() { + private void prepareAclCache() throws UnknownHostException { Map<ResourcePattern, Set<AclEntry>> aclEntries = new HashMap<>(); for (int resourceId = 0; resourceId < resourceCount; resourceId++) { ResourcePattern resource = new ResourcePattern( (resourceId % 10 == 0) ? ResourceType.GROUP : ResourceType.TOPIC, - resourceNamePrefix + resourceId, + resourceName(resourceNamePrefix), Review comment: For this line, since the benchmark is creating the random resource name in several places, I'm trying to build a unified way to build it. I think the existing benchmark does not have any DENY resource in it. Adding some DENY resources whose percentage is controlled by parameters will be an improvement to the existing benchmark and help us understand the performance better. In addition, I think adding different types of patterns would also help. What do you think? @rajinisivaram ---------------------------------------------------------------- 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: us...@infra.apache.org