-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
add lighthouse calculation time to json results #2241
Conversation
@@ -38,9 +38,10 @@ const Config = require('./config/config'); | |||
*/ | |||
|
|||
module.exports = function(url, flags = {}, configJSON) { | |||
return new Promise((resolve, reject) => { | |||
const startTime = Date.now(); |
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.
Audit error: Avoids Date.now() In Its Own Scripts
;)
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'd probably prefer something like totalRunTime
since I can seecalculationTime
being reserved for post-gather phase or something as we want to get more granular, but I'm cool with this too
no, that was my best effort at "timeDoingStuff" :) |
I guess the only confusing thing is the top-level |
how about a timing object: LHR.timing.total // 43752 (ms) (i imagine we'll want breakdown by pass, gather audit later on) name bikeshed: |
love |
|
I'm adding this to plots/, just sec :) |
plots/ now graphs the total execution time for runs (and can expand as we add other timings) |
happy to bikeshed on the name and where it should be taken, but basically it would be nice to be able to track how long a lighthouse run takes. I was going to do it in plots/, but @wwwillchen pointed out that it's actually a generally useful thing to have in the LHR.
We could put this inside
runner
, but it's actually kind of nice to track config and connection construction too. This does ignore work done inbin.ts
, however.