Skip to content

Commit

Permalink
page_params: Record page_params_parse_time.
Browse files Browse the repository at this point in the history
We put page_params_parse_time on the window object
to help diagnose customer issues.
  • Loading branch information
Steve Howell authored and timabbott committed Jan 15, 2020
1 parent 890a4b1 commit b8f9f60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions static/js/page_params.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const t1 = performance.now();
window.page_params = $("#page-params").remove().data("params");
const t2 = performance.now();
window.page_params_parse_time = t2 - t1;
if (!window.page_params) {
throw new Error("Missing page-params");
}

0 comments on commit b8f9f60

Please sign in to comment.