-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Warn if scenario completed before restarts finished * Configurable sleep during create holders to slow down req/s * Collections to run all holder & issuer operations * Refactor getWalletIndex function
- Loading branch information
Showing
11 changed files
with
141 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh" | ||
|
||
config() { | ||
export VUS=10 | ||
export ITERATIONS=25 | ||
export ISSUER_PREFIX="k6_issuer_credential_ops" | ||
export HOLDER_PREFIX="k6_holder_credential_ops" | ||
export NUM_ISSUERS=2 | ||
} | ||
|
||
init() { | ||
xk6 run ./scenarios/bootstrap-issuer.js -e ITERATIONS=1 -e VUS=1 | ||
} | ||
|
||
scenario_create_holders() { | ||
export SLEEP_DURATION=0.75 | ||
local iterations=$((ITERATIONS * VUS)) | ||
local vus=1 | ||
xk6 run ./scenarios/create-holders.js -e ITERATIONS=${iterations} -e VUS=${vus} | ||
} | ||
|
||
senario_create_invitations() { | ||
run_test ./scenarios/create-invitations.js | ||
} | ||
|
||
scemario_create_credentials() { | ||
run_test ./scenarios/create-credentials.js | ||
} | ||
|
||
scenario_create_proof_verified() { | ||
run_test ./scenarios/create-proof.js | ||
} | ||
|
||
scenario_revoke_credentials() { | ||
local iterations=$((ITERATIONS * VUS)) | ||
local vus=1 | ||
xk6 run ./scenarios/revoke-credentials.js -e ITERATIONS=${iterations} -e VUS=${vus} | ||
} | ||
|
||
scenario_create_proof_unverified() { | ||
export IS_REVOKED=true | ||
run_test ./scenarios/create-proof.js | ||
} | ||
|
||
cleanup() { | ||
log "Cleaning up..." | ||
xk6 run ./scenarios/delete-holders.js | ||
# xk6 run ./scenarios/delete-issuers.js -e ITERATIONS="${NUM_ISSUERS}" -e VUS=1 | ||
} | ||
|
||
run_collection() { | ||
local deployments="$1" | ||
|
||
config | ||
init | ||
run_ha_iterations "${deployments}" scenario_create_holders | ||
run_ha_iterations "${deployments}" senario_create_invitations | ||
run_ha_iterations "${deployments}" scemario_create_credentials | ||
run_ha_iterations "${deployments}" scenario_create_proof_verified | ||
run_ha_iterations "${deployments}" scenario_revoke_credentials | ||
run_ha_iterations "${deployments}" scenario_create_proof_unverified | ||
|
||
cleanup | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh" | ||
|
||
config() { | ||
export VUS=10 | ||
export ITERATIONS=10 | ||
export ISSUER_PREFIX="k6_issuer_issuer_ops" | ||
export HOLDER_PREFIX="k6_holder_issuer_ops" | ||
} | ||
|
||
init() { | ||
log "No init function specified" | ||
} | ||
|
||
scenario_create_issuers() { | ||
run_test ./scenarios/create-issuers.js | ||
} | ||
|
||
scenario_create_schemas() { | ||
export VUS=10 | ||
export ITERATIONS=40 | ||
export SCHEMA_PREFIX="k6_issuer_ops2" | ||
run_test ./scenarios/create-schemas.js | ||
} | ||
|
||
cleanup() { | ||
log "Cleaning up..." | ||
xk6 run ./scenarios/delete-issuers.js | ||
} | ||
|
||
run_collection() { | ||
local deployments="$1" | ||
|
||
config | ||
init | ||
run_ha_iterations "${deployments}" scenario_create_issuers | ||
run_ha_iterations "${deployments}" scenario_create_schemas | ||
|
||
cleanup | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters