{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/66634477","id":66634477,"diff_hunk":"@@ -89,77 +89,69 @@ def __repr__(self):\n                                                  self.t, self.state)\n \n \n-class Analyzer:\n-    def __init__(self):\n-        self.data = []  # List of PerfDatum instances\n-\n-    def add_data(self, push_timestamp, value, **kwargs):\n-        self.data.append(Datum(push_timestamp, value, **kwargs))\n-        self.data.sort()\n-\n-    def analyze_t(self, min_back_window=12, max_back_window=24,\n-                  fore_window=12, t_threshold=7):\n-        # Use T-Tests\n-        # Analyze test data using T-Tests, comparing data[i-j:i] to data[i:i+k]\n-        (j, k) = (min_back_window, fore_window)\n-        good_data = []\n-\n-        num_points = len(self.data) - k + 1\n-        last_seen_regression = 0\n-        for i in range(num_points):\n-            di = self.data[i]\n-            # if we haven't seen something that looks like a change in a\n-            # while, incorporate some extra historical data into our t-test\n-            # calculation\n-            if last_seen_regression > min_back_window:\n-                additional_back_window = min(last_seen_regression,\n-                                             max_back_window - min_back_window)\n+def detect_changes(data=[], min_back_window=12, max_back_window=24, ","path":"treeherder/perfalert/perfalert/__init__.py","position":29,"original_position":29,"commit_id":"671729f52791be4acff9fb75bf0ddf1cc8f0f6e5","original_commit_id":"671729f52791be4acff9fb75bf0ddf1cc8f0f6e5","user":{"login":"wlach","id":20569,"avatar_url":"https://avatars.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":"data shouldn't be a kwargs, as it doesn't make sense to call this function without it. just write this as detect_changes(data, ...)","created_at":"2016-06-10T15:37:24Z","updated_at":"2016-06-10T15:37:24Z","html_url":"https://github.com/mozilla/treeherder/pull/1581#discussion_r66634477","pull_request_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1581","_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/66634477"},"html":{"href":"https://github.com/mozilla/treeherder/pull/1581#discussion_r66634477"},"pull_request":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1581"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/1581","id":73252790,"html_url":"https://github.com/mozilla/treeherder/pull/1581","diff_url":"https://github.com/mozilla/treeherder/pull/1581.diff","patch_url":"https://github.com/mozilla/treeherder/pull/1581.patch","issue_url":"https://api.github.com/repos/mozilla/treeherder/issues/1581","number":1581,"state":"open","locked":false,"title":"Bug 1276905 - Performance alert analysis code doesn't need its own clas","user":{"login":"SJasoria","id":11815849,"avatar_url":"https://avatars.githubusercontent.com/u/11815849?v=3","gravatar_id":"","url":"https://api.github.com/users/SJasoria","html_url":"https://github.com/SJasoria","followers_url":"https://api.github.com/users/SJasoria/followers","following_url":"https://api.github.com/users/SJasoria/following{/other_user}","gists_url":"https://api.github.com/users/SJasoria/gists{/gist_id}","starred_url":"https://api.github.com/users/SJasoria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SJasoria/subscriptions","organizations_url":"https://api.github.com/users/SJasoria/orgs","repos_url":"https://api.github.com/users/SJasoria/repos","events_url":"https://api.github.com/users/SJasoria/events{/privacy}","received_events_url":"https://api.github.com/users/SJasoria/received_events","type":"User","site_admin":false},"body":"Here are initial changes to __init__.py. Will be posting changes to related files soon.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/mozilla/treeherder/1581)\n<!-- Reviewable:end -->\n","created_at":"2016-06-09T17:21:24Z","updated_at":"2016-06-10T15:37:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16b4a98094216f4513419b390fb361aa6defa3be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1581/commits","review_comments_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1581/comments","review_comment_url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/treeherder/issues/1581/comments","statuses_url":"https://api.github.com/repos/mozilla/treeherder/statuses/671729f52791be4acff9fb75bf0ddf1cc8f0f6e5","head":{"label":"SJasoria:Bug-1276905","ref":"Bug-1276905","sha":"671729f52791be4acff9fb75bf0ddf1cc8f0f6e5","user":{"login":"SJasoria","id":11815849,"avatar_url":"https://avatars.githubusercontent.com/u/11815849?v=3","gravatar_id":"","url":"https://api.github.com/users/SJasoria","html_url":"https://github.com/SJasoria","followers_url":"https://api.github.com/users/SJasoria/followers","following_url":"https://api.github.com/users/SJasoria/following{/other_user}","gists_url":"https://api.github.com/users/SJasoria/gists{/gist_id}","starred_url":"https://api.github.com/users/SJasoria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SJasoria/subscriptions","organizations_url":"https://api.github.com/users/SJasoria/orgs","repos_url":"https://api.github.com/users/SJasoria/repos","events_url":"https://api.github.com/users/SJasoria/events{/privacy}","received_events_url":"https://api.github.com/users/SJasoria/received_events","type":"User","site_admin":false},"repo":{"id":60791482,"name":"treeherder","full_name":"SJasoria/treeherder","owner":{"login":"SJasoria","id":11815849,"avatar_url":"https://avatars.githubusercontent.com/u/11815849?v=3","gravatar_id":"","url":"https://api.github.com/users/SJasoria","html_url":"https://github.com/SJasoria","followers_url":"https://api.github.com/users/SJasoria/followers","following_url":"https://api.github.com/users/SJasoria/following{/other_user}","gists_url":"https://api.github.com/users/SJasoria/gists{/gist_id}","starred_url":"https://api.github.com/users/SJasoria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SJasoria/subscriptions","organizations_url":"https://api.github.com/users/SJasoria/orgs","repos_url":"https://api.github.com/users/SJasoria/repos","events_url":"https://api.github.com/users/SJasoria/events{/privacy}","received_events_url":"https://api.github.com/users/SJasoria/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SJasoria/treeherder","description":"Dashboard & service for managing CI data for Mozilla projects","fork":true,"url":"https://api.github.com/repos/SJasoria/treeherder","forks_url":"https://api.github.com/repos/SJasoria/treeherder/forks","keys_url":"https://api.github.com/repos/SJasoria/treeherder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SJasoria/treeherder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SJasoria/treeherder/teams","hooks_url":"https://api.github.com/repos/SJasoria/treeherder/hooks","issue_events_url":"https://api.github.com/repos/SJasoria/treeherder/issues/events{/number}","events_url":"https://api.github.com/repos/SJasoria/treeherder/events","assignees_url":"https://api.github.com/repos/SJasoria/treeherder/assignees{/user}","branches_url":"https://api.github.com/repos/SJasoria/treeherder/branches{/branch}","tags_url":"https://api.github.com/repos/SJasoria/treeherder/tags","blobs_url":"https://api.github.com/repos/SJasoria/treeherder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SJasoria/treeherder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SJasoria/treeherder/git/refs{/sha}","trees_url":"https://api.github.com/repos/SJasoria/treeherder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SJasoria/treeherder/statuses/{sha}","languages_url":"https://api.github.com/repos/SJasoria/treeherder/languages","stargazers_url":"https://api.github.com/repos/SJasoria/treeherder/stargazers","contributors_url":"https://api.github.com/repos/SJasoria/treeherder/contributors","subscribers_url":"https://api.github.com/repos/SJasoria/treeherder/subscribers","subscription_url":"https://api.github.com/repos/SJasoria/treeherder/subscription","commits_url":"https://api.github.com/repos/SJasoria/treeherder/commits{/sha}","git_commits_url":"https://api.github.com/repos/SJasoria/treeherder/git/commits{/sha}","comments_url":"https://api.github.com/repos/SJasoria/treeherder/comments{/number}","issue_comment_url":"https://api.github.com/repos/SJasoria/treeherder/issues/comments{/number}","contents_url":"https://api.github.com/repos/SJasoria/treeherder/contents/{+path}","compare_url":"https://api.github.com/repos/SJasoria/treeherder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SJasoria/treeherder/merges","archive_url":"https://api.github.com/repos/SJasoria/treeherder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SJasoria/treeherder/downloads","issues_url":"https://api.github.com/repos/SJasoria/treeherder/issues{/number}","pulls_url":"https://api.github.com/repos/SJasoria/treeherder/pulls{/number}","milestones_url":"https://api.github.com/repos/SJasoria/treeherder/milestones{/number}","notifications_url":"https://api.github.com/repos/SJasoria/treeherder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SJasoria/treeherder/labels{/name}","releases_url":"https://api.github.com/repos/SJasoria/treeherder/releases{/id}","deployments_url":"https://api.github.com/repos/SJasoria/treeherder/deployments","created_at":"2016-06-09T16:57:03Z","updated_at":"2016-06-09T16:57:05Z","pushed_at":"2016-06-10T14:38:35Z","git_url":"git://github.com/SJasoria/treeherder.git","ssh_url":"git@github.com:SJasoria/treeherder.git","clone_url":"https://github.com/SJasoria/treeherder.git","svn_url":"https://github.com/SJasoria/treeherder","homepage":"https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder","size":42424,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"e824b69249d9e417b98310a1c49e4bb49b3bd7b1","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":8463294,"name":"treeherder","full_name":"mozilla/treeherder","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/treeherder","description":"Dashboard & service 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":"2016-06-07T07:36:55Z","pushed_at":"2016-06-10T14:45:44Z","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":398156,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":20,"forks":103,"open_issues":20,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1581"},"html":{"href":"https://github.com/mozilla/treeherder/pull/1581"},"issue":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/1581"},"comments":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/1581/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1581/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1581/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/treeherder/statuses/671729f52791be4acff9fb75bf0ddf1cc8f0f6e5"}}}}
{"actor":{"display_login":"wlach"}}