Skip to content

Commit

Permalink
cleanTrace acts on the whole trace
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored Aug 5, 2016
1 parent c87fab5 commit fa837c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lighthouse-core/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const log = require('../lib/log');
// and to change TracingStartedInBrowser events into TracingStartedInPage.
// This is done by searching for most occuring threads and basing new events
// off of those.
function cleanTrace(traceEvents) {
function cleanTrace(trace) {
const traceEvents = trace.traceEvents;
// Keep track of most occuring threads
const threads = [];
const countsByThread = {};
Expand Down Expand Up @@ -103,7 +104,7 @@ function cleanTrace(traceEvents) {
// and using TS of first found TracingStartedIn* event
traceEvents.unshift(makeMockEvent(mostActiveFrame, ts));

return traceEvents;
return trace;
}

function filterPasses(passes, audits) {
Expand Down Expand Up @@ -196,7 +197,7 @@ function expandArtifacts(artifacts, includeSpeedline) {
traceEvents: trace
};
}
cleanTrace(trace.traceEvents);
trace = cleanTrace(trace);

expandedArtifacts.traces[key] = trace;
});
Expand Down

0 comments on commit fa837c3

Please sign in to comment.