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

fix: deflake TTI audit by extending trace #1785

Merged
merged 4 commits into from
Feb 27, 2017
Merged

fix: deflake TTI audit by extending trace #1785

merged 4 commits into from
Feb 27, 2017

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Feb 27, 2017

R: @paulirish all

fixes #1784

@@ -3,6 +3,7 @@
"passName": "defaultPass",
"recordNetwork": true,
"recordTrace": true,
"pauseAfterTraceMs": 500,
Copy link
Member

Choose a reason for hiding this comment

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

the pause is previous to ending the trace, so i'd think we'd call it something likerecordTraceEndDelay. wdyt?

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 true, just was very similar in spirit to the pauseAfterLoadMs so wanted to be consistent. How about pauseBeforeTraceEnd? Nix the Ms either way?

Copy link
Member

Choose a reason for hiding this comment

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

yah. i actually wrote that first. :) and then revised so it looks more similar to recordTrace since they're buddies

but yeah let's go with pauseBeforeTraceEnd since we both went there.

/**
* @param {number=} pauseAfterTraceMs Wait this many milliseconds before ending the trace
*/
endTrace(pauseAfterTraceMs = 500) {
Copy link
Member

Choose a reason for hiding this comment

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

dont you want a default of 0, since you're setting the config specifically for this pass?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess depends on if we want previous custom configs to be opt-in or opt-out of the fix. The myriad of ways to run lighthouse gets thorny with all these options :) I'm fine with 0 too since I'm guessing custom config usage is quite, quite low

Copy link
Member

Choose a reason for hiding this comment

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

yah. let's do 0.

but since you mentioned it. can you add pauseBeforeTraceEnd into the perf.json as well? :)

outside of that one, custom configs are pretty rare yeah. so far we have no evidence anyone other than us are using them.

@@ -606,7 +609,7 @@ class Driver {
});

// Issue the command to stop tracing.
this.sendCommand('Tracing.end').catch(reject);
setTimeout(() => this.sendCommand('Tracing.end').catch(reject), pauseAfterTraceMs);
Copy link
Member

Choose a reason for hiding this comment

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

let's just remind ourselves why this was neccessary. :) something like..

Stop tracing, after an optional delay. Audits like TTI may require having a slightly longer trace

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do 👍

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

approve but would like the addition to perf.json

up to you if you wanna nuke Ms. No feelings here.

@patrickhulce
Copy link
Collaborator Author

would like the addition to perf.json

done

@paulirish paulirish merged commit d89ec94 into master Feb 27, 2017
@paulirish paulirish deleted the tti_deflake branch February 27, 2017 21:48
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.

TTI Audit fails on sites that do an amazing job
2 participants