{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/comments/40242713","id":40242713,"diff_hunk":"@@ -125,7 +122,22 @@ def _extract_main_histograms(state, histograms, is_child):\n     if type(histograms) != dict:\n         return\n \n+    # Deal with USE_COUNTER2_ histograms, see Bug 1204994\n+    pages_destroyed = histograms.get(\"TOP_LEVEL_CONTENT_DOCUMENTS_DESTROYED\", {}).get(\"sum\", -1)\n+    docs_destroyed = histograms.get(\"CONTENT_DOCUMENTS_DESTROYED\", {}).get(\"sum\", -1)\n+\n     for histogram_name, histogram in histograms.iteritems():\n+        if pages_destroyed >= 0 and histogram_name.startswith(\"USE_COUNTER2_\") and histogram_name.endswith(\"_PAGE\"):\n+            used = histogram.get(\"values\", {}).get(\"1\", -1)\n+            if used <= 0:\n+                continue\n+            histogram[\"values\"][\"0\"] = pages_destroyed - used","path":"mozaggregator/aggregator.py","position":23,"original_position":23,"commit_id":"526ea9e18f0bf41e7e8d57bcd3e0356fff7d3c3e","original_commit_id":"526ea9e18f0bf41e7e8d57bcd3e0356fff7d3c3e","user":{"login":"mreid-moz","id":969479,"avatar_url":"https://avatars.githubusercontent.com/u/969479?v=3","gravatar_id":"","url":"https://api.github.com/users/mreid-moz","html_url":"https://github.com/mreid-moz","followers_url":"https://api.github.com/users/mreid-moz/followers","following_url":"https://api.github.com/users/mreid-moz/following{/other_user}","gists_url":"https://api.github.com/users/mreid-moz/gists{/gist_id}","starred_url":"https://api.github.com/users/mreid-moz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreid-moz/subscriptions","organizations_url":"https://api.github.com/users/mreid-moz/orgs","repos_url":"https://api.github.com/users/mreid-moz/repos","events_url":"https://api.github.com/users/mreid-moz/events{/privacy}","received_events_url":"https://api.github.com/users/mreid-moz/received_events","type":"User","site_admin":false},"body":"So `histogram[\"values\"][\"1\"]` will be the count of pages in which the feature was used and `histogram[\"values\"][\"0\"]` will be the count of pages where it was *not* used?","created_at":"2015-09-23T18:55:39Z","updated_at":"2015-09-23T18:55:39Z","html_url":"https://github.com/mozilla/python_mozaggregator/pull/4#discussion_r40242713","pull_request_url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/comments/40242713"},"html":{"href":"https://github.com/mozilla/python_mozaggregator/pull/4#discussion_r40242713"},"pull_request":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4","id":45804908,"html_url":"https://github.com/mozilla/python_mozaggregator/pull/4","diff_url":"https://github.com/mozilla/python_mozaggregator/pull/4.diff","patch_url":"https://github.com/mozilla/python_mozaggregator/pull/4.patch","issue_url":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/4","number":4,"state":"open","locked":false,"title":"Add support for USE_COUNTER2_* histograms.","user":{"login":"vitillo","id":2061747,"avatar_url":"https://avatars.githubusercontent.com/u/2061747?v=3","gravatar_id":"","url":"https://api.github.com/users/vitillo","html_url":"https://github.com/vitillo","followers_url":"https://api.github.com/users/vitillo/followers","following_url":"https://api.github.com/users/vitillo/following{/other_user}","gists_url":"https://api.github.com/users/vitillo/gists{/gist_id}","starred_url":"https://api.github.com/users/vitillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitillo/subscriptions","organizations_url":"https://api.github.com/users/vitillo/orgs","repos_url":"https://api.github.com/users/vitillo/repos","events_url":"https://api.github.com/users/vitillo/events{/privacy}","received_events_url":"https://api.github.com/users/vitillo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-23T17:06:30Z","updated_at":"2015-09-23T18:55:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"571eb6c382e4046dce5d351d6f5f277c8c97181e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4/commits","review_comments_url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4/comments","review_comment_url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/4/comments","statuses_url":"https://api.github.com/repos/mozilla/python_mozaggregator/statuses/526ea9e18f0bf41e7e8d57bcd3e0356fff7d3c3e","head":{"label":"vitillo:master","ref":"master","sha":"526ea9e18f0bf41e7e8d57bcd3e0356fff7d3c3e","user":{"login":"vitillo","id":2061747,"avatar_url":"https://avatars.githubusercontent.com/u/2061747?v=3","gravatar_id":"","url":"https://api.github.com/users/vitillo","html_url":"https://github.com/vitillo","followers_url":"https://api.github.com/users/vitillo/followers","following_url":"https://api.github.com/users/vitillo/following{/other_user}","gists_url":"https://api.github.com/users/vitillo/gists{/gist_id}","starred_url":"https://api.github.com/users/vitillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitillo/subscriptions","organizations_url":"https://api.github.com/users/vitillo/orgs","repos_url":"https://api.github.com/users/vitillo/repos","events_url":"https://api.github.com/users/vitillo/events{/privacy}","received_events_url":"https://api.github.com/users/vitillo/received_events","type":"User","site_admin":false},"repo":{"id":41161470,"name":"python_mozaggregator","full_name":"vitillo/python_mozaggregator","owner":{"login":"vitillo","id":2061747,"avatar_url":"https://avatars.githubusercontent.com/u/2061747?v=3","gravatar_id":"","url":"https://api.github.com/users/vitillo","html_url":"https://github.com/vitillo","followers_url":"https://api.github.com/users/vitillo/followers","following_url":"https://api.github.com/users/vitillo/following{/other_user}","gists_url":"https://api.github.com/users/vitillo/gists{/gist_id}","starred_url":"https://api.github.com/users/vitillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitillo/subscriptions","organizations_url":"https://api.github.com/users/vitillo/orgs","repos_url":"https://api.github.com/users/vitillo/repos","events_url":"https://api.github.com/users/vitillo/events{/privacy}","received_events_url":"https://api.github.com/users/vitillo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vitillo/python_mozaggregator","description":"Aggregator job for Telemetry.","fork":true,"url":"https://api.github.com/repos/vitillo/python_mozaggregator","forks_url":"https://api.github.com/repos/vitillo/python_mozaggregator/forks","keys_url":"https://api.github.com/repos/vitillo/python_mozaggregator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitillo/python_mozaggregator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitillo/python_mozaggregator/teams","hooks_url":"https://api.github.com/repos/vitillo/python_mozaggregator/hooks","issue_events_url":"https://api.github.com/repos/vitillo/python_mozaggregator/issues/events{/number}","events_url":"https://api.github.com/repos/vitillo/python_mozaggregator/events","assignees_url":"https://api.github.com/repos/vitillo/python_mozaggregator/assignees{/user}","branches_url":"https://api.github.com/repos/vitillo/python_mozaggregator/branches{/branch}","tags_url":"https://api.github.com/repos/vitillo/python_mozaggregator/tags","blobs_url":"https://api.github.com/repos/vitillo/python_mozaggregator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitillo/python_mozaggregator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitillo/python_mozaggregator/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitillo/python_mozaggregator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitillo/python_mozaggregator/statuses/{sha}","languages_url":"https://api.github.com/repos/vitillo/python_mozaggregator/languages","stargazers_url":"https://api.github.com/repos/vitillo/python_mozaggregator/stargazers","contributors_url":"https://api.github.com/repos/vitillo/python_mozaggregator/contributors","subscribers_url":"https://api.github.com/repos/vitillo/python_mozaggregator/subscribers","subscription_url":"https://api.github.com/repos/vitillo/python_mozaggregator/subscription","commits_url":"https://api.github.com/repos/vitillo/python_mozaggregator/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitillo/python_mozaggregator/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitillo/python_mozaggregator/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitillo/python_mozaggregator/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitillo/python_mozaggregator/contents/{+path}","compare_url":"https://api.github.com/repos/vitillo/python_mozaggregator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitillo/python_mozaggregator/merges","archive_url":"https://api.github.com/repos/vitillo/python_mozaggregator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitillo/python_mozaggregator/downloads","issues_url":"https://api.github.com/repos/vitillo/python_mozaggregator/issues{/number}","pulls_url":"https://api.github.com/repos/vitillo/python_mozaggregator/pulls{/number}","milestones_url":"https://api.github.com/repos/vitillo/python_mozaggregator/milestones{/number}","notifications_url":"https://api.github.com/repos/vitillo/python_mozaggregator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitillo/python_mozaggregator/labels{/name}","releases_url":"https://api.github.com/repos/vitillo/python_mozaggregator/releases{/id}","created_at":"2015-08-21T14:52:12Z","updated_at":"2015-08-21T14:52:12Z","pushed_at":"2015-09-23T18:49:53Z","git_url":"git://github.com/vitillo/python_mozaggregator.git","ssh_url":"git@github.com:vitillo/python_mozaggregator.git","clone_url":"https://github.com/vitillo/python_mozaggregator.git","svn_url":"https://github.com/vitillo/python_mozaggregator","homepage":null,"size":236,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mozilla:master","ref":"master","sha":"66045a10a8ad7a53a886d7b7ca222c9b7dae8b74","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":36069380,"name":"python_mozaggregator","full_name":"mozilla/python_mozaggregator","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/python_mozaggregator","description":"Aggregator job for Telemetry.","fork":false,"url":"https://api.github.com/repos/mozilla/python_mozaggregator","forks_url":"https://api.github.com/repos/mozilla/python_mozaggregator/forks","keys_url":"https://api.github.com/repos/mozilla/python_mozaggregator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/python_mozaggregator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/python_mozaggregator/teams","hooks_url":"https://api.github.com/repos/mozilla/python_mozaggregator/hooks","issue_events_url":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/python_mozaggregator/events","assignees_url":"https://api.github.com/repos/mozilla/python_mozaggregator/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/python_mozaggregator/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/python_mozaggregator/tags","blobs_url":"https://api.github.com/repos/mozilla/python_mozaggregator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/python_mozaggregator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/python_mozaggregator/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/python_mozaggregator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/python_mozaggregator/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/python_mozaggregator/languages","stargazers_url":"https://api.github.com/repos/mozilla/python_mozaggregator/stargazers","contributors_url":"https://api.github.com/repos/mozilla/python_mozaggregator/contributors","subscribers_url":"https://api.github.com/repos/mozilla/python_mozaggregator/subscribers","subscription_url":"https://api.github.com/repos/mozilla/python_mozaggregator/subscription","commits_url":"https://api.github.com/repos/mozilla/python_mozaggregator/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/python_mozaggregator/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/python_mozaggregator/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/python_mozaggregator/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/python_mozaggregator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/python_mozaggregator/merges","archive_url":"https://api.github.com/repos/mozilla/python_mozaggregator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/python_mozaggregator/downloads","issues_url":"https://api.github.com/repos/mozilla/python_mozaggregator/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/python_mozaggregator/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/python_mozaggregator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/python_mozaggregator/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/python_mozaggregator/releases{/id}","created_at":"2015-05-22T11:44:19Z","updated_at":"2015-08-21T14:51:10Z","pushed_at":"2015-09-23T18:49:54Z","git_url":"git://github.com/mozilla/python_mozaggregator.git","ssh_url":"git@github.com:mozilla/python_mozaggregator.git","clone_url":"https://github.com/mozilla/python_mozaggregator.git","svn_url":"https://github.com/mozilla/python_mozaggregator","homepage":null,"size":475,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4"},"html":{"href":"https://github.com/mozilla/python_mozaggregator/pull/4"},"issue":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/4"},"comments":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/python_mozaggregator/statuses/526ea9e18f0bf41e7e8d57bcd3e0356fff7d3c3e"}}}}