-
Notifications
You must be signed in to change notification settings - Fork 9.6k
misc(compare-runs): fix filter, allow for resume, reorganize output #10519
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
Conversation
@@ -117,25 +117,32 @@ function round(value) { | |||
* @return {string} | |||
*/ | |||
function getProgressBar(i, total = argv.n * argv.urls.length) { | |||
return new Array(Math.round(i * 40 / total)).fill('▄').join('').padEnd(40); | |||
const bars = new Array(Math.round(i * 40 / total)).fill('▄').join('').padEnd(40); | |||
return `${i} / ${total} [${bars}]`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the math here is off. i is unique per URL and you want i+1
here's a good repro:
node lighthouse-core/scripts/compare-runs.js --name my-collectiondeleteme --gather -n 2 --urls https://www.example.com http://example.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to push this exact fix :(
} | ||
|
||
if (includeFilter && !includeFilter.test(result.key)) { | ||
if (includeFilter && !includeFilter.test(result.name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping it on key meant you can do --filter=metric
(which is documented and i really like)
we could use something else for metric/timing filtering vs this regex on name tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, just had to move this filter check before the property delete :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resumable is greattttttt
nice stuff
--filter
was broken from the last change