Skip to content
Permalink
Browse files

Updated performance userscript for new perf API

  • Loading branch information...
asajeffrey committed Sep 3, 2019
1 parent 4f4e219 commit 1c174900e9778fa5d19c30cd21af12fc2b42f3d7
Showing with 8 additions and 21 deletions.
  1. +8 −21 etc/ci/performance/user-agent-js/01.perf-timing.js
@@ -13,27 +13,14 @@ function printPerfTiming() {
print("[PERF] perf block start")
formatLine("testcase", window.location);
formatLine("title", document.title.replace(/,/g, ","));
formatLine("navigationStart", performance.timing.navigationStart);
formatLine("unloadEventStart", performance.timing.unloadEventStart);
formatLine("unloadEventEnd", performance.timing.unloadEventEnd);
formatLine("redirectStart", performance.timing.redirectStart);
formatLine("redirectEnd", performance.timing.redirectEnd);
formatLine("fetchStart", performance.timing.fetchStart);
formatLine("domainLookupStart", performance.timing.domainLookupStart);
formatLine("domainLookupEnd", performance.timing.domainLookupEnd);
formatLine("connectStart", performance.timing.connectStart);
formatLine("connectEnd", performance.timing.connectEnd);
formatLine("secureConnectionStart", performance.timing.secureConnectionStart);
formatLine("requestStart", performance.timing.requestStart);
formatLine("responseStart", performance.timing.responseStart);
formatLine("responseEnd", performance.timing.responseEnd);
formatLine("domLoading", performance.timing.domLoading);
formatLine("domInteractive", performance.timing.domInteractive);
formatLine("domContentLoadedEventStart", performance.timing.domContentLoadedEventStart);
formatLine("domContentLoadedEventEnd", performance.timing.domContentLoadedEventEnd);
formatLine("domComplete", performance.timing.domComplete);
formatLine("loadEventStart", performance.timing.loadEventStart);
formatLine("loadEventEnd", performance.timing.loadEventEnd);
var entries = performance.getEntriesByName(window.location);
for (entry in entries) {
for (key in entries[entry]) {
if (typeof entries[entry][key] === "number") {
formatLine(key, entries[entry][key]);
}
}
}
print("[PERF] perf block end")
}

0 comments on commit 1c17490

Please sign in to comment.
You can’t perform that action at this time.