{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62757970","id":62757970,"diff_hunk":"@@ -0,0 +1,145 @@\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 Gather = require('./gather');\n+const log = require('../lib/log.js');\n+\n+const flatten = arr => arr.reduce((a, b) => a.concat(b), []);\n+const includes = (arr, elm) => arr.indexOf(elm) > -1;\n+\n+class Node {","path":"src/gatherers/critical-network-chains.js","position":26,"original_position":26,"commit_id":"da1da0882e5ac1b605e2a89172302685ca7ebf33","original_commit_id":"da1da0882e5ac1b605e2a89172302685ca7ebf33","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"body":"maybe something slightly more descriptive, `RequestNode` or something?","created_at":"2016-05-10T21:42:01Z","updated_at":"2016-05-10T21:42:01Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/310#discussion_r62757970","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62757970"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/310#discussion_r62757970"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310","id":69456443,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/310","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/310.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/310.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/310","number":310,"state":"open","locked":false,"title":"Get critical chains: pure js version","user":{"login":"deepanjanroy","id":3505637,"avatar_url":"https://avatars.githubusercontent.com/u/3505637?v=3","gravatar_id":"","url":"https://api.github.com/users/deepanjanroy","html_url":"https://github.com/deepanjanroy","followers_url":"https://api.github.com/users/deepanjanroy/followers","following_url":"https://api.github.com/users/deepanjanroy/following{/other_user}","gists_url":"https://api.github.com/users/deepanjanroy/gists{/gist_id}","starred_url":"https://api.github.com/users/deepanjanroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepanjanroy/subscriptions","organizations_url":"https://api.github.com/users/deepanjanroy/orgs","repos_url":"https://api.github.com/users/deepanjanroy/repos","events_url":"https://api.github.com/users/deepanjanroy/events{/privacy}","received_events_url":"https://api.github.com/users/deepanjanroy/received_events","type":"User","site_admin":false},"body":"**Summary**\r\nGetting critical request chains from dev tools initiator info instead of clovis graph. I get the same results as with clovis graph, perhaps even somewhat more stable since clovis often ran into hard to reproduce timing errors.\r\n\r\n**How to run this**\r\nThe new gatherer now runs by default, with or without flags. However, if you want to see the results of the gather you still have to use the `--use-net-dep-graph` flag. For some websites, the urls can be crazy long and they flood the cli output. I didn't want that to happen by default.\r\n\r\n**Testing**\r\nI would really appreciate input on I can test this better - the automated tests included in this PR only test the graph algorithm, not whether the initiator info is right or whether all critical requests are being captured. I ran in against some live sites and the output looked reasonable. \r\n\r\nExtension builds and runs fine.\r\n\r\n**Meta**\r\nThis is based on #300 (which is why it has unrelated python changes) but I believe this can be merged directly without merging #300 first. Sorry for the 17 commits in that case, pls squash before merging. Refs #292 \r\n\r\n**Can we delete the python code**\r\nIt's probably best to hold off on doing that until we can conclusively decide we won't be needing the clovis graph.","created_at":"2016-05-10T06:49:48Z","updated_at":"2016-05-10T21:42:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bcb68b0505d801b4dff3c80c4217a926f7194e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/310/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/da1da0882e5ac1b605e2a89172302685ca7ebf33","head":{"label":"deepanjanroy:makeclovisjsagain","ref":"makeclovisjsagain","sha":"da1da0882e5ac1b605e2a89172302685ca7ebf33","user":{"login":"deepanjanroy","id":3505637,"avatar_url":"https://avatars.githubusercontent.com/u/3505637?v=3","gravatar_id":"","url":"https://api.github.com/users/deepanjanroy","html_url":"https://github.com/deepanjanroy","followers_url":"https://api.github.com/users/deepanjanroy/followers","following_url":"https://api.github.com/users/deepanjanroy/following{/other_user}","gists_url":"https://api.github.com/users/deepanjanroy/gists{/gist_id}","starred_url":"https://api.github.com/users/deepanjanroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepanjanroy/subscriptions","organizations_url":"https://api.github.com/users/deepanjanroy/orgs","repos_url":"https://api.github.com/users/deepanjanroy/repos","events_url":"https://api.github.com/users/deepanjanroy/events{/privacy}","received_events_url":"https://api.github.com/users/deepanjanroy/received_events","type":"User","site_admin":false},"repo":{"id":55099739,"name":"lighthouse","full_name":"deepanjanroy/lighthouse","owner":{"login":"deepanjanroy","id":3505637,"avatar_url":"https://avatars.githubusercontent.com/u/3505637?v=3","gravatar_id":"","url":"https://api.github.com/users/deepanjanroy","html_url":"https://github.com/deepanjanroy","followers_url":"https://api.github.com/users/deepanjanroy/followers","following_url":"https://api.github.com/users/deepanjanroy/following{/other_user}","gists_url":"https://api.github.com/users/deepanjanroy/gists{/gist_id}","starred_url":"https://api.github.com/users/deepanjanroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepanjanroy/subscriptions","organizations_url":"https://api.github.com/users/deepanjanroy/orgs","repos_url":"https://api.github.com/users/deepanjanroy/repos","events_url":"https://api.github.com/users/deepanjanroy/events{/privacy}","received_events_url":"https://api.github.com/users/deepanjanroy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deepanjanroy/lighthouse","description":null,"fork":true,"url":"https://api.github.com/repos/deepanjanroy/lighthouse","forks_url":"https://api.github.com/repos/deepanjanroy/lighthouse/forks","keys_url":"https://api.github.com/repos/deepanjanroy/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deepanjanroy/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deepanjanroy/lighthouse/teams","hooks_url":"https://api.github.com/repos/deepanjanroy/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/deepanjanroy/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/deepanjanroy/lighthouse/events","assignees_url":"https://api.github.com/repos/deepanjanroy/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/deepanjanroy/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/deepanjanroy/lighthouse/tags","blobs_url":"https://api.github.com/repos/deepanjanroy/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deepanjanroy/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deepanjanroy/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/deepanjanroy/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deepanjanroy/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/deepanjanroy/lighthouse/languages","stargazers_url":"https://api.github.com/repos/deepanjanroy/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/deepanjanroy/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/deepanjanroy/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/deepanjanroy/lighthouse/subscription","commits_url":"https://api.github.com/repos/deepanjanroy/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/deepanjanroy/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/deepanjanroy/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/deepanjanroy/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/deepanjanroy/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/deepanjanroy/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deepanjanroy/lighthouse/merges","archive_url":"https://api.github.com/repos/deepanjanroy/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deepanjanroy/lighthouse/downloads","issues_url":"https://api.github.com/repos/deepanjanroy/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/deepanjanroy/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/deepanjanroy/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/deepanjanroy/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deepanjanroy/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/deepanjanroy/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/deepanjanroy/lighthouse/deployments","created_at":"2016-03-30T21:39:53Z","updated_at":"2016-03-30T21:39:54Z","pushed_at":"2016-05-10T21:41:02Z","git_url":"git://github.com/deepanjanroy/lighthouse.git","ssh_url":"git@github.com:deepanjanroy/lighthouse.git","clone_url":"https://github.com/deepanjanroy/lighthouse.git","svn_url":"https://github.com/deepanjanroy/lighthouse","homepage":null,"size":6267,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"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-10T21:41:02Z","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":6206,"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":34,"forks":16,"open_issues":34,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/310"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/310"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/310/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/310/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/da1da0882e5ac1b605e2a89172302685ca7ebf33"}}}}