Skip to content

Conversation

@connorjclark
Copy link
Collaborator

For example usages, see #9712 and #9713

.array('urls')
.string('lh-flags')
.default('lh-flags', '')
// Why is the printing for examples so awful?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Anyone know how to make yargs examples output not look terrible?
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

We're still on ancient yargs so I'm sure it's been fixed in a version released in the past 5 years :)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

awesome script :)

.array('urls')
.string('lh-flags')
.default('lh-flags', '')
// Why is the printing for examples so awful?
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're still on ancient yargs so I'm sure it's been fixed in a version released in the past 5 years :)

@vercel vercel bot temporarily deployed to staging September 23, 2019 23:38 Inactive
Copy link
Contributor

@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.

this is really handy. Do we want a more descriptive name for the script? I don't have a good suggestion, though

/** @type {LH.Result} */
const lhr = JSON.parse(lhrJson);

for (const measureName of lhr.timing.entries.map(entry => entry.name)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it might make sense to s/measure/timing for a lot of these names, to avoid splitting the nomenclature from timing/Execution timings/timingEntries we use for the values in all of the core files. Not a huge deal, but it does make it harder to remember in this file that there are accumulations of lhr.timing entries

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

gave it a shot

@connorjclark
Copy link
Collaborator Author

compare-timings.js?

@brendankenny
Copy link
Contributor

compare-timings.js?

SGTM

function summarize() {
// `${url}@@@${entry.name}` -> duration
/** @type {Map<string, number[]>} */
const durationsMap = new Map();
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this is better. Now we have timing, measure, and duration :)

Copy link
Contributor

@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! ⏱📊

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.

4 participants