Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions e2e/performance.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import { test, expect } from '@playwright/test'
*/

// Performance thresholds (in milliseconds)
// Note: These are CI-friendly thresholds that account for slower runners
// and browser automation overhead (especially on Windows/webkit)
const THRESHOLDS = {
pageLoad: 3000, // Max time for initial page load
interactionResponse: 150, // Max time for button click response (includes Playwright overhead)
typingLatency: 50, // Max latency per keystroke
tabSwitch: 200, // Max time to switch tabs
interactionResponse: 250, // Max time for button click response (CI overhead)
typingLatency: 75, // Max latency per keystroke
tabSwitch: 350, // Max time to switch tabs
widgetCreation: 500, // Max time to create widgets
eventDispatch: 50, // Max time for event dispatch
eventDispatch: 100, // Max time for event dispatch
}

test.describe('Performance: Page Load', () => {
Expand Down Expand Up @@ -211,7 +213,7 @@ test.describe('Performance: Event Dispatch', () => {
const totalTime = Date.now() - startTime

console.log(`Keyboard event time: ${totalTime}ms`)
expect(totalTime).toBeLessThan(1000) // 20 events in 1 second
expect(totalTime).toBeLessThan(1500) // 20 events in 1.5 seconds (CI overhead)
})
})

Expand Down
Loading