-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement HTTP Archive output #4004
Comments
Also for pageload speed regression tests??? |
I'm interested in working on this. I should be able to do the file format part myself easily, but may need a hand plugging it into Servo itself. Will bump when I have some progress made (a few days). |
Excellent! I expect the bits you'll want to be looking into reside in ScriptTask::load, as well as the various places we send Load messages to the resource task. #3714 would probably make it easier to tie all of those together, but I'm having trouble getting ahold of someone to review it for me. |
IMO we should prioritize implementing gzip/compress (and parallel network fetches) before thinking of comparison with other browsers (without these two there isn't much point of comparing), but if someone wants to work on it that's great 😄 |
As I pointed out, this can be used to compare runs of Servo against itself too. I think there's lots of value we can derive from this. |
Oh, right :) |
Mini-status updateI did some work on the serializer bit. I'd appreciate general feedback on style/design if anyone has the time, as I'm pretty new to the language. Notes:
Right now, I'd like to know:
My next step is to take a look at what it means to actually pull the relevant data out of Servo. I'll likely poke this comment thread in about a week with my findings there. Then, if my understanding is sufficient, I'll get to it. Thanks for bearing with me, since I'm new to Servo and Rust in general. |
I personally would prefer a separate repository if HAR is something other applications may end up using too. If not,
Good question 😄 rust-chrono might help here. |
@znewman01 I have no problem with using Rust strings for the dates. With regards to where to put it, I'd be inclined to make a rust-har repository and use it in Servo via Cargo. It will make building and testing it easier for you, and it looks like you've put together a decent set of structural primitives so far. For fields like on_content_load, it might be nice to have an enum of TimedContent(uint) or NotApplicable (which translates to -1 when serialized). |
Great! I've created the repository rust-har and implemented those suggestions. Now onto integration with Servo. I'll probably have some questions about that. Expect another check-in once I've taken a crack at it. |
I've taken a look at this (was hoping #3714 would have landed by now, so I was putting it off 😄 ) and I think I understand where at what point in the code all of the timings happen. First, I have a question about ScriptTask objects: am I correct in thinking that there is only one ScriptTask object, and that it loads every page? I'd like to know what you think the best way to hook the HAR objects into all of this is. The easiest way I can think of would be to attach a har::Log to the ScriptTask and update its timings every time a page is loaded. But this would complicate things when we're trying to hook network timing information in. The other option that comes to mind is attaching some sort of HAR channel or something and feeding it timing information, similar to the TimeProfilerChan. But then retrieval of the HAR would be strange. Do y'all have thoughts? I'm just starting to get a sense of how Servo is structured. |
To answer the immediate question, there is one ScriptTask object per origin, more or less. That means that a page that contains a cross-origin iframe would cause two separate ScriptTasks to be created. If a link was clicked that navigated to a different origin, a third ScriptTask would be created. |
It may make the most sense to make the Constellation own the HAR. That can be thought of as a tab, basically, and it knows how to talk to the various script tasks (in history and currently active), and they to it. |
Maybe a ScriptTask or a Page could be in charge of the timings for a particular page, and then send the collected data to the Constellation when it's finished? |
ACK, that makes perfect sense to me. I'll prototype something along those
|
Progress report (no major questions at the time, but as always feedback is welcome): I've taken a preliminary stab at this on the branch Some notes:
My plan for now is to implement the Entries (networking) portion of HAR I'll take care of other stuff (like style issues, and |
RE: the Hyper issue, I see hyperium/hyper#56 which seems relevant. So maybe if I get to that point and it's not resolved, I'll take a crack at that. |
With regards to your last point, maybe we can add a command line argument which writes all HAR data out before closing? The rest of the things you mentioned all sound reasonable to me. Thanks so much for tackling all this open-ended stuff! |
I am a windows user. I am getting an error when building servo. I installed visual studio build tools. I launched the x86_x64 Cross Tools Command Prompt for VS 2017. I changed the directory to servo and when executing the command "python mach build -d". I am getting the error "Cannot run mach in a path with spaces.". Please help me with this issue |
@BhanuSreekarReddy That sounds like you're trying to run mach in a path with spaces. Can you move your servo directory into a path that doesn't contain spaces? |
Okay will try that thanks for your reply |
Well That Suggestion was helpful in running the build but failed to build for the following error: error: failed to parse manifest at Caused by: Caused by: |
There's no line 33 in https://github.com/servo/servo/blob/master/components/net_traits/Cargo.toml. Does |
Ohh our bad ..one of my teammate added a line which was the reason for that I removed the line and executed that but still getting an another error error: linking with error: aborting due to previous error error: Could not compile |
@BhanuSreekarReddy Could you copy the entire output into a new gist? |
This was the entire output C:\Users\Bhanu\MozillaProjectMine\servo>python mach build -d = note: msvcrt.lib(chkstk.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64' error: aborting due to previous error error: aborting due to previous error error: Could not compile |
@BhanuSreekarReddy Are you using 32 bit windows? If so, that's not a configuration that we support. It may be easier for you to use an online build environment instead: https://janitor.technology/ |
I am using 64-bit windows but thanks for the alternative suggestion will try that. |
Spec: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HAR/Overview.html
Viewer: https://github.com/janodvarko/harviewer
"This specification defines an archival format for HTTP transactions that can be used by a web browser to export detailed performance data about web pages it loads. "
This could be useful for pageload comparisons between Servo and other browsers.
The text was updated successfully, but these errors were encountered: