Skip to content

Commit

Permalink
Collect more loaf
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Mar 12, 2024
1 parent f2cc6fc commit 4f19a52
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions browserscripts/pageinfo/loaf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
info.duration = entry.duration;
info.styleAndLayoutStart = entry.styleAndLayoutStart;
info.renderStart = entry.renderStart;
info.workDuration = entry.renderStart ? entry.renderStart - entry.startTime : entry.duration;
info.renderDuration = entry.renderStart ? (entry.startTime + entry.duration) - entry.renderStart: 0;
info.preLayoutDuration = entry.styleAndLayoutStart ? entry.styleAndLayoutStart - entry.renderStart : 0;
info.styleAndLayoutDuration = entry.styleAndLayoutStart ? (entry.startTime + entry.duration) - entry.styleAndLayoutStart : 0

info.scripts = [];
for (let script of entry.scripts) {
const s = {};
Expand All @@ -29,6 +34,8 @@
s.invokerType = script.invokerType;
s.sourceFunctionName = script.sourceFunctionName;
s.sourceURL = script.sourceURL;
s.sourceCharPosition = script.sourceCharPosition;
s.windowAttribution = script.windowAttribution;
info.scripts.push(s);
}
relevantLoadEntries.push(info);
Expand Down

0 comments on commit 4f19a52

Please sign in to comment.