{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62745576","id":62745576,"diff_hunk":"@@ -0,0 +1,124 @@\n+/**\n+ * @license\n+ * Copyright 2016 Google Inc. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+'use strict';\n+\n+const Audit = require('../audit');\n+\n+/* global window */\n+window.global = window;\n+\n+// we need gl-matrix and jszip for traceviewer\n+// since it has internal forks for isNode and they get mixed up during\n+// browserify, we require them locally here and global-ize them.\n+// from catapult/tracing/tracing/base/math.html\n+var glMatrixModule = require('gl-matrix');","path":"src/audits/performance/input-readiness-metric.js","position":29,"original_position":29,"commit_id":"347a9d3bb3954c0b808f883db02ba5bd9691692b","original_commit_id":"347a9d3bb3954c0b808f883db02ba5bd9691692b","user":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"body":"Can we shove all this into some other place and keep the funkiness out of the audit as much as possible?","created_at":"2016-05-10T20:26:44Z","updated_at":"2016-05-10T20:26:44Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/309#discussion_r62745576","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62745576"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/309#discussion_r62745576"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309","id":69430185,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/309","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/309.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/309.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/309","number":309,"state":"open","locked":false,"title":"Traceviewer conversion script + Input Readiness metric","user":{"login":"paulirish","id":39191,"avatar_url":"https://avatars.githubusercontent.com/u/39191?v=3","gravatar_id":"","url":"https://api.github.com/users/paulirish","html_url":"https://github.com/paulirish","followers_url":"https://api.github.com/users/paulirish/followers","following_url":"https://api.github.com/users/paulirish/following{/other_user}","gists_url":"https://api.github.com/users/paulirish/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirish/subscriptions","organizations_url":"https://api.github.com/users/paulirish/orgs","repos_url":"https://api.github.com/users/paulirish/repos","events_url":"https://api.github.com/users/paulirish/events{/privacy}","received_events_url":"https://api.github.com/users/paulirish/received_events","type":"User","site_admin":false},"body":"In this PR we have two items:\r\n\r\n### Transform traceviewer source into consumable node module\r\n\r\n* The PR builds on what @paullewis  did in #308\r\n* Rationale: using the node_boostrap/vinn pipeline for traceviewer is a real hairball when it comes to browserifying. this simplifies a lot of concerns\r\n* Updating to latest traceviewer source is manual. Added instructions to the readme.\r\n* The transformed source is kept in `third_party/`. It spoils the diff of this PR, but it will be more maintainable in the long-run.\r\n\r\n### Add the input readiness metric \r\n\r\n* Originally started in PR #284\r\n\r\nResults of `lighthouse https://busrouter.sg/` (which is one of the busier PWAs):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/39191/15156020/fb86982a-1699-11e6-8269-f953702bfe3d.png)\r\n\r\nResults of metric in the extension (via new browserified pipeline):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/39191/15160132/132f9270-16ad-11e6-9993-9550e497fe62.png)\r\n\r\n-------------------------------\r\n\r\n_Tip to reviewers:_ Sorry about the large diff. The third_party files are at the end of the diff, so one you see them you can be done.\r\n\r\nAlso, this branch is on the origin repo. Commits appreciated, as it might be faster than the typical review cycle.","created_at":"2016-05-09T23:58:21Z","updated_at":"2016-05-10T20:26:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b15322566a36679d0d759a52278bffd18742fdc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/309/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/347a9d3bb3954c0b808f883db02ba5bd9691692b","head":{"label":"GoogleChrome:paullewis-converter","ref":"paullewis-converter","sha":"347a9d3bb3954c0b808f883db02ba5bd9691692b","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-05-07T07:18:30Z","pushed_at":"2016-05-10T20:22:59Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":null,"size":6181,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":36,"forks":16,"open_issues":36,"watchers":90,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"1a7c69a6716c05638ff5b68edad25c13a5fd45b9","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-05-07T07:18:30Z","pushed_at":"2016-05-10T20:22:59Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":null,"size":6181,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":36,"forks":16,"open_issues":36,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/309"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/309"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/347a9d3bb3954c0b808f883db02ba5bd9691692b"}}}}