{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/107672161","pull_request_review_id":28657452,"id":107672161,"diff_hunk":"@@ -55,104 +72,107 @@ def calc_t(w1, w2, weight_fn=None):\n     return delta_s / (((s1['variance'] / s1['n']) + (s2['variance'] / s2['n'])) ** 0.5)\n \n \n-class Datum(object):\n-    def __init__(self, push_timestamp, value, testrun_timestamp=None,\n-                 testrun_id=None, revision_id=None, state='good'):\n+class RevisionDatum(object):\n+    '''\n+    This class represents a specific revision and the set of values for it\n+    '''\n+    def __init__(self, push_timestamp, push_id, values):\n+\n         # Date code was pushed\n         self.push_timestamp = push_timestamp\n-        # Value of this point\n-        self.value = value\n \n-        # Which test run was this\n-        self.testrun_id = testrun_id\n-        # What revision this data is for\n-        self.revision_id = revision_id\n+        # What revision this data is for (usually, but not guaranteed\n+        # to be increasing with push_timestamp)\n+        self.push_id = push_id\n+\n+        # data values associated with this revision\n+        self.values = copy.copy(values)\n \n         # t-test score\n         self.t = 0\n+\n         # Whether a perf regression is found\n-        self.state = state\n+        self.state = 'good'","path":"treeherder/perfalert/perfalert/__init__.py","position":87,"original_position":87,"commit_id":"dfbc67288125123854783c283665451f84c255c1","original_commit_id":"dfbc67288125123854783c283665451f84c255c1","user":{"login":"wlach","id":20569,"avatar_url":"https://avatars0.githubusercontent.com/u/20569?v=3","gravatar_id":"","url":"https://api.github.com/users/wlach","html_url":"https://github.com/wlach","followers_url":"https://api.github.com/users/wlach/followers","following_url":"https://api.github.com/users/wlach/following{/other_user}","gists_url":"https://api.github.com/users/wlach/gists{/gist_id}","starred_url":"https://api.github.com/users/wlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlach/subscriptions","organizations_url":"https://api.github.com/users/wlach/orgs","repos_url":"https://api.github.com/users/wlach/repos","events_url":"https://api.github.com/users/wlach/events{/privacy}","received_events_url":"https://api.github.com/users/wlach/received_events","type":"User","site_admin":false},"body":"Silly legacy from old perf regression code. I'll just change this to a boolean called `change_detected`, which should be much easier to understand.","created_at":"2017-03-23T13:50:44Z","updated_at":"2017-03-23T13:50:44Z","html_url":"https://github.com/mozilla/treeherder/pull/2284#discussion_r107672161","pull_request_url":"https://api.github.com/repos/mozilla/treeherder/pulls/2284","_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/107672161"},"html":{"href":"https://github.com/mozilla/treeherder/pull/2284#discussion_r107672161"},"pull_request":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/2284"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/2284","id":112122476,"html_url":"https://github.com/mozilla/treeherder/pull/2284","diff_url":"https://github.com/mozilla/treeherder/pull/2284.diff","patch_url":"https://github.com/mozilla/treeherder/pull/2284.patch","issue_url":"https://api.github.com/repos/mozilla/treeherder/issues/2284","number":2284,"state":"open","locked":false,"title":"Bug 1344358 - Make perf regression detection work better w/ retriggers","user":{"login":"wlach","id":20569,"avatar_url":"https://avatars0.githubusercontent.com/u/20569?v=3","gravatar_id":"","url":"https://api.github.com/users/wlach","html_url":"https://github.com/wlach","followers_url":"https://api.github.com/users/wlach/followers","following_url":"https://api.github.com/users/wlach/following{/other_user}","gists_url":"https://api.github.com/users/wlach/gists{/gist_id}","starred_url":"https://api.github.com/users/wlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlach/subscriptions","organizations_url":"https://api.github.com/users/wlach/orgs","repos_url":"https://api.github.com/users/wlach/repos","events_url":"https://api.github.com/users/wlach/events{/privacy}","received_events_url":"https://api.github.com/users/wlach/received_events","type":"User","site_admin":false},"body":"Retriggering performance jobs to generate better performance numbers\r\nis becoming increasingly common, but our old regression detection\r\ncode didn't really account for that case -- in particular, it\r\nhad a bug that would allow for a regression to be generated *inside*\r\nthe data for a particular revision (if there were enough).\r\n\r\nThis commit fixes that bug and also changes the behaviour of the\r\nlinear weighting function so that retriggers on a particular revision\r\nwill be weighted the same (rather than declining in importance)\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/mozilla/treeherder/2284)\n<!-- Reviewable:end -->\n","created_at":"2017-03-22T22:11:46Z","updated_at":"2017-03-23T13:50:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a1b8d49ed7b9440cc4d6539eafab79804233990","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/treeherder/pulls/2284/commits","review_comments_url":"https://api.github.com/repos/mozilla/treeherder/pulls/2284/comments","review_comment_url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/treeherder/issues/2284/comments","statuses_url":"https://api.github.com/repos/mozilla/treeherder/statuses/dfbc67288125123854783c283665451f84c255c1","head":{"label":"wlach:1344358","ref":"1344358","sha":"dfbc67288125123854783c283665451f84c255c1","user":{"login":"wlach","id":20569,"avatar_url":"https://avatars0.githubusercontent.com/u/20569?v=3","gravatar_id":"","url":"https://api.github.com/users/wlach","html_url":"https://github.com/wlach","followers_url":"https://api.github.com/users/wlach/followers","following_url":"https://api.github.com/users/wlach/following{/other_user}","gists_url":"https://api.github.com/users/wlach/gists{/gist_id}","starred_url":"https://api.github.com/users/wlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlach/subscriptions","organizations_url":"https://api.github.com/users/wlach/orgs","repos_url":"https://api.github.com/users/wlach/repos","events_url":"https://api.github.com/users/wlach/events{/privacy}","received_events_url":"https://api.github.com/users/wlach/received_events","type":"User","site_admin":false},"repo":{"id":25893449,"name":"treeherder","full_name":"wlach/treeherder","owner":{"login":"wlach","id":20569,"avatar_url":"https://avatars0.githubusercontent.com/u/20569?v=3","gravatar_id":"","url":"https://api.github.com/users/wlach","html_url":"https://github.com/wlach","followers_url":"https://api.github.com/users/wlach/followers","following_url":"https://api.github.com/users/wlach/following{/other_user}","gists_url":"https://api.github.com/users/wlach/gists{/gist_id}","starred_url":"https://api.github.com/users/wlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlach/subscriptions","organizations_url":"https://api.github.com/users/wlach/orgs","repos_url":"https://api.github.com/users/wlach/repos","events_url":"https://api.github.com/users/wlach/events{/privacy}","received_events_url":"https://api.github.com/users/wlach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wlach/treeherder","description":"The backend of treeherder, a replacement for TBPL. See wiki page for where to file bugs.","fork":true,"url":"https://api.github.com/repos/wlach/treeherder","forks_url":"https://api.github.com/repos/wlach/treeherder/forks","keys_url":"https://api.github.com/repos/wlach/treeherder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wlach/treeherder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wlach/treeherder/teams","hooks_url":"https://api.github.com/repos/wlach/treeherder/hooks","issue_events_url":"https://api.github.com/repos/wlach/treeherder/issues/events{/number}","events_url":"https://api.github.com/repos/wlach/treeherder/events","assignees_url":"https://api.github.com/repos/wlach/treeherder/assignees{/user}","branches_url":"https://api.github.com/repos/wlach/treeherder/branches{/branch}","tags_url":"https://api.github.com/repos/wlach/treeherder/tags","blobs_url":"https://api.github.com/repos/wlach/treeherder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wlach/treeherder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wlach/treeherder/git/refs{/sha}","trees_url":"https://api.github.com/repos/wlach/treeherder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wlach/treeherder/statuses/{sha}","languages_url":"https://api.github.com/repos/wlach/treeherder/languages","stargazers_url":"https://api.github.com/repos/wlach/treeherder/stargazers","contributors_url":"https://api.github.com/repos/wlach/treeherder/contributors","subscribers_url":"https://api.github.com/repos/wlach/treeherder/subscribers","subscription_url":"https://api.github.com/repos/wlach/treeherder/subscription","commits_url":"https://api.github.com/repos/wlach/treeherder/commits{/sha}","git_commits_url":"https://api.github.com/repos/wlach/treeherder/git/commits{/sha}","comments_url":"https://api.github.com/repos/wlach/treeherder/comments{/number}","issue_comment_url":"https://api.github.com/repos/wlach/treeherder/issues/comments{/number}","contents_url":"https://api.github.com/repos/wlach/treeherder/contents/{+path}","compare_url":"https://api.github.com/repos/wlach/treeherder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wlach/treeherder/merges","archive_url":"https://api.github.com/repos/wlach/treeherder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wlach/treeherder/downloads","issues_url":"https://api.github.com/repos/wlach/treeherder/issues{/number}","pulls_url":"https://api.github.com/repos/wlach/treeherder/pulls{/number}","milestones_url":"https://api.github.com/repos/wlach/treeherder/milestones{/number}","notifications_url":"https://api.github.com/repos/wlach/treeherder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wlach/treeherder/labels{/name}","releases_url":"https://api.github.com/repos/wlach/treeherder/releases{/id}","deployments_url":"https://api.github.com/repos/wlach/treeherder/deployments","created_at":"2014-10-28T22:37:53Z","updated_at":"2016-04-04T15:14:01Z","pushed_at":"2017-03-22T22:10:34Z","git_url":"git://github.com/wlach/treeherder.git","ssh_url":"git@github.com:wlach/treeherder.git","clone_url":"https://github.com/wlach/treeherder.git","svn_url":"https://github.com/wlach/treeherder","homepage":"https://wiki.mozilla.org/Auto-tools/Projects/Treeherder","size":54699,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"db52abfdac4d411e2d9a55836be8c23a8ddd9713","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars1.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":8463294,"name":"treeherder","full_name":"mozilla/treeherder","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars1.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/treeherder","description":"A system for managing CI data for Mozilla projects","fork":false,"url":"https://api.github.com/repos/mozilla/treeherder","forks_url":"https://api.github.com/repos/mozilla/treeherder/forks","keys_url":"https://api.github.com/repos/mozilla/treeherder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/treeherder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/treeherder/teams","hooks_url":"https://api.github.com/repos/mozilla/treeherder/hooks","issue_events_url":"https://api.github.com/repos/mozilla/treeherder/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/treeherder/events","assignees_url":"https://api.github.com/repos/mozilla/treeherder/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/treeherder/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/treeherder/tags","blobs_url":"https://api.github.com/repos/mozilla/treeherder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/treeherder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/treeherder/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/treeherder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/treeherder/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/treeherder/languages","stargazers_url":"https://api.github.com/repos/mozilla/treeherder/stargazers","contributors_url":"https://api.github.com/repos/mozilla/treeherder/contributors","subscribers_url":"https://api.github.com/repos/mozilla/treeherder/subscribers","subscription_url":"https://api.github.com/repos/mozilla/treeherder/subscription","commits_url":"https://api.github.com/repos/mozilla/treeherder/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/treeherder/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/treeherder/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/treeherder/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/treeherder/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/treeherder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/treeherder/merges","archive_url":"https://api.github.com/repos/mozilla/treeherder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/treeherder/downloads","issues_url":"https://api.github.com/repos/mozilla/treeherder/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/treeherder/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/treeherder/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/treeherder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/treeherder/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/treeherder/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/treeherder/deployments","created_at":"2013-02-27T19:17:37Z","updated_at":"2017-03-19T19:12:12Z","pushed_at":"2017-03-23T13:42:00Z","git_url":"git://github.com/mozilla/treeherder.git","ssh_url":"git@github.com:mozilla/treeherder.git","clone_url":"https://github.com/mozilla/treeherder.git","svn_url":"https://github.com/mozilla/treeherder","homepage":"https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder","size":72027,"stargazers_count":80,"watchers_count":80,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":27,"forks":137,"open_issues":27,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/2284"},"html":{"href":"https://github.com/mozilla/treeherder/pull/2284"},"issue":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/2284"},"comments":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/2284/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/2284/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/2284/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/treeherder/statuses/dfbc67288125123854783c283665451f84c255c1"}}}}
{"actor":{"display_login":"wlach"}}