{"action":"created","comment":{"url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/comments/178207176","pull_request_review_id":108234780,"id":178207176,"diff_hunk":"@@ -20,10 +22,12 @@ def __init__(self, url, user_id):\n         self.id = uuid.uuid4()\n         self.url = url\n         self.user_id = uuid.UUID(user_id)\n-        self.endpoints = list()\n-        self.endpoint_calls = list()  # list of unfiltered endpoint calls, for use with an aggregator.\n+        self.endpoints = []\n         self.last_fetch_time = None\n \n+        self._endpoint_calls = []  # list of unfiltered endpoint calls, for use with an aggregator.\n+        self._aggregator = Aggregator(self._endpoint_calls)","path":"pydash/pydash_app/dashboard/dashboard.py","position":19,"original_position":19,"commit_id":"2fcf380a1fb8aacbc96edf71dee06ad5e0c862db","original_commit_id":"0a650cb2784541dfc69ecec51ba8ea06d02dd2ab","user":{"login":"TWEApol","id":22008020,"avatar_url":"https://avatars0.githubusercontent.com/u/22008020?v=4","gravatar_id":"","url":"https://api.github.com/users/TWEApol","html_url":"https://github.com/TWEApol","followers_url":"https://api.github.com/users/TWEApol/followers","following_url":"https://api.github.com/users/TWEApol/following{/other_user}","gists_url":"https://api.github.com/users/TWEApol/gists{/gist_id}","starred_url":"https://api.github.com/users/TWEApol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TWEApol/subscriptions","organizations_url":"https://api.github.com/users/TWEApol/orgs","repos_url":"https://api.github.com/users/TWEApol/repos","events_url":"https://api.github.com/users/TWEApol/events{/privacy}","received_events_url":"https://api.github.com/users/TWEApol/received_events","type":"User","site_admin":false},"body":"It seems I have not looked close enough to the aggregator implementation. It seems like it should work.\r\nOne welcome change is to rename the `_aggregator.add_endpoint_call` function to something like `_aggregator.process_endpoint_addition` to avoid confusion, as it currently sounds like this method adds endpoints.","created_at":"2018-03-29T23:35:55Z","updated_at":"2018-03-29T23:35:55Z","html_url":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97#discussion_r178207176","pull_request_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/comments/178207176"},"html":{"href":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97#discussion_r178207176"},"pull_request":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97"}},"in_reply_to_id":178112806},"pull_request":{"url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97","id":178375481,"html_url":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97","diff_url":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97.diff","patch_url":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97.patch","issue_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/97","number":97,"state":"open","locked":false,"title":"Backend/data aggregation","user":{"login":"InputUsername","id":3883165,"avatar_url":"https://avatars0.githubusercontent.com/u/3883165?v=4","gravatar_id":"","url":"https://api.github.com/users/InputUsername","html_url":"https://github.com/InputUsername","followers_url":"https://api.github.com/users/InputUsername/followers","following_url":"https://api.github.com/users/InputUsername/following{/other_user}","gists_url":"https://api.github.com/users/InputUsername/gists{/gist_id}","starred_url":"https://api.github.com/users/InputUsername/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InputUsername/subscriptions","organizations_url":"https://api.github.com/users/InputUsername/orgs","repos_url":"https://api.github.com/users/InputUsername/repos","events_url":"https://api.github.com/users/InputUsername/events{/privacy}","received_events_url":"https://api.github.com/users/InputUsername/received_events","type":"User","site_admin":false},"body":"Adds the `Aggregator` class, which contains functionality to maintain aggregate data for either a dashboard or a single endpoint, and update this data every time an endpoint call is added.\r\n\r\nCurrently supported metrics are:\r\n- total visits\r\n- total execution time\r\n- average execution time\r\n- visits per day\r\n- visits per IP\r\n\r\nThis can easily be extended as well.\r\n\r\nFixes #95 ","created_at":"2018-03-29T16:13:06Z","updated_at":"2018-03-29T23:35:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0828ee0aa37b56d9a1418c1d8b29279cebfd1dd9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97/commits","review_comments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97/comments","review_comment_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/97/comments","statuses_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/statuses/2fcf380a1fb8aacbc96edf71dee06ad5e0c862db","head":{"label":"RUGSoftEng:backend/data_aggregation","ref":"backend/data_aggregation","sha":"2fcf380a1fb8aacbc96edf71dee06ad5e0c862db","user":{"login":"RUGSoftEng","id":17049951,"avatar_url":"https://avatars3.githubusercontent.com/u/17049951?v=4","gravatar_id":"","url":"https://api.github.com/users/RUGSoftEng","html_url":"https://github.com/RUGSoftEng","followers_url":"https://api.github.com/users/RUGSoftEng/followers","following_url":"https://api.github.com/users/RUGSoftEng/following{/other_user}","gists_url":"https://api.github.com/users/RUGSoftEng/gists{/gist_id}","starred_url":"https://api.github.com/users/RUGSoftEng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUGSoftEng/subscriptions","organizations_url":"https://api.github.com/users/RUGSoftEng/orgs","repos_url":"https://api.github.com/users/RUGSoftEng/repos","events_url":"https://api.github.com/users/RUGSoftEng/events{/privacy}","received_events_url":"https://api.github.com/users/RUGSoftEng/received_events","type":"Organization","site_admin":false},"repo":{"id":121507896,"name":"2018-PyDash.io","full_name":"RUGSoftEng/2018-PyDash.io","owner":{"login":"RUGSoftEng","id":17049951,"avatar_url":"https://avatars3.githubusercontent.com/u/17049951?v=4","gravatar_id":"","url":"https://api.github.com/users/RUGSoftEng","html_url":"https://github.com/RUGSoftEng","followers_url":"https://api.github.com/users/RUGSoftEng/followers","following_url":"https://api.github.com/users/RUGSoftEng/following{/other_user}","gists_url":"https://api.github.com/users/RUGSoftEng/gists{/gist_id}","starred_url":"https://api.github.com/users/RUGSoftEng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUGSoftEng/subscriptions","organizations_url":"https://api.github.com/users/RUGSoftEng/orgs","repos_url":"https://api.github.com/users/RUGSoftEng/repos","events_url":"https://api.github.com/users/RUGSoftEng/events{/privacy}","received_events_url":"https://api.github.com/users/RUGSoftEng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RUGSoftEng/2018-PyDash.io","description":"A Flask Web-service for visualising Flask-Monitoring-Dashboards","fork":false,"url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io","forks_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/forks","keys_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/teams","hooks_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/hooks","issue_events_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/events{/number}","events_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/events","assignees_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/assignees{/user}","branches_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/branches{/branch}","tags_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/tags","blobs_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/statuses/{sha}","languages_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/languages","stargazers_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/stargazers","contributors_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/contributors","subscribers_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/subscribers","subscription_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/subscription","commits_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/contents/{+path}","compare_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/merges","archive_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/downloads","issues_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues{/number}","pulls_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls{/number}","milestones_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/milestones{/number}","notifications_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/labels{/name}","releases_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/releases{/id}","deployments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/deployments","created_at":"2018-02-14T12:23:45Z","updated_at":"2018-03-29T14:48:27Z","pushed_at":"2018-03-29T22:33:00Z","git_url":"git://github.com/RUGSoftEng/2018-PyDash.io.git","ssh_url":"git@github.com:RUGSoftEng/2018-PyDash.io.git","clone_url":"https://github.com/RUGSoftEng/2018-PyDash.io.git","svn_url":"https://github.com/RUGSoftEng/2018-PyDash.io","homepage":null,"size":1052,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":1,"open_issues":15,"watchers":3,"default_branch":"development"}},"base":{"label":"RUGSoftEng:development","ref":"development","sha":"e24e87511d2f00fd5c9490741848729c392565cb","user":{"login":"RUGSoftEng","id":17049951,"avatar_url":"https://avatars3.githubusercontent.com/u/17049951?v=4","gravatar_id":"","url":"https://api.github.com/users/RUGSoftEng","html_url":"https://github.com/RUGSoftEng","followers_url":"https://api.github.com/users/RUGSoftEng/followers","following_url":"https://api.github.com/users/RUGSoftEng/following{/other_user}","gists_url":"https://api.github.com/users/RUGSoftEng/gists{/gist_id}","starred_url":"https://api.github.com/users/RUGSoftEng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUGSoftEng/subscriptions","organizations_url":"https://api.github.com/users/RUGSoftEng/orgs","repos_url":"https://api.github.com/users/RUGSoftEng/repos","events_url":"https://api.github.com/users/RUGSoftEng/events{/privacy}","received_events_url":"https://api.github.com/users/RUGSoftEng/received_events","type":"Organization","site_admin":false},"repo":{"id":121507896,"name":"2018-PyDash.io","full_name":"RUGSoftEng/2018-PyDash.io","owner":{"login":"RUGSoftEng","id":17049951,"avatar_url":"https://avatars3.githubusercontent.com/u/17049951?v=4","gravatar_id":"","url":"https://api.github.com/users/RUGSoftEng","html_url":"https://github.com/RUGSoftEng","followers_url":"https://api.github.com/users/RUGSoftEng/followers","following_url":"https://api.github.com/users/RUGSoftEng/following{/other_user}","gists_url":"https://api.github.com/users/RUGSoftEng/gists{/gist_id}","starred_url":"https://api.github.com/users/RUGSoftEng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUGSoftEng/subscriptions","organizations_url":"https://api.github.com/users/RUGSoftEng/orgs","repos_url":"https://api.github.com/users/RUGSoftEng/repos","events_url":"https://api.github.com/users/RUGSoftEng/events{/privacy}","received_events_url":"https://api.github.com/users/RUGSoftEng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RUGSoftEng/2018-PyDash.io","description":"A Flask Web-service for visualising Flask-Monitoring-Dashboards","fork":false,"url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io","forks_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/forks","keys_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/teams","hooks_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/hooks","issue_events_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/events{/number}","events_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/events","assignees_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/assignees{/user}","branches_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/branches{/branch}","tags_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/tags","blobs_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/statuses/{sha}","languages_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/languages","stargazers_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/stargazers","contributors_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/contributors","subscribers_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/subscribers","subscription_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/subscription","commits_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/contents/{+path}","compare_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/merges","archive_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/downloads","issues_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues{/number}","pulls_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls{/number}","milestones_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/milestones{/number}","notifications_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/labels{/name}","releases_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/releases{/id}","deployments_url":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/deployments","created_at":"2018-02-14T12:23:45Z","updated_at":"2018-03-29T14:48:27Z","pushed_at":"2018-03-29T22:33:00Z","git_url":"git://github.com/RUGSoftEng/2018-PyDash.io.git","ssh_url":"git@github.com:RUGSoftEng/2018-PyDash.io.git","clone_url":"https://github.com/RUGSoftEng/2018-PyDash.io.git","svn_url":"https://github.com/RUGSoftEng/2018-PyDash.io","homepage":null,"size":1052,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":1,"open_issues":15,"watchers":3,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97"},"html":{"href":"https://github.com/RUGSoftEng/2018-PyDash.io/pull/97"},"issue":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/97"},"comments":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/RUGSoftEng/2018-PyDash.io/statuses/2fcf380a1fb8aacbc96edf71dee06ad5e0c862db"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"TWEApol"}}