From a54d9707c77a1cf0a797dcf4529e9e97ae48a441 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 27 Mar 2024 09:16:29 -0400 Subject: [PATCH] chore: log canary times --- apps/laboratory/tests/canary.spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/laboratory/tests/canary.spec.ts b/apps/laboratory/tests/canary.spec.ts index 844e0f5b6e..b4775ab229 100644 --- a/apps/laboratory/tests/canary.spec.ts +++ b/apps/laboratory/tests/canary.spec.ts @@ -6,7 +6,9 @@ const ENV = process.env['ENVIRONMENT'] || 'dev' const REGION = process.env['REGION'] || 'eu-central-1' testConnectedMW.beforeEach(async ({ modalValidator, walletValidator }) => { + console.time("beforeEach expectConnection") await expectConnection(modalValidator, walletValidator) + console.timeEnd("beforeEach expectConnection") }) testConnectedMW.afterEach(async ({ browserName }, testInfo) => { @@ -15,6 +17,7 @@ testConnectedMW.afterEach(async ({ browserName }, testInfo) => { } if (ENV !== 'dev') { + console.time("uploadCanaryResultsToCloudWatch") const duration: number = testInfo.duration await uploadCanaryResultsToCloudWatch( ENV, @@ -24,18 +27,33 @@ testConnectedMW.afterEach(async ({ browserName }, testInfo) => { testInfo.status === 'passed', duration ) + console.timeEnd("uploadCanaryResultsToCloudWatch") } }) testConnectedMW( 'it should sign', async ({ modalPage, walletPage, modalValidator, walletValidator }) => { + console.time("modalPage.sign()") await modalPage.sign() + console.timeEnd("modalPage.sign()") + console.time("walletValidator.expectReceivedSign") await walletValidator.expectReceivedSign({}) + console.timeEnd("walletValidator.expectReceivedSign") + console.time("walletPage.handleRequest") await walletPage.handleRequest({ accept: true }) + console.timeEnd("walletPage.handleRequest") + console.time("modalValidator.expectAcceptedSign") await modalValidator.expectAcceptedSign() + console.timeEnd("modalValidator.expectAcceptedSign") + console.time("modalPage.disconnect") await modalPage.disconnect() + console.timeEnd("modalPage.disconnect") + console.time("modalValidator.expectDisconnected") await modalValidator.expectDisconnected() + console.timeEnd("modalValidator.expectDisconnected") + console.time("walletValidator.expectDisconnected") await walletValidator.expectDisconnected() + console.timeEnd("walletValidator.expectDisconnected") } )