From 93e14313a1e2d75c41f4a589b49fb90d237489c8 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Wed, 27 Sep 2023 16:21:24 +0100 Subject: [PATCH 1/9] fix: ensure all defined performance tests compile and run Signed-off-by: David Poltorak --- .../src/common/ConnectionService.ts | 6 +- .../src/common/CredentialsService.ts | 21 ++++--- .../src/common/DidService.ts | 11 ++-- .../src/common/HttpService.ts | 6 +- .../src/common/ProofsService.ts | 8 +-- .../src/scenarios/default.ts | 27 ++++++++ .../credentials/credential-offer-test.ts | 33 ++-------- .../credentials/credential-schema-test.ts | 34 ++++------ .../src/tests/dids/create-prism-did-test.ts | 23 +++---- .../src/tests/dids/did-publishing-test.ts | 20 +++--- .../src/tests/flows/connection-flow-test.ts | 19 ++---- .../src/tests/flows/full-flow-test.ts | 62 ------------------- .../src/tests/flows/issuance-flow-test.ts | 20 ++---- .../tests/flows/present-proof-flow-test.ts | 19 ++---- 14 files changed, 103 insertions(+), 206 deletions(-) create mode 100644 tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts delete mode 100644 tests/performance-tests/atala-performance-tests-k6/src/tests/flows/full-flow-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts index 59e1cea9a6..19f0f524d1 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts @@ -26,7 +26,7 @@ export class ConnectionService extends HttpService { */ getConnection(connectionId: string): Connection { const res = this.get(`connections/${connectionId}`); - const connection = res.json() as unknown as Connection; + const connection = this.toJson(res) as unknown as Connection; return connection; } @@ -36,7 +36,7 @@ export class ConnectionService extends HttpService { */ createConnection(): Connection { const payload = { label: "test" }; - const connection = this.post("connections", payload).json() as unknown as Connection; + const connection = this.toJson(this.post("connections", payload)) as unknown as Connection; return connection; } @@ -48,7 +48,7 @@ export class ConnectionService extends HttpService { acceptConnectionInvitation(invitation: ConnectionInvitation): Connection { const payload = { invitation: this.invitationFromUrl(invitation.invitationUrl) }; const res = this.post("connection-invitations", payload, 200); - return res.json() as unknown as Connection; + return this.toJson(res) as unknown as Connection; } /** diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts index 8961b64b9a..c55a37ca1d 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts @@ -2,7 +2,8 @@ import { sleep } from "k6"; import { HttpService } from "./HttpService"; import { ISSUER_AGENT_URL, WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; import { IssueCredentialRecord, Connection, CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client"; -import {v4 as uuidv4} from 'uuid'; +import { crypto } from "k6/experimental/webcrypto"; + /** * A service class for managing credentials in the application. @@ -18,8 +19,8 @@ export class CredentialsService extends HttpService { */ createCredentialOffer(issuingDid: string, connection: Connection, schema: CredentialSchemaResponse): IssueCredentialRecord { const payload = `{ - "claims": { - "emailAddress": "${uuidv4()}-@atala.io", + "claims": { + "emailAddress": "${crypto.randomUUID()}-@atala.io", "familyName": "Test", "dateOfIssuance": "${new Date()}", "drivingLicenseID": "Test", @@ -31,13 +32,13 @@ export class CredentialsService extends HttpService { "automaticIssuance": false }`; const res = this.post("issue-credentials/credential-offers", payload); - return res.json() as unknown as IssueCredentialRecord; + return this.toJson(res) as unknown as IssueCredentialRecord; } createCredentialSchema(issuingDid: string): CredentialSchemaResponse { const payload = ` { - "name": "${uuidv4()}}", + "name": "${crypto.randomUUID()}}", "version": "1.0.0", "description": "Simple credential schema for the driving licence verifiable credential.", "type": "https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json", @@ -85,7 +86,7 @@ export class CredentialsService extends HttpService { } ` const res = this.post("schema-registry/schemas", payload); - return res.json() as unknown as CredentialSchemaResponse; + return this.toJson(res) as unknown as CredentialSchemaResponse; } /** @@ -95,7 +96,7 @@ export class CredentialsService extends HttpService { */ getCredentialRecord(record: IssueCredentialRecord): IssueCredentialRecord { const res = this.get(`issue-credentials/records/${record.recordId}`); - return res.json() as unknown as IssueCredentialRecord; + return this.toJson(res) as unknown as IssueCredentialRecord; } /** @@ -104,7 +105,7 @@ export class CredentialsService extends HttpService { */ getCredentialRecords(thid: string): IssueCredentialRecord[] { const res = this.get(`issue-credentials/records?thid=${thid}`); - return res.json("contents") as unknown as IssueCredentialRecord[]; + return this.toJson(res).contents as unknown as IssueCredentialRecord[]; } /** @@ -116,7 +117,7 @@ export class CredentialsService extends HttpService { acceptCredentialOffer(record: IssueCredentialRecord, subjectDid: string): IssueCredentialRecord { const payload = { subjectId: subjectDid }; const res = this.post(`issue-credentials/records/${record.recordId}/accept-offer`, payload, 200); - return res.json() as unknown as IssueCredentialRecord; + return this.toJson(res) as unknown as IssueCredentialRecord; } /** @@ -126,7 +127,7 @@ export class CredentialsService extends HttpService { */ issueCredential(record: IssueCredentialRecord): IssueCredentialRecord { const res = this.post(`issue-credentials/records/${record.recordId}/issue-credential`, null, 200); - return res.json() as unknown as IssueCredentialRecord; + return this.toJson(res) as unknown as IssueCredentialRecord; } /** diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts index c203bf0af6..2f7807c4a2 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts @@ -1,7 +1,8 @@ import { HttpService } from "./HttpService"; import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; import { CreateManagedDIDResponse, DIDDocument, DidOperationSubmission, ManagedDID } from "@input-output-hk/prism-typescript-client"; -import { sleep } from "k6"; +import {check, sleep} from "k6"; +import http from "k6/http"; /** * A service class for managing decentralized identifiers (DIDs) in the application. @@ -16,7 +17,7 @@ export class DidService extends HttpService { */ getDid(did: string): ManagedDID { const res = this.get(`did-registrar/dids/${did}`); - return res.json() as unknown as ManagedDID; + return this.toJson(res) as unknown as ManagedDID; } /** @@ -26,7 +27,7 @@ export class DidService extends HttpService { */ resolveDid(did: string): DIDDocument { const res = this.get(`dids/${did}`); - return res.json() as unknown as DIDDocument; + return this.toJson(res) as unknown as DIDDocument; } /** @@ -36,7 +37,7 @@ export class DidService extends HttpService { */ publishDid(did: string): DidOperationSubmission { const res = this.post(`did-registrar/dids/${did}/publications`, null, 202); - return res.json("scheduledOperation") as unknown as DidOperationSubmission; + return this.toJson(res).scheduledOperation as unknown as DidOperationSubmission; } /** @@ -46,7 +47,7 @@ export class DidService extends HttpService { */ createUnpublishedDid(documentTemplate: string): CreateManagedDIDResponse { const res = this.post("did-registrar/dids", documentTemplate); - return res.json() as unknown as CreateManagedDIDResponse; + return this.toJson(res) as unknown as CreateManagedDIDResponse; } /** diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts index 422652c11a..235e3a8ff4 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts @@ -1,6 +1,6 @@ import http from 'k6/http'; -import { check } from 'k6'; +import {bytes, check} from 'k6'; import { RefinedResponse, ResponseType, RequestBody } from 'k6/http'; /** @@ -34,6 +34,10 @@ export class HttpService { }; } + public toJson(response: RefinedResponse): any { + return JSON.parse(response.body as string) + } + /** * Performs an HTTP POST request to the specified endpoint with the provided payload. * @param endpoint The API endpoint to post to. diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts index b52c723a25..f274b8f0de 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts @@ -34,7 +34,7 @@ export class ProofsService extends HttpService { ] }` const res = this.post("present-proof/presentations", payload); - return res.json("presentationId") as string; + return this.toJson(res).presentationId as string; } /** @@ -51,7 +51,7 @@ export class ProofsService extends HttpService { ] }` const res = this.patch(`present-proof/presentations/${presentation.presentationId}`, payload); - return res.json("presentationId") as string; + return this.toJson(res).presentationId as string; } /** @@ -61,7 +61,7 @@ export class ProofsService extends HttpService { */ getPresentation(presentationId: string): PresentationStatus { const res = this.get(`present-proof/presentations/${presentationId}`); - return res.json() as unknown as PresentationStatus; + return this.toJson(res) as unknown as PresentationStatus; } /** @@ -70,7 +70,7 @@ export class ProofsService extends HttpService { */ getPresentations(thid: string): PresentationStatus[] { const res = this.get(`present-proof/presentations?thid=${thid}`); - return res.json("contents") as unknown as PresentationStatus[]; + return this.toJson(res).contents as unknown as PresentationStatus[]; } /** diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts new file mode 100644 index 0000000000..8c2470f57b --- /dev/null +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -0,0 +1,27 @@ +import { Scenario, Threshold } from "k6/options"; + +export const defaultScenarios: { [name: string]: Scenario } = { + smoke: { + // a simple test to ensure performance tests work and requests don't fail + executor: "constant-vus", + vus: 3, + duration: "10s", + tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform + }, +}; + +export const defaultThresholds: { [name: string]: Threshold[] } = { + http_req_failed: [ + // fail if any requests fail during smoke test + { + threshold: "rate==0", + abortOnFail: true, + }, + ], + http_req_duration: [ + // fail if any requests take longer than 500ms on smoke test + { threshold: "p(95)<500", abortOnFail: true }, // 95% of requests should complete within 500ms + { threshold: "p(99)<1500", abortOnFail: true }, // 99% of requests should complete within 1500ms + ], + checks: ["rate==1"], // fail if any checks fail (the checks are defined in test code which is executed) +}; diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts index 27b86d07ff..30e87e1628 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts @@ -2,36 +2,15 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import { Issuer, Holder } from '../../actors'; import { Connection } from '@input-output-hk/prism-typescript-client'; - -// export let options: Options = { -// stages: [ -// { duration: '1m', target: 5 }, -// ], -// thresholds: { -// http_req_failed: [{ -// threshold: 'rate<=0.05', -// abortOnFail: true, -// }], -// http_req_duration: ['p(95)<=100'], -// checks: ['rate>=0.99'], -// }, -// }; - +import { defaultScenarios, defaultThresholds } from '../../scenarios/default'; export let options: Options = { scenarios: { - smoke: { - executor: 'constant-vus', - vus: 3, - duration: "1s", - }, + ...defaultScenarios }, thresholds: { - 'http_req_duration{group:::Issuer creates credential offer}': ['max >= 0'], - 'http_reqs{group:::Issuer creates credential offer}': ['count >= 0'], - 'group_duration{group:::Issuer creates credential offer}': ['max >= 0'], - }, -}; - + ...defaultThresholds + } +} export const issuer = new Issuer(); export const holder = new Holder(); @@ -52,7 +31,7 @@ export function setup() { holder.finalizeConnectionWithIssuer(); }); - return { + return { issuerDid: issuer.did, holderDid: holder.did, connectionWithHolder: issuer.connectionWithHolder!, diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts index 095eee806f..6510448d48 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts @@ -1,43 +1,33 @@ -import { group } from 'k6'; -import { Options } from 'k6/options'; -import { Issuer } from '../../actors'; - +import { group } from "k6"; +import { Options } from "k6/options"; +import { Issuer } from "../../actors"; +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { scenarios: { - smoke: { - executor: 'constant-vus', - vus: 3, - duration: "1s", - }, + ...defaultScenarios }, thresholds: { - 'http_req_duration{group:::Issuer creates credential schema}': ['max >= 0'], - 'http_reqs{group:::Issuer creates credential schema}': ['count >= 0'], - 'group_duration{group:::Issuer creates credential schema}': ['max >= 0'], - checks: ['rate==1'], - http_req_duration: ['p(95)<=100'], - }, -}; - + ...defaultThresholds + } +} export const issuer = new Issuer(); export function setup() { - group('Issuer publishes DID', function () { + group("Issuer publishes DID", function () { issuer.createUnpublishedDid(); issuer.publishDid(); }); - return { + return { issuerDid: issuer.did, }; } -export default (data: { issuerDid: string; }) => { - +export default (data: { issuerDid: string }) => { // This is the only way to pass data from setup to default issuer.did = data.issuerDid; - group('Issuer creates credential schema', function () { + group("Issuer creates credential schema", function () { issuer.createCredentialSchema(); }); }; diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts index dfd9350ca4..a3fe3a3507 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts @@ -1,23 +1,14 @@ import { Options } from 'k6/options'; import { Issuer } from '../../actors'; - +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { - scenarios: { - smoke: { - executor: 'constant-vus', - vus: 3, - duration: "1m", + scenarios: { + ...defaultScenarios }, - }, - thresholds: { - http_req_failed: [{ - threshold: 'rate==0', - abortOnFail: true, - }], - http_req_duration: ['p(95)<=500'], - checks: ['rate==1'], - }, -}; + thresholds: { + ...defaultThresholds + } +} const issuer = new Issuer(); diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts index 0fd5eb4644..177401414a 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts @@ -1,20 +1,14 @@ import { Options } from 'k6/options'; import { Issuer } from '../../actors'; - +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { - stages: [ - { duration: '1m', target: 5 }, - ], - thresholds: { - http_req_failed: [{ - threshold: 'rate<=0.05', - abortOnFail: true, - }], - http_req_duration: ['p(95)<=100'], - checks: ['rate>=0.99'], + scenarios: { + ...defaultScenarios }, - }; - + thresholds: { + ...defaultThresholds + } +} const issuer = new Issuer(); export default () => { diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts index 563a36bf11..c349baf18d 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts @@ -1,23 +1,14 @@ import { Options } from 'k6/options'; import { connectionFlow } from '../common'; - +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { scenarios: { - smoke: { - executor: 'constant-vus', - vus: 3, - duration: "1m", - }, + ...defaultScenarios }, thresholds: { - http_req_failed: [{ - threshold: 'rate==0', - abortOnFail: true, - }], - http_req_duration: ['p(95)<=500'], - checks: ['rate==1'], - }, -}; + ...defaultThresholds + } +} export default() => { connectionFlow(); diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/full-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/full-flow-test.ts deleted file mode 100644 index fe17b7148e..0000000000 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/full-flow-test.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { group } from 'k6'; -import { Options } from 'k6/options'; -import { Issuer, Holder, Verifier } from '../../actors'; - -export let options: Options = { - vus: 1, - iterations: 1 -}; - -const issuer = new Issuer(); -const holder = new Holder(); -const verifier = new Verifier(); - -export function setup() { - group('Issuer publishes DID', function () { - issuer.createUnpublishedDid(); - issuer.publishDid(); - }); - - group('Holder creates unpublished DID', function () { - holder.createUnpublishedDid(); - }); - - return { issuerDid: issuer.did, holderDid: holder.did }; -} - -export default (data: { issuerDid: string; holderDid: string; }) => { - - issuer.did = data.issuerDid; - holder.did = data.holderDid; - - group('Holder connects with Issuer', function () { - issuer.createHolderConnection(); - holder.acceptIssuerConnection(issuer.connectionWithHolder!.invitation); - issuer.finalizeConnectionWithHolder(); - holder.finalizeConnectionWithIssuer(); - }); - - group('Issuer creates credential offer for Holder', function () { - issuer.createCredentialOffer(); - issuer.waitForCredentialOfferToBeSent(); - holder.waitAndAcceptCredentialOffer(); - issuer.receiveCredentialRequest(); - issuer.issueCredential(); - issuer.waitForCredentialToBeSent(); - holder.receiveCredential(); - }); - - group('Holder connects with Verifier', function () { - verifier.createHolderConnection(); - holder.acceptVerifierConnection(verifier.connectionWithHolder!.invitation); - verifier.finalizeConnectionWithHolder(); - holder.finalizeConnectionWithVerifier(); - }); - - group('Verifier requests proof from Holder', function () { - verifier.requestProof(); - holder.waitAndAcceptProofRequest(); - verifier.acknowledgeProof(); - }); - -}; diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts index c4f52a0094..7c1076e503 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts @@ -2,25 +2,15 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import {issuer, holder} from '../common'; import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; - +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { scenarios: { - smoke: { - executor: 'constant-vus', - vus: 5, - duration: "3m", - }, + ...defaultScenarios }, thresholds: { - http_req_failed: [{ - threshold: 'rate==0', - abortOnFail: true, - }], - http_req_duration: ['p(95)<=500'], - checks: ['rate==1'], - }, -}; - + ...defaultThresholds + } +} // This is setup code. It runs once at the beginning of the test, regardless of the number of VUs. export function setup() { diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts index 667c0d4c90..c99e964f59 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts @@ -2,24 +2,15 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import { Issuer, Holder, Verifier } from '../../actors'; import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; - +import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; export let options: Options = { scenarios: { - smoke: { - executor: 'constant-vus', - vus: 5, - duration: "3m", - }, + ...defaultScenarios }, thresholds: { - http_req_failed: [{ - threshold: 'rate==0', - abortOnFail: true, - }], - http_req_duration: ['p(95)<=500'], - checks: ['rate==1'], - }, -}; + ...defaultThresholds + } +} const issuer = new Issuer(); const holder = new Holder(); From 16a2daac366ca3088c676cd11fbd6341d0be3bb1 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Wed, 27 Sep 2023 16:36:31 +0100 Subject: [PATCH 2/9] ci: run all defined performance smoke tests as part of every PR Signed-off-by: David Poltorak --- .github/workflows/performance-tests.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index 2b9190c222..9eee243106 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -6,9 +6,6 @@ concurrency: on: pull_request: - paths: - - ".github/workflows/performance-tests.yml" - - "tests/performance-tests/**" push: branches: - "main" @@ -90,18 +87,18 @@ jobs: scope: 'input-output-hk' - name: Install dependencies - uses: borales/actions-yarn@v4 + uses: borales/actions-yarn@v4.2.0 with: cmd: install dir: ${{ env.BENCHMARKING_DIR }} - name: Compile tests to JS - uses: borales/actions-yarn@v4 + uses: borales/actions-yarn@v4.2.0 with: cmd: webpack dir: ${{ env.BENCHMARKING_DIR }} - - name: Connection Flow Smoke Test + - name: All Smoke Tests env: ISSUER_AGENT_API_KEY: default HOLDER_AGENT_API_KEY: default @@ -109,4 +106,10 @@ jobs: # Have to use manual download because GitHub action doesnt support localhost execution curl https://github.com/grafana/k6/releases/download/v0.45.0/k6-v0.45.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 ls -la - ./k6 run ${{ env.BENCHMARKING_DIR }}/dist/connection-flow-test.js + ./k6 run -e SCENARIO_LABEL=create-prism-did-smoke ${{ env.BENCHMARKING_DIR }}/dist/create-prism-did-test.js + ./k6 run -e SCENARIO_LABEL=credential-offer-smoke ${{ env.BENCHMARKING_DIR }}/dist/credential-offer-test.js + ./k6 run -e SCENARIO_LABEL=credential-schema-smoke ${{ env.BENCHMARKING_DIR }}/dist/credential-schema-test.js + ./k6 run -e SCENARIO_LABEL=did-publishing-smoke ${{ env.BENCHMARKING_DIR }}/dist/did-publishing-test.js + ./k6 run -e SCENARIO_LABEL=connection-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/connection-flow-test.js + ./k6 run -e SCENARIO_LABEL=issuance-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/issuance-flow-test.js + ./k6 run -e SCENARIO_LABEL=present-proof-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/present-proof-flow-test.js From 09034feba9d0e0fd706f330e32610102331b1c67 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 15:01:26 +0100 Subject: [PATCH 3/9] fix: create schema before trying to issue credential offer in perf test Signed-off-by: David Poltorak --- .../src/tests/credentials/credential-offer-test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts index 30e87e1628..65415a012a 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts @@ -1,8 +1,9 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import { Issuer, Holder } from '../../actors'; -import { Connection } from '@input-output-hk/prism-typescript-client'; +import { Connection, CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; import { defaultScenarios, defaultThresholds } from '../../scenarios/default'; +import { Schema } from 'copy-webpack-plugin'; export let options: Options = { scenarios: { ...defaultScenarios @@ -31,22 +32,29 @@ export function setup() { holder.finalizeConnectionWithIssuer(); }); + group("Issuer creates credential schema", function () { + issuer.createCredentialSchema(); + }); + return { issuerDid: issuer.did, holderDid: holder.did, + issuerSchema: issuer.schema, connectionWithHolder: issuer.connectionWithHolder!, connectionWithIssuer: holder.connectionWithIssuer! }; } -export default (data: { issuerDid: string; holderDid: string; connectionWithHolder: Connection, connectionWithIssuer: Connection }) => { +export default (data: { issuerDid: string; holderDid: string; issuerSchema: CredentialSchemaResponse, connectionWithHolder: Connection, connectionWithIssuer: Connection }) => { // This is the only way to pass data from setup to default issuer.did = data.issuerDid; + issuer.schema = data.issuerSchema holder.did = data.holderDid; issuer.connectionWithHolder = data.connectionWithHolder; holder.connectionWithIssuer = data.connectionWithIssuer; + group('Issuer creates credential offer', function () { issuer.createCredentialOffer(); }); From 541fb498d151fb4570d6befbffa73303ca84a435 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 15:19:14 +0100 Subject: [PATCH 4/9] fix: comply to eslint rules Signed-off-by: David Poltorak --- .../src/common/ConnectionService.ts | 4 +++- .../atala-performance-tests-k6/src/common/DidService.ts | 6 ++++-- .../atala-performance-tests-k6/src/common/HttpService.ts | 2 +- .../src/tests/credentials/credential-offer-test.ts | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts index 19f0f524d1..389665ea55 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts @@ -1,3 +1,5 @@ +/*global _*/ + import { Connection, ConnectionInvitation, ConnectionStateEnum } from "@input-output-hk/prism-typescript-client"; import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; import { HttpService } from "./HttpService"; @@ -66,7 +68,7 @@ export class ConnectionService extends HttpService { sleep(WAITING_LOOP_PAUSE_INTERVAL); iterations++; } while (state !== requiredState && iterations < WAITING_LOOP_MAX_ITERATIONS); - if (state != requiredState) { + if (state !== requiredState) { throw new Error(`Connection state is ${state}, required ${requiredState}`); } } diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts index 2f7807c4a2..60814b1b62 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts @@ -1,8 +1,10 @@ +/*global _*/ + import { HttpService } from "./HttpService"; import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; import { CreateManagedDIDResponse, DIDDocument, DidOperationSubmission, ManagedDID } from "@input-output-hk/prism-typescript-client"; -import {check, sleep} from "k6"; -import http from "k6/http"; +import {sleep} from "k6"; + /** * A service class for managing decentralized identifiers (DIDs) in the application. diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts index 235e3a8ff4..4b98159cc1 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts @@ -1,6 +1,6 @@ import http from 'k6/http'; -import {bytes, check} from 'k6'; +import { check } from 'k6'; import { RefinedResponse, ResponseType, RequestBody } from 'k6/http'; /** diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts index 65415a012a..0f85afad2a 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts @@ -3,7 +3,7 @@ import { Options } from 'k6/options'; import { Issuer, Holder } from '../../actors'; import { Connection, CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; import { defaultScenarios, defaultThresholds } from '../../scenarios/default'; -import { Schema } from 'copy-webpack-plugin'; + export let options: Options = { scenarios: { ...defaultScenarios From d194fb4d8b3fb23d7d0cd27e5450b447c04f9475 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 15:21:25 +0100 Subject: [PATCH 5/9] fix: eslint config for __ENV Signed-off-by: David Poltorak --- .../src/common/ConnectionService.ts | 2 +- .../src/common/DidService.ts | 2 +- .../src/scenarios/default.ts | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts index 389665ea55..d43acd6678 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts @@ -1,4 +1,4 @@ -/*global _*/ +/*global __ENV*/ import { Connection, ConnectionInvitation, ConnectionStateEnum } from "@input-output-hk/prism-typescript-client"; import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts index 60814b1b62..95f1cc60c8 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts @@ -1,4 +1,4 @@ -/*global _*/ +/*global __ENV*/ import { HttpService } from "./HttpService"; import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config"; diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts index 8c2470f57b..80aa657e12 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -1,11 +1,13 @@ -import { Scenario, Threshold } from "k6/options"; +/*global __ENV*/ +import { Scenario, Threshold } from "k6/options"; export const defaultScenarios: { [name: string]: Scenario } = { smoke: { // a simple test to ensure performance tests work and requests don't fail - executor: "constant-vus", - vus: 3, - duration: "10s", + executor: "shared-iterations", + vus: 1, + iterations: 1, + // duration: "2m", tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform }, }; From c4f859fe9c1d9e66a8ba9aee3592f9f6db2c4b74 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 15:36:55 +0100 Subject: [PATCH 6/9] fix: change smoke workload and thresholds Signed-off-by: David Poltorak --- .../src/scenarios/default.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts index 80aa657e12..54215dcbe2 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -4,10 +4,9 @@ import { Scenario, Threshold } from "k6/options"; export const defaultScenarios: { [name: string]: Scenario } = { smoke: { // a simple test to ensure performance tests work and requests don't fail - executor: "shared-iterations", - vus: 1, - iterations: 1, - // duration: "2m", + executor: "constant-vus", + vus: 3, + duration: "10s", tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform }, }; @@ -22,8 +21,8 @@ export const defaultThresholds: { [name: string]: Threshold[] } = { ], http_req_duration: [ // fail if any requests take longer than 500ms on smoke test - { threshold: "p(95)<500", abortOnFail: true }, // 95% of requests should complete within 500ms - { threshold: "p(99)<1500", abortOnFail: true }, // 99% of requests should complete within 1500ms + { threshold: "p(95)<1000", abortOnFail: true }, // 95% of requests should complete within 500ms + { threshold: "p(99)<2000", abortOnFail: true }, // 99% of requests should complete within 1500ms ], checks: ["rate==1"], // fail if any checks fail (the checks are defined in test code which is executed) }; From df232b8ef4a71ed8e89fa730382321215afdfa5a Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 15:43:35 +0100 Subject: [PATCH 7/9] fix: switching back to shared interations to 1 cycle completes Signed-off-by: David Poltorak --- .../atala-performance-tests-k6/src/scenarios/default.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts index 54215dcbe2..1153b6a522 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -4,9 +4,9 @@ import { Scenario, Threshold } from "k6/options"; export const defaultScenarios: { [name: string]: Scenario } = { smoke: { // a simple test to ensure performance tests work and requests don't fail - executor: "constant-vus", - vus: 3, - duration: "10s", + executor: "shared-iterations", + vus: 1, + iterations: 1, tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform }, }; From 406855d3c2d7f5510a177ef614dc4013d714be37 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Fri, 29 Sep 2023 16:07:21 +0100 Subject: [PATCH 8/9] fix: set thresholds to very high due to ci failures Signed-off-by: David Poltorak --- .../atala-performance-tests-k6/src/scenarios/default.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts index 1153b6a522..894049bb36 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -21,8 +21,8 @@ export const defaultThresholds: { [name: string]: Threshold[] } = { ], http_req_duration: [ // fail if any requests take longer than 500ms on smoke test - { threshold: "p(95)<1000", abortOnFail: true }, // 95% of requests should complete within 500ms - { threshold: "p(99)<2000", abortOnFail: true }, // 99% of requests should complete within 1500ms + { threshold: "p(95)<2000", abortOnFail: true }, // 95% of requests should complete within 2 seconds + { threshold: "p(99)<5000", abortOnFail: true }, // 99% of requests should complete within 5 seconds ], checks: ["rate==1"], // fail if any checks fail (the checks are defined in test code which is executed) }; From bb05c3e53ea942e56718d07f87fda92b8e0bbdcd Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Mon, 2 Oct 2023 16:20:03 +0100 Subject: [PATCH 9/9] fix: set setupTimeout to increased value Signed-off-by: David Poltorak --- .../src/scenarios/default.ts | 51 ++++++++++--------- .../credentials/credential-offer-test.ts | 13 ++--- .../credentials/credential-schema-test.ts | 12 ++--- .../src/tests/dids/create-prism-did-test.ts | 12 ++--- .../src/tests/dids/did-publishing-test.ts | 12 ++--- .../src/tests/flows/issuance-flow-test.ts | 15 ++---- .../tests/flows/present-proof-flow-test.ts | 12 ++--- 7 files changed, 47 insertions(+), 80 deletions(-) diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts index 894049bb36..28332cdd92 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts @@ -1,28 +1,31 @@ /*global __ENV*/ -import { Scenario, Threshold } from "k6/options"; -export const defaultScenarios: { [name: string]: Scenario } = { - smoke: { - // a simple test to ensure performance tests work and requests don't fail - executor: "shared-iterations", - vus: 1, - iterations: 1, - tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform - }, -}; +import { Options } from "k6/options"; -export const defaultThresholds: { [name: string]: Threshold[] } = { - http_req_failed: [ - // fail if any requests fail during smoke test - { - threshold: "rate==0", - abortOnFail: true, +export const defaultOptions: Options = { + setupTimeout: '120s', + scenarios: { + smoke: { + // a simple test to ensure performance tests work and requests don't fail + executor: "shared-iterations", + vus: 1, + iterations: 1, + tags: { scenario_label: __ENV.SCENARIO_LABEL || "defaultScenarioLabel" }, // add label for filtering in observability platform }, - ], - http_req_duration: [ - // fail if any requests take longer than 500ms on smoke test - { threshold: "p(95)<2000", abortOnFail: true }, // 95% of requests should complete within 2 seconds - { threshold: "p(99)<5000", abortOnFail: true }, // 99% of requests should complete within 5 seconds - ], - checks: ["rate==1"], // fail if any checks fail (the checks are defined in test code which is executed) -}; + }, + thresholds: { + http_req_failed: [ + // fail if any requests fail during smoke test + { + threshold: "rate==0", + abortOnFail: true, + }, + ], + http_req_duration: [ + { threshold: "p(95)<2000", abortOnFail: true }, // 95% of requests should complete within 2 seconds + { threshold: "p(99)<5000", abortOnFail: true }, // 99% of requests should complete within 5 seconds + ], + checks: [{ threshold: "rate==1", abortOnFail: true }], // fail if any checks fail (the checks are defined in test code which is executed) + + } +} diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts index 0f85afad2a..3a51b0bd7e 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts @@ -2,16 +2,9 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import { Issuer, Holder } from '../../actors'; import { Connection, CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; -import { defaultScenarios, defaultThresholds } from '../../scenarios/default'; - -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions export const issuer = new Issuer(); export const holder = new Holder(); diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts index 6510448d48..74dac9ff3d 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts @@ -1,15 +1,9 @@ import { group } from "k6"; import { Options } from "k6/options"; import { Issuer } from "../../actors"; -import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions export const issuer = new Issuer(); export function setup() { diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts index a3fe3a3507..6acf3a10e6 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts @@ -1,14 +1,8 @@ import { Options } from 'k6/options'; import { Issuer } from '../../actors'; -import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions const issuer = new Issuer(); diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts index 177401414a..1d7ae9e596 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts @@ -1,14 +1,8 @@ import { Options } from 'k6/options'; import { Issuer } from '../../actors'; -import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions const issuer = new Issuer(); export default () => { diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts index 7c1076e503..2bac08c201 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts @@ -2,15 +2,10 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import {issuer, holder} from '../common'; import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; -import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions + // This is setup code. It runs once at the beginning of the test, regardless of the number of VUs. export function setup() { @@ -48,7 +43,7 @@ export default (data: { issuerDid: string; holderDid: string; issuerSchema: Cred issuer.createCredentialOffer(); issuer.waitForCredentialOfferToBeSent(); }); - + group('Holder achieves and accepts credential offer from Issuer', function () { holder.waitAndAcceptCredentialOffer(issuer.credential!.thid); }); diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts index c99e964f59..3f97c09294 100644 --- a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts +++ b/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts @@ -2,15 +2,9 @@ import { group } from 'k6'; import { Options } from 'k6/options'; import { Issuer, Holder, Verifier } from '../../actors'; import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'; -import {defaultScenarios, defaultThresholds} from "../../scenarios/default"; -export let options: Options = { - scenarios: { - ...defaultScenarios - }, - thresholds: { - ...defaultThresholds - } -} +import { defaultOptions } from "../../scenarios/default"; + +export let options: Options = defaultOptions const issuer = new Issuer(); const holder = new Holder();