Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/kernel/test/performance-benchmarks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ describe('Performance Benchmarks', () => {

const duration = performance.now() - start;

expect(duration).toBeLessThan(1); // Should be very fast
expect(duration).toBeLessThan(5); // Should be very fast (5ms threshold accounts for CI environment overhead)
Comment on lines 353 to +355
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This benchmark times a single very-small operation (5 nodes) using performance.now(), which is highly sensitive to timer resolution, GC, and scheduler jitter—especially in CI. Instead of only relaxing the absolute threshold, consider running the resolution in a loop (with a warm-up) and asserting on average/median duration; this will keep the test stable while still catching regressions.

Copilot uses AI. Check for mistakes.
expect(resolved).toHaveLength(5);
});

Expand Down
Loading
Loading