New issue
Advanced search Search tips

Issue 841613 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 28
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

HAR entry blocked time calculation is mixing seconds and milliseconds

Reported by sue...@gmail.com, May 9 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
Based on the DevTools frontend code, entry.timings.blocked is initialized to a value which represents seconds (https://github.com/ChromeDevTools/devtools-frontend/blob/master/front_end/browser_sdk/HAREntry.js#L163-L164), and then later incremented using a value representing milliseconds (https://github.com/ChromeDevTools/devtools-frontend/blob/master/front_end/browser_sdk/HAREntry.js#L171-L173). This causes the final value to be mis-calculated.

What is the expected behavior?
All times should be first converted to milliseconds (the units of entry.timings.blocked) before setting or adding them to the existing value

What went wrong?
The blocked time for an entry was miscalculated because only 1/1000 of the queuedTime was considered when calculating it.

Did this work before? N/A 

Chrome version: 66.0.3359.117  Channel: canary
OS Version: OS X 10.13.2
Flash Version:
 
Labels: Needs-Triage-M66

Comment 2 by alph@chromium.org, May 10 2018

Components: -Platform>DevTools Platform>DevTools>Network
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
Owner: jarhar@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75d687cb725b5769aa9b4dfa39e883d06601d767

commit 75d687cb725b5769aa9b4dfa39e883d06601d767
Author: Joey Arhar <jarhar@chromium.org>
Date: Fri Sep 28 23:28:50 2018

[DevTools] Correct HAR export blocked time

The request queued time was not converted from seconds to milliseconds
before being exoprted to HAR, which is in milliseconds.

Added test coverage by adding more timing information to a HAR export
test.

Bug:  841613 
Change-Id: Iea119b16f67a29b2984a7bcca6cf53bd7313723b
Reviewed-on: https://chromium-review.googlesource.com/1252881
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595248}
[modify] https://crrev.com/75d687cb725b5769aa9b4dfa39e883d06601d767/third_party/WebKit/LayoutTests/http/tests/devtools/resource-har-headers-expected.txt
[modify] https://crrev.com/75d687cb725b5769aa9b4dfa39e883d06601d767/third_party/WebKit/LayoutTests/http/tests/devtools/resource-har-headers.js
[modify] https://crrev.com/75d687cb725b5769aa9b4dfa39e883d06601d767/third_party/blink/renderer/devtools/front_end/sdk/HARLog.js

Status: Fixed (was: Assigned)

Sign in to add a comment