-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add timing to debug logs for fides.js #5245
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
fides Run #9742
Run Properties:
|
Project |
fides
|
Branch Review |
refs/pull/5245/merge
|
Run status |
Passed #9742
|
Run duration | 00m 39s |
Commit |
e8001aa292 ℹ️: Merge 46245f732c3b4b1e0761dd5b776020f90c7e308a into b7bb6bbbf74e36327f89054d909e...
|
Committer | Jason Gill |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and I know my comments are on just the demo page, but nonetheless I want to be certain we're avoiding "property does not exist on type" errors.
window.addEventListener("FidesUIShown", () => { | ||
// Log event timing | ||
const fidesLoaded = performance | ||
.getEntriesByType("resource") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can performance.getEntriesByType("resource") ever be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not null, only empty array []
fidesTiming[ | ||
`fides.js (${(fidesLoaded.encodedBodySize / 1000).toFixed(2)} kB)` | ||
] = { | ||
"Time (ms)": parseFloat(fidesLoaded.responseEnd.toFixed(2)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can fidesLoaded
be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only if fides.js
didn't load on the demo page, and then we have bigger fish to fry 😄
.getEntriesByType("resource") | ||
.find((entry) => entry.name.includes("fides")); | ||
const fidesEvents = performance | ||
.getEntriesByType("mark") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here- can we rely on this existing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worst case it's empty array []
fides Run #9759
Run Properties:
|
Project |
fides
|
Branch Review |
main
|
Run status |
Passed #9759
|
Run duration | 00m 38s |
Commit |
e8f344029b: add timing to debug logs for fides.js (#5245)
|
Committer | Jason Gill |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
Description Of Changes
Adds timings to our debug logs for fides.js
Steps to Confirm
http://localhost:3001/fides-js-demo.html?geolocation=eea
)Pre-Merge Checklist
CHANGELOG.md