Skip to content

checkMemoryLeaks

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web-e2e/src/utils/performance.ts

Check for memory leaks by monitoring heap size

Signature

ts
async function checkMemoryLeaks(page: Page, action: () => Promise<void>, iterations): Promise<{
  hasLeak: boolean;
  heapGrowth: number;
  initialHeap: number;
  finalHeap: number;
}>

Parameters

NameType
pagePage
action() => Promise<void>
iterationsany

Returns: Promise<{ hasLeak: boolean; heapGrowth: number; initialHeap: number; finalHeap: number; }>

Was this page helpful?

Download as PDF