{"action":"created","comment":{"url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments/40285446","id":40285446,"diff_hunk":"@@ -2540,6 +2540,23 @@ HatoholError DBTablesMonitoring::getNumberOfMonitoredItemsPerSecond\n \treturn HatoholError(HTERR_OK);\n }\n \n+size_t DBTablesMonitoring::getNumberOfEvents(const EventsQueryOption &option)\n+{\n+\tDBClientJoinBuilder builder(tableProfileEvents, &option);\n+\tstring stmt =","path":"server/src/DBTablesMonitoring.cc","position":7,"original_position":7,"commit_id":"aec255ac7cbf681891056a76f6df11de9beb7cd6","original_commit_id":"aec255ac7cbf681891056a76f6df11de9beb7cd6","user":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"body":"Just impression: Don't take care.\r\nWe want use 'constexpr' for this kind of lines.\r\nAs a result, SQL statements are generated on the build time, instead of runtime.\r\n\r\n","created_at":"2015-09-24T04:50:42Z","updated_at":"2015-09-24T04:50:42Z","html_url":"https://github.com/project-hatohol/hatohol/pull/1566#discussion_r40285446","pull_request_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566","_links":{"self":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments/40285446"},"html":{"href":"https://github.com/project-hatohol/hatohol/pull/1566#discussion_r40285446"},"pull_request":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566"}}},"pull_request":{"url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566","id":45858872,"html_url":"https://github.com/project-hatohol/hatohol/pull/1566","diff_url":"https://github.com/project-hatohol/hatohol/pull/1566.diff","patch_url":"https://github.com/project-hatohol/hatohol/pull/1566.patch","issue_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1566","number":1566,"state":"open","locked":false,"title":"[server] Add REST API to get only number of events","user":{"login":"ashie","id":135104,"avatar_url":"https://avatars.githubusercontent.com/u/135104?v=3","gravatar_id":"","url":"https://api.github.com/users/ashie","html_url":"https://github.com/ashie","followers_url":"https://api.github.com/users/ashie/followers","following_url":"https://api.github.com/users/ashie/following{/other_user}","gists_url":"https://api.github.com/users/ashie/gists{/gist_id}","starred_url":"https://api.github.com/users/ashie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashie/subscriptions","organizations_url":"https://api.github.com/users/ashie/orgs","repos_url":"https://api.github.com/users/ashie/repos","events_url":"https://api.github.com/users/ashie/events{/privacy}","received_events_url":"https://api.github.com/users/ashie/received_events","type":"User","site_admin":false},"body":"An example query:\r\n\r\n* /events?countOnly=true&serverId=3 (Any event filters can be added)\r\n    \r\nAn example response:\r\n\r\n    {\r\n        \"apiVersion\": 4,\r\n        \"errorCode\": 0,\r\n        \"numberOfEvents:4\"\r\n    }\r\n","created_at":"2015-09-24T04:44:34Z","updated_at":"2015-09-24T04:50:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa8570e129f5be76c8ff792f47cb1e429a54bd15","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566/commits","review_comments_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566/comments","review_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1566/comments","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/aec255ac7cbf681891056a76f6df11de9beb7cd6","head":{"label":"project-hatohol:get-num-events","ref":"get-num-events","sha":"aec255ac7cbf681891056a76f6df11de9beb7cd6","user":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"repo":{"id":10903163,"name":"hatohol","full_name":"project-hatohol/hatohol","owner":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-hatohol/hatohol","description":"A unified manager of monitoring software","fork":false,"url":"https://api.github.com/repos/project-hatohol/hatohol","forks_url":"https://api.github.com/repos/project-hatohol/hatohol/forks","keys_url":"https://api.github.com/repos/project-hatohol/hatohol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-hatohol/hatohol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-hatohol/hatohol/teams","hooks_url":"https://api.github.com/repos/project-hatohol/hatohol/hooks","issue_events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/events{/number}","events_url":"https://api.github.com/repos/project-hatohol/hatohol/events","assignees_url":"https://api.github.com/repos/project-hatohol/hatohol/assignees{/user}","branches_url":"https://api.github.com/repos/project-hatohol/hatohol/branches{/branch}","tags_url":"https://api.github.com/repos/project-hatohol/hatohol/tags","blobs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-hatohol/hatohol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-hatohol/hatohol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/{sha}","languages_url":"https://api.github.com/repos/project-hatohol/hatohol/languages","stargazers_url":"https://api.github.com/repos/project-hatohol/hatohol/stargazers","contributors_url":"https://api.github.com/repos/project-hatohol/hatohol/contributors","subscribers_url":"https://api.github.com/repos/project-hatohol/hatohol/subscribers","subscription_url":"https://api.github.com/repos/project-hatohol/hatohol/subscription","commits_url":"https://api.github.com/repos/project-hatohol/hatohol/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-hatohol/hatohol/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-hatohol/hatohol/contents/{+path}","compare_url":"https://api.github.com/repos/project-hatohol/hatohol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-hatohol/hatohol/merges","archive_url":"https://api.github.com/repos/project-hatohol/hatohol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-hatohol/hatohol/downloads","issues_url":"https://api.github.com/repos/project-hatohol/hatohol/issues{/number}","pulls_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls{/number}","milestones_url":"https://api.github.com/repos/project-hatohol/hatohol/milestones{/number}","notifications_url":"https://api.github.com/repos/project-hatohol/hatohol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/labels{/name}","releases_url":"https://api.github.com/repos/project-hatohol/hatohol/releases{/id}","created_at":"2013-06-24T08:45:56Z","updated_at":"2015-08-03T08:45:17Z","pushed_at":"2015-09-24T04:44:34Z","git_url":"git://github.com/project-hatohol/hatohol.git","ssh_url":"git@github.com:project-hatohol/hatohol.git","clone_url":"https://github.com/project-hatohol/hatohol.git","svn_url":"https://github.com/project-hatohol/hatohol","homepage":"http://www.hatohol.org/","size":57105,"stargazers_count":69,"watchers_count":69,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":97,"forks":28,"open_issues":97,"watchers":69,"default_branch":"master"}},"base":{"label":"project-hatohol:master","ref":"master","sha":"e358a0cb219e992221b0a7291cfb371558918696","user":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"repo":{"id":10903163,"name":"hatohol","full_name":"project-hatohol/hatohol","owner":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-hatohol/hatohol","description":"A unified manager of monitoring software","fork":false,"url":"https://api.github.com/repos/project-hatohol/hatohol","forks_url":"https://api.github.com/repos/project-hatohol/hatohol/forks","keys_url":"https://api.github.com/repos/project-hatohol/hatohol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-hatohol/hatohol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-hatohol/hatohol/teams","hooks_url":"https://api.github.com/repos/project-hatohol/hatohol/hooks","issue_events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/events{/number}","events_url":"https://api.github.com/repos/project-hatohol/hatohol/events","assignees_url":"https://api.github.com/repos/project-hatohol/hatohol/assignees{/user}","branches_url":"https://api.github.com/repos/project-hatohol/hatohol/branches{/branch}","tags_url":"https://api.github.com/repos/project-hatohol/hatohol/tags","blobs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-hatohol/hatohol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-hatohol/hatohol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/{sha}","languages_url":"https://api.github.com/repos/project-hatohol/hatohol/languages","stargazers_url":"https://api.github.com/repos/project-hatohol/hatohol/stargazers","contributors_url":"https://api.github.com/repos/project-hatohol/hatohol/contributors","subscribers_url":"https://api.github.com/repos/project-hatohol/hatohol/subscribers","subscription_url":"https://api.github.com/repos/project-hatohol/hatohol/subscription","commits_url":"https://api.github.com/repos/project-hatohol/hatohol/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-hatohol/hatohol/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-hatohol/hatohol/contents/{+path}","compare_url":"https://api.github.com/repos/project-hatohol/hatohol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-hatohol/hatohol/merges","archive_url":"https://api.github.com/repos/project-hatohol/hatohol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-hatohol/hatohol/downloads","issues_url":"https://api.github.com/repos/project-hatohol/hatohol/issues{/number}","pulls_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls{/number}","milestones_url":"https://api.github.com/repos/project-hatohol/hatohol/milestones{/number}","notifications_url":"https://api.github.com/repos/project-hatohol/hatohol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/labels{/name}","releases_url":"https://api.github.com/repos/project-hatohol/hatohol/releases{/id}","created_at":"2013-06-24T08:45:56Z","updated_at":"2015-08-03T08:45:17Z","pushed_at":"2015-09-24T04:44:34Z","git_url":"git://github.com/project-hatohol/hatohol.git","ssh_url":"git@github.com:project-hatohol/hatohol.git","clone_url":"https://github.com/project-hatohol/hatohol.git","svn_url":"https://github.com/project-hatohol/hatohol","homepage":"http://www.hatohol.org/","size":57105,"stargazers_count":69,"watchers_count":69,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":97,"forks":28,"open_issues":97,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566"},"html":{"href":"https://github.com/project-hatohol/hatohol/pull/1566"},"issue":{"href":"https://api.github.com/repos/project-hatohol/hatohol/issues/1566"},"comments":{"href":"https://api.github.com/repos/project-hatohol/hatohol/issues/1566/comments"},"review_comments":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566/comments"},"review_comment":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1566/commits"},"statuses":{"href":"https://api.github.com/repos/project-hatohol/hatohol/statuses/aec255ac7cbf681891056a76f6df11de9beb7cd6"}}}}