Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding PerformanceObserver for long task and animation frame #6251

Closed
wants to merge 2 commits into from

Conversation

arafatkatze
Copy link
Contributor

@arafatkatze arafatkatze commented Dec 4, 2024

This PR is a part of the linear issue and @dominiccooney recommend this here

Test plan

Add the following right below the current additions

   setTimeout(() => {
            const start = performance.now();
            while (performance.now() - start < 100) {
                // Simulate a long task by blocking the main thread for 100ms
            }
            console.log('Fake long task executed');
        }, 1000);

        // Fake long animation frame
        requestAnimationFrame(() => {
            const start = performance.now();
            while (performance.now() - start < 100) {
                // Simulate a long animation frame by blocking the main thread for 100ms
            }
            console.log('Fake long animation frame executed');
        });

Run the code in debugger and in the console log you will see
image

Changelog

Copy link

github-actions bot commented Dec 4, 2024

‼️ Hey @sourcegraph/cody-security, please review this PR carefully as it introduces the usage of an unsafe_ function or abuses PromptString.

Copy link

github-actions bot commented Feb 3, 2025

This PR is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.

@github-actions github-actions bot added the Stale label Feb 3, 2025
@arafatkatze arafatkatze closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant