From 54c5b1514f0611056f38053081d094cf5e5fd08a Mon Sep 17 00:00:00 2001 From: Lukas Hanusovsky Date: Thu, 21 Jan 2021 13:07:25 +0100 Subject: [PATCH] KEYCLOAK-16939 : Performance testsuite -> new gc charts, sar profiles, new datasets, crossdc profile --- testsuite/performance/pom.xml | 12 +++- testsuite/performance/tests/docker-compose.sh | 2 +- testsuite/performance/tests/pom.xml | 24 +++++-- .../tests/src/main/gnuplot/jstat/gc-ev.gp | 3 + .../tests/src/main/gnuplot/jstat/gc-t.gp | 3 + .../dataset/100r_100c_100000u.properties | 68 +++++++++++++++++++ .../dataset/10r_50c_100000u.properties | 68 +++++++++++++++++++ 7 files changed, 171 insertions(+), 9 deletions(-) create mode 100644 testsuite/performance/tests/src/main/gnuplot/jstat/gc-ev.gp create mode 100644 testsuite/performance/tests/src/main/gnuplot/jstat/gc-t.gp create mode 100644 testsuite/performance/tests/src/test/resources/dataset/100r_100c_100000u.properties create mode 100644 testsuite/performance/tests/src/test/resources/dataset/10r_50c_100000u.properties diff --git a/testsuite/performance/pom.xml b/testsuite/performance/pom.xml index 26139f35d3..4929d551d1 100644 --- a/testsuite/performance/pom.xml +++ b/testsuite/performance/pom.xml @@ -40,12 +40,20 @@ ${jstat} ${jstat} - + keycloak load-balancer/wildfly-modcluster - infinispan tests + + + + crossdc + + infinispan + + + diff --git a/testsuite/performance/tests/docker-compose.sh b/testsuite/performance/tests/docker-compose.sh index 952806030c..21e9cc5be5 100755 --- a/testsuite/performance/tests/docker-compose.sh +++ b/testsuite/performance/tests/docker-compose.sh @@ -452,7 +452,7 @@ case "$OPERATION" in echo "JStat Charts for $SERVICE" > "$HTML" echo "" >> "$HTML" echo "

JStat Charts for $SERVICE

" >> "$HTML" - for GP_SCRIPT in gc-all gc-s0 gc-s1 gc-e gc-o gc-m gc-cc ; do + for GP_SCRIPT in gc-all gc-s0 gc-s1 gc-e gc-o gc-m gc-cc gc-ev gc-t ; do gnuplot -e "datafile='$JSTAT_DATAFILE'" "$GNUPLOT_COMMON" "$GNUPLOT_SCRIPTS_DIR/${GP_SCRIPT}.gp" > "${ARTIFACTS_DIR}/${SERVICE}/jstat-charts/${GP_SCRIPT}.png" if [ $? == 0 ]; then echo "
" >> "$HTML" diff --git a/testsuite/performance/tests/pom.xml b/testsuite/performance/tests/pom.xml index afbe68f837..e74aef5cac 100644 --- a/testsuite/performance/tests/pom.xml +++ b/testsuite/performance/tests/pom.xml @@ -778,13 +778,8 @@ true - - sar - - false - false - + start-sar @@ -804,6 +799,23 @@ + + + + + + + stop-sar + + false + false + + + + + org.codehaus.mojo + exec-maven-plugin + stop-sar post-integration-test diff --git a/testsuite/performance/tests/src/main/gnuplot/jstat/gc-ev.gp b/testsuite/performance/tests/src/main/gnuplot/jstat/gc-ev.gp new file mode 100644 index 0000000000..41d1163630 --- /dev/null +++ b/testsuite/performance/tests/src/main/gnuplot/jstat/gc-ev.gp @@ -0,0 +1,3 @@ +set ylabel "Number of events" +set title "Utilisation of Garbage collection events (young, full)" +plot for [i in "YGC FGC"] datafile using 1:i title columnheader(i) with lines diff --git a/testsuite/performance/tests/src/main/gnuplot/jstat/gc-t.gp b/testsuite/performance/tests/src/main/gnuplot/jstat/gc-t.gp new file mode 100644 index 0000000000..e1c14ed49f --- /dev/null +++ b/testsuite/performance/tests/src/main/gnuplot/jstat/gc-t.gp @@ -0,0 +1,3 @@ +set ylabel "GC time (s)" +set title "Utilisation of Garbage collection time (young, full, total)" +plot for [i in "YGCT FGCT GCT"] datafile using 1:i title columnheader(i) with lines diff --git a/testsuite/performance/tests/src/test/resources/dataset/100r_100c_100000u.properties b/testsuite/performance/tests/src/test/resources/dataset/100r_100c_100000u.properties new file mode 100644 index 0000000000..8e5b491f46 --- /dev/null +++ b/testsuite/performance/tests/src/test/resources/dataset/100r_100c_100000u.properties @@ -0,0 +1,68 @@ +# REALM +realms=100 +realm.realm=realm_${index?string("00")} +realm.displayName=Realm ${index} +realm.enabled=true +realm.registrationAllowed=true +realm.accessTokenLifeSpan=60 +realm.passwordPolicy=hashIterations(27500) + +# REALM ROLE +realmRolesPerRealm=10 +realmRole.name=role_${index?string("00")}_of_${realm.realm} +realmRole.description=Role ${index} of ${realm.displayName} + +# CLIENT +clientsPerRealm=100 +client.clientId=client_${index?string("00")}_of_${realm.realm} +client.name=Client ${index} of ${realm.displayName} +client.description=Description of ${name} +client.rootUrl= +client.adminUrl= +client.baseUrl=http://clients.${realm.realm}.test/client_${index} +client.enabled=true +client.secret=secret_of_${clientId} +client.redirectUris=${baseUrl}/* +client.webOrigins= +client.protocol=openid-connect +client.publicClient=<#if index % 3 == 0>true<#else>false +client.bearerOnly=<#if index % 3 == 1>true<#else>false +client.authorizationServicesEnabled=false +client.serviceAccountsEnabled=${authorizationServicesEnabled?c} + +# CLIENT ROLE +clientRolesPerClient=10 +clientRole.name=clientrole_${index?string("00")}_of_${client.clientId} +clientRole.description=Role ${index} of ${client.name} + +# USER +usersPerRealm=100000 +user.username=user_${index?string("00000")}_of_${realm.realm} +user.enabled=true +user.email=${username}@email.test +user.emailVerified=true +user.firstName=User_${index} +user.lastName=O'Realm_${realm.index} + +credential.type=password +credential.value=password_${index}_of_${user.username} +credential.temporary=false + +# USER ATTRIBUTE +attributesPerUser=0 +userAttribute.name=attribute_${index?string("00")} +userAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>, + +# USER ROLE MAPPINGS +realmRolesPerUser=1 +clientRolesPerUser=3 + + +# GROUP +groupsPerRealm=3 +group.name=group_${index?string("00")}_of ${realm.realm} + +# GROUP ATTRIBUTE +attributesPerGroup=3 +groupAttribute.name=attribute_${index?string("00")} +groupAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>, diff --git a/testsuite/performance/tests/src/test/resources/dataset/10r_50c_100000u.properties b/testsuite/performance/tests/src/test/resources/dataset/10r_50c_100000u.properties new file mode 100644 index 0000000000..5bab1b4756 --- /dev/null +++ b/testsuite/performance/tests/src/test/resources/dataset/10r_50c_100000u.properties @@ -0,0 +1,68 @@ +# REALM +realms=10 +realm.realm=realm_${index?string("0")} +realm.displayName=Realm ${index} +realm.enabled=true +realm.registrationAllowed=true +realm.accessTokenLifeSpan=60 +realm.passwordPolicy=hashIterations(27500) + +# REALM ROLE +realmRolesPerRealm=10 +realmRole.name=role_${index?string("00")}_of_${realm.realm} +realmRole.description=Role ${index} of ${realm.displayName} + +# CLIENT +clientsPerRealm=50 +client.clientId=client_${index?string("00")}_of_${realm.realm} +client.name=Client ${index} of ${realm.displayName} +client.description=Description of ${name} +client.rootUrl= +client.adminUrl= +client.baseUrl=http://clients.${realm.realm}.test/client_${index} +client.enabled=true +client.secret=secret_of_${clientId} +client.redirectUris=${baseUrl}/* +client.webOrigins= +client.protocol=openid-connect +client.publicClient=<#if index % 3 == 0>true<#else>false +client.bearerOnly=<#if index % 3 == 1>true<#else>false +client.authorizationServicesEnabled=false +client.serviceAccountsEnabled=${authorizationServicesEnabled?c} + +# CLIENT ROLE +clientRolesPerClient=10 +clientRole.name=clientrole_${index?string("00")}_of_${client.clientId} +clientRole.description=Role ${index} of ${client.name} + +# USER +usersPerRealm=100000 +user.username=user_${index?string("00000")}_of_${realm.realm} +user.enabled=true +user.email=${username}@email.test +user.emailVerified=true +user.firstName=User_${index} +user.lastName=O'Realm_${realm.index} + +credential.type=password +credential.value=password_${index}_of_${user.username} +credential.temporary=false + +# USER ATTRIBUTE +attributesPerUser=0 +userAttribute.name=attribute_${index?string("00")} +userAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>, + +# USER ROLE MAPPINGS +realmRolesPerUser=1 +clientRolesPerUser=3 + + +# GROUP +groupsPerRealm=3 +group.name=group_${index?string("00")}_of ${realm.realm} + +# GROUP ATTRIBUTE +attributesPerGroup=3 +groupAttribute.name=attribute_${index?string("00")} +groupAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>,