-
Notifications
You must be signed in to change notification settings - Fork 22
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
Timings may be expressed as numbers, not just integers #2
Comments
Yes, if you change the schemas, that will fix validation (which is what I assume you're after). |
Actually, the schema is also found in the bundled har viewer (lib/har/viewer/scripts/preview/harSchema.js). That's probably where I got the schemas used in the Ruby code originally. Perhaps it's better to get the latest viewer from http://code.google.com/p/harviewer/ and re-extract the schema from there - assuming the viewer has the correct schema of course. |
I had just come to the same conclusion. :) I'll take a look today. On Tuesday, January 21, 2014, Jari Bakken notifications@github.com wrote:
|
Did you convert the harviewer PHP to HTML by hand? It seems that there's next to no actual PHP in them, merely including the Google Analytics script, so it may be safe enough to simply treat them as HTML or strip out the PHP "tags". What are your thoughts? |
I don't recall there being PHP in the viewer code, but if it's for GA, let's strip them out. |
Sounds good. |
The edge version of harviewer has the same issue, and I've opened a ticket there. I've got an as-yet-uncommitted thor task that grabs the most recent harviewer master (via Bower), strips the PHP and renames files to HTML, then copies the whole shebang to vendor/viewer. Because this has uncertain benefit, and it changes the behavior of the gem by no longer including the harviewer dependency code, I'm not sure if a pull request would be welcome. I'll probably commit and push to my fork tomorrow if you'd like to take a look. |
Sure, ping me when you've pushed (or just submit the PR) and I'll take a look. |
Here's the branch with the changes - I don't want to do a pull request, because I don't think Bower is actually appropriate, upon reflection. https://github.com/michaek/har/tree/feature/bower_dependency |
Gotcha. I like the idea of making it easy to update the viewer though. |
I made a note in that branch's Readme about what I think a better design would be for allowing easier updates. It seems like the ideal way to handle it would be to simply change a gem depencency: |
I suppose it's more conventional to name it ruby_harviewer. :) |
Yeah, that would work. It seems a bit overkill to me though, having two gems for such a small utility. |
harviewer has just fixed this in 2.0.16 janodvarko/harviewer#7 |
I've just pushed a 0.1.0 gem with harviewer updated to 2.0.16. I'm still seeing problems with Chrome-generated hars though: I've opened a Chromium bug for this. |
It seems that the HTTP Archive spec doesn't require that timings be integers, just "numbers". The reason this seems worth mentioning is that Chrome's "copy to har" creates a HAR with timings expressed as floating point numbers, and it seems worthwhile to support the format. Would this just be a matter of changing the jschematic schemas?
The text was updated successfully, but these errors were encountered: