Skip to content

Conversation

@ConradJChan
Copy link
Contributor

Moved the load event emitted from DocBaseViewer from pagesinit to the first pagerendered event for PDFJS.

Also modified the emitLoadMetrics() method in Preview.js to include a meaningful_content_timestamp which can be used to calculate Time to Meaningful Content (TTMC)

@ConradJChan ConradJChan requested a review from a team as a code owner July 27, 2022 23:53
[LOAD_METRIC.downloadResponseTime]: downloadTime.elapsed || 0,
[LOAD_METRIC.contentLoadTime]: contentLoadTime.elapsed || 0,
[LOAD_METRIC.contentLoadTime]: contentLoadTimeDuration || 0,
[LOAD_METRIC.meaningfulContentTimestamp]: meaningfulContentTimestamp,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be contentLoadTimestamp to stay consistent with its other attribute? Should it default to 0, as well?

// Broadcast that preview has 'loaded' when page structure is available
if (!this.loaded) {
this.loaded = true;
this.emit(VIEWER_EVENT.load, {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this affect our existing metrics?

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Conrad Chan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants