{"action":"closed","number":2357,"pull_request":{"url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357","id":212069877,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMDY5ODc3","html_url":"https://github.com/LiskHQ/lisk/pull/2357","diff_url":"https://github.com/LiskHQ/lisk/pull/2357.diff","patch_url":"https://github.com/LiskHQ/lisk/pull/2357.patch","issue_url":"https://api.github.com/repos/LiskHQ/lisk/issues/2357","number":2357,"state":"closed","locked":false,"title":"Poor performance of GET /api/delegates/[address]/forging_statistics - Closes #2352","user":{"login":"nazarhussain","id":112468,"node_id":"MDQ6VXNlcjExMjQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/112468?v=4","gravatar_id":"","url":"https://api.github.com/users/nazarhussain","html_url":"https://github.com/nazarhussain","followers_url":"https://api.github.com/users/nazarhussain/followers","following_url":"https://api.github.com/users/nazarhussain/following{/other_user}","gists_url":"https://api.github.com/users/nazarhussain/gists{/gist_id}","starred_url":"https://api.github.com/users/nazarhussain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazarhussain/subscriptions","organizations_url":"https://api.github.com/users/nazarhussain/orgs","repos_url":"https://api.github.com/users/nazarhussain/repos","events_url":"https://api.github.com/users/nazarhussain/events{/privacy}","received_events_url":"https://api.github.com/users/nazarhussain/received_events","type":"User","site_admin":false},"body":"### What was the problem?\r\nPerformance of the endpoint `/api/delegates/[address]/forging_statistics` was slow because of aggregating all data when no time filter is provided. \r\n\r\n### How did I fix it?\r\nWhen no time filter is provided we get data from mem_accounts instead of aggregating. \r\n\r\n### How to test it?\r\n\r\n```\r\nnpx mocha test/functional/http/get/delegates.js\r\n```\r\n\r\n### Review checklist\r\n\r\n* The PR solves #2352\r\n* All new code is covered with unit tests\r\n* All new code was formatted with Prettier\r\n* Linting passes\r\n* Tests pass\r\n* Commit messages follow the [commit guidelines](CONTRIBUTING.md#git-commit-messages)\r\n* Documentation has been added/updated\r\n","created_at":"2018-08-30T12:58:27Z","updated_at":"2018-08-30T16:05:19Z","closed_at":"2018-08-30T16:05:19Z","merged_at":null,"merge_commit_sha":"f242d5bdfec1c30ef50df798a8bbd7751581b605","assignee":{"login":"nazarhussain","id":112468,"node_id":"MDQ6VXNlcjExMjQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/112468?v=4","gravatar_id":"","url":"https://api.github.com/users/nazarhussain","html_url":"https://github.com/nazarhussain","followers_url":"https://api.github.com/users/nazarhussain/followers","following_url":"https://api.github.com/users/nazarhussain/following{/other_user}","gists_url":"https://api.github.com/users/nazarhussain/gists{/gist_id}","starred_url":"https://api.github.com/users/nazarhussain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazarhussain/subscriptions","organizations_url":"https://api.github.com/users/nazarhussain/orgs","repos_url":"https://api.github.com/users/nazarhussain/repos","events_url":"https://api.github.com/users/nazarhussain/events{/privacy}","received_events_url":"https://api.github.com/users/nazarhussain/received_events","type":"User","site_admin":false},"assignees":[{"login":"nazarhussain","id":112468,"node_id":"MDQ6VXNlcjExMjQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/112468?v=4","gravatar_id":"","url":"https://api.github.com/users/nazarhussain","html_url":"https://github.com/nazarhussain","followers_url":"https://api.github.com/users/nazarhussain/followers","following_url":"https://api.github.com/users/nazarhussain/following{/other_user}","gists_url":"https://api.github.com/users/nazarhussain/gists{/gist_id}","starred_url":"https://api.github.com/users/nazarhussain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazarhussain/subscriptions","organizations_url":"https://api.github.com/users/nazarhussain/orgs","repos_url":"https://api.github.com/users/nazarhussain/repos","events_url":"https://api.github.com/users/nazarhussain/events{/privacy}","received_events_url":"https://api.github.com/users/nazarhussain/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"4miners","id":22824146,"node_id":"MDQ6VXNlcjIyODI0MTQ2","avatar_url":"https://avatars0.githubusercontent.com/u/22824146?v=4","gravatar_id":"","url":"https://api.github.com/users/4miners","html_url":"https://github.com/4miners","followers_url":"https://api.github.com/users/4miners/followers","following_url":"https://api.github.com/users/4miners/following{/other_user}","gists_url":"https://api.github.com/users/4miners/gists{/gist_id}","starred_url":"https://api.github.com/users/4miners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4miners/subscriptions","organizations_url":"https://api.github.com/users/4miners/orgs","repos_url":"https://api.github.com/users/4miners/repos","events_url":"https://api.github.com/users/4miners/events{/privacy}","received_events_url":"https://api.github.com/users/4miners/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":655482394,"node_id":"MDU6TGFiZWw2NTU0ODIzOTQ=","url":"https://api.github.com/repos/LiskHQ/lisk/labels/:eye:%20pending%20review","name":":eye: pending review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357/commits","review_comments_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357/comments","review_comment_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/issues/2357/comments","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/5466fbacc0d7864689ab59f4bc5d18162ba2b1f9","head":{"label":"LiskHQ:235-forging-stats","ref":"235-forging-stats","sha":"5466fbacc0d7864689ab59f4bc5d18162ba2b1f9","user":{"login":"LiskHQ","id":16600915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjAwOTE1","avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":50873641,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg3MzY0MQ==","name":"lisk","full_name":"LiskHQ/lisk","owner":{"login":"LiskHQ","id":16600915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjAwOTE1","avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LiskHQ/lisk","description":"📟 Lisk blockchain application platform","fork":false,"url":"https://api.github.com/repos/LiskHQ/lisk","forks_url":"https://api.github.com/repos/LiskHQ/lisk/forks","keys_url":"https://api.github.com/repos/LiskHQ/lisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LiskHQ/lisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LiskHQ/lisk/teams","hooks_url":"https://api.github.com/repos/LiskHQ/lisk/hooks","issue_events_url":"https://api.github.com/repos/LiskHQ/lisk/issues/events{/number}","events_url":"https://api.github.com/repos/LiskHQ/lisk/events","assignees_url":"https://api.github.com/repos/LiskHQ/lisk/assignees{/user}","branches_url":"https://api.github.com/repos/LiskHQ/lisk/branches{/branch}","tags_url":"https://api.github.com/repos/LiskHQ/lisk/tags","blobs_url":"https://api.github.com/repos/LiskHQ/lisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LiskHQ/lisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LiskHQ/lisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/LiskHQ/lisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/{sha}","languages_url":"https://api.github.com/repos/LiskHQ/lisk/languages","stargazers_url":"https://api.github.com/repos/LiskHQ/lisk/stargazers","contributors_url":"https://api.github.com/repos/LiskHQ/lisk/contributors","subscribers_url":"https://api.github.com/repos/LiskHQ/lisk/subscribers","subscription_url":"https://api.github.com/repos/LiskHQ/lisk/subscription","commits_url":"https://api.github.com/repos/LiskHQ/lisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/LiskHQ/lisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/LiskHQ/lisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/LiskHQ/lisk/contents/{+path}","compare_url":"https://api.github.com/repos/LiskHQ/lisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LiskHQ/lisk/merges","archive_url":"https://api.github.com/repos/LiskHQ/lisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LiskHQ/lisk/downloads","issues_url":"https://api.github.com/repos/LiskHQ/lisk/issues{/number}","pulls_url":"https://api.github.com/repos/LiskHQ/lisk/pulls{/number}","milestones_url":"https://api.github.com/repos/LiskHQ/lisk/milestones{/number}","notifications_url":"https://api.github.com/repos/LiskHQ/lisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LiskHQ/lisk/labels{/name}","releases_url":"https://api.github.com/repos/LiskHQ/lisk/releases{/id}","deployments_url":"https://api.github.com/repos/LiskHQ/lisk/deployments","created_at":"2016-02-01T21:45:35Z","updated_at":"2018-08-30T09:23:51Z","pushed_at":"2018-08-30T16:05:14Z","git_url":"git://github.com/LiskHQ/lisk.git","ssh_url":"git@github.com:LiskHQ/lisk.git","clone_url":"https://github.com/LiskHQ/lisk.git","svn_url":"https://github.com/LiskHQ/lisk","homepage":"https://lisk.io/","size":20604,"stargazers_count":2470,"watchers_count":2470,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":385,"mirror_url":null,"archived":false,"open_issues_count":93,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":385,"open_issues":93,"watchers":2470,"default_branch":"development"}},"base":{"label":"LiskHQ:1.1.0","ref":"1.1.0","sha":"6bea27bc93231465135eee74747527241535dc75","user":{"login":"LiskHQ","id":16600915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjAwOTE1","avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":50873641,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg3MzY0MQ==","name":"lisk","full_name":"LiskHQ/lisk","owner":{"login":"LiskHQ","id":16600915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjAwOTE1","avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LiskHQ/lisk","description":"📟 Lisk blockchain application platform","fork":false,"url":"https://api.github.com/repos/LiskHQ/lisk","forks_url":"https://api.github.com/repos/LiskHQ/lisk/forks","keys_url":"https://api.github.com/repos/LiskHQ/lisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LiskHQ/lisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LiskHQ/lisk/teams","hooks_url":"https://api.github.com/repos/LiskHQ/lisk/hooks","issue_events_url":"https://api.github.com/repos/LiskHQ/lisk/issues/events{/number}","events_url":"https://api.github.com/repos/LiskHQ/lisk/events","assignees_url":"https://api.github.com/repos/LiskHQ/lisk/assignees{/user}","branches_url":"https://api.github.com/repos/LiskHQ/lisk/branches{/branch}","tags_url":"https://api.github.com/repos/LiskHQ/lisk/tags","blobs_url":"https://api.github.com/repos/LiskHQ/lisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LiskHQ/lisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LiskHQ/lisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/LiskHQ/lisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/{sha}","languages_url":"https://api.github.com/repos/LiskHQ/lisk/languages","stargazers_url":"https://api.github.com/repos/LiskHQ/lisk/stargazers","contributors_url":"https://api.github.com/repos/LiskHQ/lisk/contributors","subscribers_url":"https://api.github.com/repos/LiskHQ/lisk/subscribers","subscription_url":"https://api.github.com/repos/LiskHQ/lisk/subscription","commits_url":"https://api.github.com/repos/LiskHQ/lisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/LiskHQ/lisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/LiskHQ/lisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/LiskHQ/lisk/contents/{+path}","compare_url":"https://api.github.com/repos/LiskHQ/lisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LiskHQ/lisk/merges","archive_url":"https://api.github.com/repos/LiskHQ/lisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LiskHQ/lisk/downloads","issues_url":"https://api.github.com/repos/LiskHQ/lisk/issues{/number}","pulls_url":"https://api.github.com/repos/LiskHQ/lisk/pulls{/number}","milestones_url":"https://api.github.com/repos/LiskHQ/lisk/milestones{/number}","notifications_url":"https://api.github.com/repos/LiskHQ/lisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LiskHQ/lisk/labels{/name}","releases_url":"https://api.github.com/repos/LiskHQ/lisk/releases{/id}","deployments_url":"https://api.github.com/repos/LiskHQ/lisk/deployments","created_at":"2016-02-01T21:45:35Z","updated_at":"2018-08-30T09:23:51Z","pushed_at":"2018-08-30T16:05:14Z","git_url":"git://github.com/LiskHQ/lisk.git","ssh_url":"git@github.com:LiskHQ/lisk.git","clone_url":"https://github.com/LiskHQ/lisk.git","svn_url":"https://github.com/LiskHQ/lisk","homepage":"https://lisk.io/","size":20604,"stargazers_count":2470,"watchers_count":2470,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":385,"mirror_url":null,"archived":false,"open_issues_count":93,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":385,"open_issues":93,"watchers":2470,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357"},"html":{"href":"https://github.com/LiskHQ/lisk/pull/2357"},"issue":{"href":"https://api.github.com/repos/LiskHQ/lisk/issues/2357"},"comments":{"href":"https://api.github.com/repos/LiskHQ/lisk/issues/2357/comments"},"review_comments":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357/comments"},"review_comment":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2357/commits"},"statuses":{"href":"https://api.github.com/repos/LiskHQ/lisk/statuses/5466fbacc0d7864689ab59f4bc5d18162ba2b1f9"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":61,"deletions":13,"changed_files":2}}
{"actor":{"display_login":"nazarhussain"}}