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

core(main-thread-tasks): use toplevel tasks in main thread audit #7711

Merged
merged 3 commits into from
Mar 27, 2019

Conversation

patrickhulce
Copy link
Collaborator

Summary
Typo in the main-thread-tasks audit, I didn't get around to surfacing this yet, so it shouldn't have hurt anything. I think I was originally going for first inner child of toplevel task so we'd actually have a type, but then again I wasn't using the results yet, so 🤷‍♂️

Related Issues/PRs
#7700

@patrickhulce
Copy link
Collaborator Author

cc @alekseykulikov

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -32,18 +32,16 @@ class MainThreadTasks extends Audit {
const tasks = await MainThreadTasksComputed.request(trace, context);

const results = tasks
.filter(task => task.duration > 5 && task.parent)
.filter(task => task.duration > 5 && !task.parent)
Copy link
Member

Choose a reason for hiding this comment

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

maybe add a comment that top level === no parent here? Easy to miss the point of the filter though it's obvious once you realize :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah good call, I mean I missed it the first time around 😆

@alekseykulikov
Copy link
Contributor

LGTM!

@brendankenny brendankenny merged commit 08c16f7 into master Mar 27, 2019
@brendankenny brendankenny deleted the fix_main_thread_tasks_audit branch March 27, 2019 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants