Skip to content

Commit

Permalink
Delete some testcase and add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiJuWu committed Jul 1, 2024
1 parent ea5f15e commit eb07342
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,22 @@ Authorizer newAuthorizer() {
}
}

@Param({"10000", "50000", "200000"})
@Param({"5000", "10000"})
private int resourceCount;
//no. of. rules per resource
@Param({"10", "50"})
@Param({"10", "20"})
private int aclCount;

@Param({"0", "20", "50", "90", "99", "99.9", "99.99", "100"})
@Param({"20"})
private double denyPercentage;

@Param({"ACL", "KRAFT"})
private AuthorizerType authorizerType;

private long startTime;

private long endTime;

private final int hostPreCount = 1000;
private final String resourceNamePrefix = "foo-bar35_resource-";
private final KafkaPrincipal principal = new KafkaPrincipal(KafkaPrincipal.USER_TYPE, "test-user");
Expand All @@ -122,6 +126,8 @@ Authorizer newAuthorizer() {

@Setup(Level.Trial)
public void setup() throws Exception {
startTime = System.currentTimeMillis() / 1000L;
System.out.println("start time: " + startTime);
authorizer = authorizerType.newAuthorizer();
prepareAclCache();
prepareAclToUpdate();
Expand Down Expand Up @@ -256,6 +262,9 @@ private Boolean shouldDeny() {
@TearDown(Level.Trial)
public void tearDown() throws IOException {
authorizer.close();
endTime = System.currentTimeMillis() / 1000L;
System.out.println("end time: " + endTime);
System.out.println("duration: " + (endTime - startTime));
}

@Benchmark
Expand Down

0 comments on commit eb07342

Please sign in to comment.