-
Notifications
You must be signed in to change notification settings - Fork 686
Report artificialDelay on ServerTiming header for push requests
#11265
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
Conversation
| d.sleep(pushReq.artificialDelay) | ||
| } else { | ||
| // Delay is configured but request is already taking longer than the delay | ||
| pushReq.artificialDelay = 0 |
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.
Reporting artificial delay for these cases is very important. 0 artificial delay means request is taking longer than configured artificial delay, worst case scenario.
| r := &Request{ | ||
| getRequest: p, | ||
| getRequest: p, | ||
| artificialDelay: -1, |
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.
artificialDelay will be initialized to -1, because we want to use 0 as a value, so -1 would be the equivalent to "not set".
|
this made me realize that this PR doesn't document the header anywhere. Can you add it to the API reference and add a changelog entry too? |
Martin pointed me to a previous discussion where Marco asked to not document this feature (yet?). We'll do the same now too |
dimitarvdimitrov
left a comment
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.
thanks
What this PR does
This PR is an update of #11178 that better reports added
artificialDelayas part of theServerTimingheader on push requests.Check out for reviewer's notes on the code:
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX].about-versioning.mdupdated with experimental features.