Skip to content

Commit 49ae356

Browse files
committed
Include marks when calculating largest time for the waterfall graph
This is needed for HARs generated on a phone, assets can be downloaded fast but it takes time until everything is ready.
1 parent f2be2e0 commit 49ae356

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/ts/transformers/har.ts

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ export function transformPage(harData: Har | Log,
123123
});
124124

125125
const marks = getMarks(pageTimings, currPage, options);
126+
// if marks happens later than doneTime, increase the doneTime
127+
marks.forEach((mark) => {
128+
if (mark.startTime > doneTime) {
129+
doneTime = mark.startTime;
130+
}
131+
});
126132

127133
// Add 100ms margin to make room for labels
128134
doneTime += 100;

0 commit comments

Comments
 (0)