joelvh / webpagetest

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

Empty embedded WebKit Timeline viewer #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run a test with Chrome and the Timeline capture enabled.
2. Click on the Timeline link in the result UI.

Observed: empty Inspector UI.
Expected: Inspetor UI showing the captured timeline.

Neither the NodeJS agent nor the Windows Chrome agent saved timeline JSON works 
with the Timeline link in the test result UI -- the embedded Inspector UI comes 
up empty.

Sample NodeJS result -- see e.g. 
http://code.google.com/p/webpagetest/issues/detail?id=127, a completely 
separate bug that just happens to have a NodeJS agent result tarball including 
the timeline.

That timeline file (or any other ones from the NodeJS agent) does not load. 
That's a JSON array of raw DevTools Timeline events. I also tried to save a 
timeline file from the regular Chrome DevTools UI -- which saves a special 
format file, with only a portion of the Timeline event objects, but that 
doesn't load either.

What I was expecting to see, is the JSON array of raw DevTools events loading 
into the embedded UI and showing both Network and Timeline waterfalls in the 
respective tabs, since we ended up embedding the whole Inspector UI including 
the Network. From that POV the saved file format is less desirable, because it 
can only contain Timeline and nothing else -- the Timeline is implicit there, 
since it strips the top level event object that has the method: field.

Original issue reported on code.google.com by k...@google.com on 18 Dec 2012 at 6:01

GoogleCodeExporter commented 8 years ago
Looks like WebKit/Chrome added a bunch of new timeline categories in the latest 
version (hard at work as always)... I've grafted the new categories into the 
existing code and it seems to work now. What's the protocol for submitting it? 
I can only find the read only svn repo.

Original comment by gabr...@gpeal.com on 20 Dec 2012 at 2:13

GoogleCodeExporter commented 8 years ago
Thanks Gabe! You can attach a patch file here or upload it to 
webpagetest-code-review.appspot.com and link from here.

But that's weird... I thought the DevTools protocol in general guarantees 
backward compatibility, in particular the UI is supposed to ignore unknown 
messages. If it doesn't, that would seem to be a legitimate Chromium bug. The 
repro steps for them would be for example:

1. Save-as a Timeline file from a Canary Chrome.
2. Load it in a Stable channel Chrome.

From what you're saying it seems that this would not work today, and I believe 
the DevTools folk state that it should.

Original comment by k...@google.com on 20 Dec 2012 at 3:33

GoogleCodeExporter commented 8 years ago
It seems this is actually more of a reverse-backwards compatibility in that the 
old ui (the one on webpagetest) doesn't load the new files whereas they 
probably ensure that the new ui works with old files.

The old code doesn't seem to gracefully fail when it gets an unrecognized 
RecordType (you'll see in the patch)

Original comment by gabr...@gpeal.com on 20 Dec 2012 at 3:57

GoogleCodeExporter commented 8 years ago
FYI, I also added your current email as a committer (let me know if you
have a gmail account you'd rather have with permissions as well) so you can
also commit directly if you'd like.  I expect the patch is going to be huge
because of the webkit changes themselves (unless you're just patching the
current UI in which case it should be a lot easier).  We can work with the
dev tools team to get your latest patches upstreamed as well unless you'd
like to (seems like forward compatibility in the built-in UI would be a
good thing since they allow for loading of arbitrary timelines).

Original comment by pmee...@google.com on 20 Dec 2012 at 1:34

GoogleCodeExporter commented 8 years ago
This is the proper email (it's Google Apps).

I submitted the patch on the code review site. It's actually quite small since 
I only updated the categories.

Original comment by gabr...@gpeal.com on 20 Dec 2012 at 8:51

GoogleCodeExporter commented 8 years ago
Thanks for the patch - all fixed.

Original comment by PatMee...@gmail.com on 20 Dec 2012 at 9:06

GoogleCodeExporter commented 8 years ago
What format files does it take -- a plain JSON array of raw DevTools events, or 
the DevTools UI saved Timeline file format?

Also do you mind posting the link to the code review? I don't see it in my 
email...

Thanks.

Original comment by k...@google.com on 20 Dec 2012 at 9:37

GoogleCodeExporter commented 8 years ago
It expects a saved timeline file which is json

http://webpagetest-code-review.appspot.com/108001/

Original comment by gabr...@gpeal.com on 20 Dec 2012 at 9:39