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 Total Connection Time to the Request Details Dialog #1765

Merged
merged 4 commits into from
Mar 1, 2022

Conversation

tkadlec
Copy link
Contributor

@tkadlec tkadlec commented Feb 23, 2022

Closes #1755 by adding a Total Connection Time value to the request dialog box to make it easier see the combined impact of DNS+TCP+SSL.

Also broke up the long list of details to make it easier to scan.

Before:
Screen Shot 2022-02-23 at 1 41 34 PM

After:
Screen Shot 2022-02-23 at 1 41 56 PM

…ke it easier to see the combined impact of DNS+TCP+SSL.

While we're in here, I also broke up the long list of request details to give it some categorization and, hopefully, make it easier to scan.

Closes #1755.
www/waterfall.js Outdated
if (r['created'] !== undefined)
details += '<b>Discovered: </b>' + (r['created'] / 1000.0).toFixed(3) + ' s<br>';
if (r['load_start'] !== undefined)
details += '<b>Request Start: </b>' + (r['load_start'] / 1000.0).toFixed(3) + ' s<br>';
if (IsValidDuration(r['dns_ms'])) {
details += '<b>DNS Lookup: </b>' + htmlEncode(r['dns_ms']) + ' ms<br>';
totalConnectionTime += parseFloat(r['dns_ms']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a guarantee that anything we're passing into parseFloat is a string that can be cast to a Float? (if not, we probably want to take care of that somewhere so we don't end up with concatenating NaN in an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, are we ever parsing fractions of milliseconds? if not, maybe cast to Number instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm....good call. I'll switch to Number.

Also, for validation, I'm thinking a Number.isNaN(totalConnectionTime) check at the end probably suffices, eh?

@tkadlec tkadlec merged commit 90e3c69 into master Mar 1, 2022
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.

Display "Total Connection Time" in Request Details Modal
2 participants