Skip to content

Commit

Permalink
Include marks when calculating largest time for the waterfall graph
Browse files Browse the repository at this point in the history
This is needed for HARs generated on a phone, assets can be downloaded
fast but it takes time until everything is ready.
  • Loading branch information
soulgalore committed Apr 6, 2017
1 parent f2be2e0 commit 49ae356
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ts/transformers/har.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export function transformPage(harData: Har | Log,
});

const marks = getMarks(pageTimings, currPage, options);
// if marks happens later than doneTime, increase the doneTime
marks.forEach((mark) => {
if (mark.startTime > doneTime) {
doneTime = mark.startTime;
}
});

// Add 100ms margin to make room for labels
doneTime += 100;
Expand Down

0 comments on commit 49ae356

Please sign in to comment.