performance monitoring hooks

This commit is contained in:
bymyself
2025-06-09 07:43:57 -07:00
parent e488b2abce
commit 428fca64f9
5 changed files with 510 additions and 72 deletions

View File

@@ -39,7 +39,7 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
timeout: 15000,
grepInvert: /@mobile/ // Run all tests except those tagged with @mobile
grepInvert: /@mobile|@perf/ // Run all tests except those tagged with @mobile or @perf
},
{
@@ -49,6 +49,21 @@ export default defineConfig({
grep: /@2x/ // Run all tests tagged with @2x
},
{
// Set workers in cli or in upper config
name: 'performance',
use: {
...devices['Desktop Chrome'],
// Single worker for consistent performance measurements
trace: 'retain-on-failure'
},
timeout: 30000, // Longer timeout for performance tests
grep: /@perf/, // Run only tests tagged with @perf
ignoreSnapshots: true,
// repeatEach: 5,
fullyParallel: false
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },