Skip to content
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 timings to the setting up of the web socket #59

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Conversation

bosschaert
Copy link
Contributor

Description

For responsiveness timing purposes.
The timings are added as response headers to the Web Socket setup process.
They include the following data (in milliseconds) ordered by when it happens:

  • X-1-timing-da-admin-head-duration: Duration of the initial HEAD call on da-admin
  • X-2-timing-docroom-get-duration: Duration of the time it takes to get the room object
  • X-4-timing-da-admin-get-duration: Duration of the time it takes to do a GET call on da-admin
  • X-5-timing-read-state-duration: Duration of time time it takes to read the document state from durable object persistent storage
  • X-7-timing-setup-websocket-duration: Accumulated time it takes to set up the websocket. Includes X-4 and X-5
  • X-9-timing-full-duration: The total duration. Includes all of the above.

Motivation and Context

To investigate where time is spent on occasional slow initial setups.

How Has This Been Tested?

Using the chrome response inspector.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

For responsiveness timing purposes.
The timings are added as response headers to the Web Socket setup
process.
They include the following data (in milliseconds) ordered by when it
happens:
* X-1-timing-da-admin-head-duration: Duration of the initial HEAD call
  on da-admin
* X-2-timing-docroom-get-duration: Duration of the time it takes to get
  the room object
* X-4-timing-da-admin-get-duration: Duration of the time it takes to do
  a GET call on da-admin
* X-5-timing-read-state-duration: Duration of time time it takes to read
  the document state from durable object persistent storage
* X-7-timing-setup-websocket-duration: Accumulated time it takes to set
  up the websocket. Includes X-4 and X-5
* X-9-timing-full-duration: The total duration. Includes all of the
  above.
Copy link

github-actions bot commented Dec 3, 2024

LCOV of commit 62dcbce during Install, lint, and test #115

Summary coverage rate:
  lines......: 96.7% (1477 of 1527 lines)
  functions..: 96.4% (54 of 56 functions)
  branches...: 94.6% (300 of 317 branches)

Files changed coverage rate:
                  |Lines       |Functions  |Branches    
  Filename        |Rate     Num|Rate    Num|Rate     Num
  ======================================================
  src/edge.js     |94.4%    306|88.9%     9|93.6%     47
  src/shareddoc.js|97.3%    550| 100%    18|94.1%     85

@bosschaert bosschaert requested a review from karlpauls December 3, 2024 10:54
@bosschaert bosschaert merged commit 9d4e4aa into main Dec 4, 2024
3 checks passed
@bosschaert bosschaert deleted the timings branch December 4, 2024 08:45
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants