diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/AbstractOfflineCacheCommand.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/AbstractOfflineCacheCommand.java index ae677b8a0f..59be8aadee 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/AbstractOfflineCacheCommand.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/AbstractOfflineCacheCommand.java @@ -103,6 +103,34 @@ public abstract class AbstractOfflineCacheCommand extends AbstractCommand { } } + // Just to check performance of multiple get calls. And comparing what's the change between the case when item is available locally or not. + public static class GetMultipleCommand extends AbstractOfflineCacheCommand { + + @Override + public String getName() { + return "getMulti"; + } + + @Override + protected void doRunCacheCommand(KeycloakSession session, Cache cache) { + String id = getArg(0); + int count = getIntArg(1); + + long start = System.currentTimeMillis(); + for (int i=0 ; i "; + } + } + public static class RemoveCommand extends AbstractOfflineCacheCommand { diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/TestsuiteCLI.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/TestsuiteCLI.java index 534e84a7b6..59f34900b5 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/TestsuiteCLI.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/util/cli/TestsuiteCLI.java @@ -45,6 +45,7 @@ public class TestsuiteCLI { HelpCommand.class, AbstractOfflineCacheCommand.PutCommand.class, AbstractOfflineCacheCommand.GetCommand.class, + AbstractOfflineCacheCommand.GetMultipleCommand.class, AbstractOfflineCacheCommand.GetLocalCommand.class, AbstractOfflineCacheCommand.RemoveCommand.class, AbstractOfflineCacheCommand.SizeCommand.class,