Skip to content

Commit

Permalink
feature: make threshold configurable (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
levivilet authored Dec 14, 2024
1 parent 78eae86 commit f3b2e20
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
6 changes: 0 additions & 6 deletions src/parts/Config/Config.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/parts/Main/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export const main = async () => {
workerPath: 'TODO',
playwrightPath: 'TODO',
root,
threshold: 400_000,
})
}
3 changes: 2 additions & 1 deletion src/parts/MeasureMemory/MeasureMemory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { threshold } from '../Config/Config.ts'
import { MemoryLimitExceededError } from '../Errors/Errors.ts'
import { getMemoryUsageWs } from '../GetMemoryUsageWs/GetMemoryUsageWs.ts'
import { launchBrowser } from '../LaunchBrowser/LaunchBrowser.ts'
Expand All @@ -12,13 +11,15 @@ export const measureMemory = async ({
remoteDebuggingPort,
root,
playwrightPath,
threshold,
}: {
workerPath: string
port: number
headless: boolean
remoteDebuggingPort: string
root: string
playwrightPath: string
threshold: number
}) => {
if (process.platform === 'win32') {
// not supported
Expand Down
4 changes: 0 additions & 4 deletions src/parts/PlaywrightPath/PlaywrightPath.ts

This file was deleted.

0 comments on commit f3b2e20

Please sign in to comment.