agusantoso / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

pageTimings without onLoad or with onLoad equals -1 #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. A pageTimings without onLoad
2. Or a pageTimings with "onLoad":-1

What is the expected output? What do you see instead?

In the 1.1 and 1.2 spec, onLoad is said to be optional, but HAR viewer does not 
accept HAR without onLoad timing.

Also in the spec, the value -1 could be used. But in this case the graph 
generated by HAR viewer is quite strange. I think that HAR viewer is using the 
onLoad value to scale the graph, but when the value is -1 or 0 the graph is not 
scaled.

A copy of the spec (1.2) : 
"onLoad [number,optional] - Page is loaded (onLoad event fired). Number of 
milliseconds since page load started (page.startedDateTime). Use -1 if the 
timing does not apply to the current request."

What version of the product are you using? On what operating system?
1.1-10

Please provide any additional information below.
I really love your work, harviewer is really sexy ;)
Thank you that you did it open source.

Please attach a HAR file that can be used to reproduce the problem.

Original issue reported on code.google.com by filir...@gmail.com on 9 Aug 2010 at 3:30

Attachments:

GoogleCodeExporter commented 9 years ago
Patch committed at R138 (part of the patch is also customization of the 
"phaseInterval" through a cookie), doc and test needed yet.

Thanks for the report!

Will be in 1.1-11.

Honza

Original comment by odva...@gmail.com on 16 Aug 2010 at 6:15

GoogleCodeExporter commented 9 years ago
Another schema update (also related to pageTimings.onContentLoad) committed at 
R139
Honza

Original comment by odva...@gmail.com on 24 Aug 2010 at 3:03

GoogleCodeExporter commented 9 years ago
Selenium test for this issue committed at R141
Honza

Original comment by odva...@gmail.com on 24 Aug 2010 at 3:21

GoogleCodeExporter commented 9 years ago
HAR Viwer 1.1-11 released
Honza

Original comment by odva...@gmail.com on 24 Aug 2010 at 3:33

GoogleCodeExporter commented 9 years ago
Doc updated
http://code.google.com/p/harviewer/wiki/Customization
Honza

Original comment by odva...@gmail.com on 24 Aug 2010 at 3:51

GoogleCodeExporter commented 9 years ago
Thank you very much

HARViewer now accept har without onLoad field, great :)

But the second timings line start at 0ms, and should start after the first line 
(this is the behaviour with the onLoad timing).

See the difference between 
  - withMinusOneLoad.har 
  - withOnLoad.har

Thank you

Original comment by filir...@gmail.com on 13 Sep 2010 at 12:54

Attachments:

GoogleCodeExporter commented 9 years ago
> But the second timings line start at 0ms, and should start after the
> first line (this is the behaviour with the onLoad timing).
I don't understand what you mean.

> See the difference between 
>  - withMinusOneLoad.har 
>  - withOnLoad.har
withOnLoad.har - seems to be fine for me. I see both vertical lines 
(onContentLoad, onLoad)

withMinusOneLoad.har - this seems to be wrong since onContentLoad is in HAR and 
not displayed. Is this the problem, you have in mind?

Honza

Original comment by odva...@gmail.com on 13 Sep 2010 at 4:57

GoogleCodeExporter commented 9 years ago
No, I was not clear.

I joinded a screenshot to make it clearer.

with onLoad, the timing line looks like this : 
html : ---
css  :    --------

witout onLoad, the timing line looks like this : 
html : -----------
css  : -----------

And we all know that the css start after the html.

Original comment by filir...@gmail.com on 14 Sep 2010 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago
Ah, understand now. This is actually not a bug, but rather a feature.

If a time lag between two HTTP requests (counted from the end of the first one 
till the beginning of the second one) exceeds a limit, the graphical timeline 
breaks layout and requests are drawn again from the beginning (left side) of 
the waterfall diagram.

This allows better utilization of the time axes (horizontal) (in case of large 
lags).
Some more info here:
http://www.softwareishard.com/blog/firebug/firebug-net-panel-timings/

Anyway, there is an exception, all requests executed during the page load phase 
(till onload event) are always displayed together (there is no break even if 
the gap exceeds the limit).

In your case, the gap between the two requests is bigger than 1000ms (the 
default value) and the reason why they are displayed together is the "onload" 
event which represents the end of page load - if it's missing then the 
layout-break happens.

There are two solutions for you:

1) make the default limit bigger. Create phaseInterval cookie and set it to 
e.g. 5000
(you can use Firecookie - http://www.softwareishard.com/blog/firecookie/)

See other cookies:
http://code.google.com/p/harviewer/wiki/Customization

2) Latest (but still debug) version of HAR Viewer allows to customize these 
"layout 

See a context menu at the end of the request row and pick "Break Timeline 
Layout" (it's checked if the break happened at the clicked request).

See e.g. this HAR example:
http://www.janodvarko.cz/har/viewer-debug/?path=examples/www-cnn-com.har
click at the 6th request and remove the break layout mark.

This is new, feedback welcome!

Honza

Original comment by odva...@gmail.com on 14 Sep 2010 at 8:18

GoogleCodeExporter commented 9 years ago
Perfect, this is exactly what I need.

Maybe later, I will try to disable the break time line by deafult.

Thanks

Romain

Original comment by filir...@gmail.com on 14 Sep 2010 at 9:05