{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/fili/pulls/comments/89911097","pull_request_review_id":10437877,"id":89911097,"diff_hunk":"@@ -290,6 +327,24 @@ public DataApiRequest(\n     }\n \n     /**\n+     * Times the execution of the specified producer, making sure to stop timing in a finally clause.\n+     *\n+     * @param generator  The producer to be timed\n+     * @param timerName  The name to use for the timer\n+     * @param <T>  The type of the object produced\n+     *\n+     * @return The value returned by the generator\n+     */\n+    private <T> T timeGenerator(Producer<T> generator, String timerName) {","path":"fili-core/src/main/java/com/yahoo/bard/webservice/web/DataApiRequest.java","position":129,"original_position":129,"commit_id":"e431af9f904ae20be317324e405125787571bcd5","original_commit_id":"e431af9f904ae20be317324e405125787571bcd5","user":{"login":"cdeszaq","id":612084,"avatar_url":"https://avatars.githubusercontent.com/u/612084?v=3","gravatar_id":"","url":"https://api.github.com/users/cdeszaq","html_url":"https://github.com/cdeszaq","followers_url":"https://api.github.com/users/cdeszaq/followers","following_url":"https://api.github.com/users/cdeszaq/following{/other_user}","gists_url":"https://api.github.com/users/cdeszaq/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeszaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeszaq/subscriptions","organizations_url":"https://api.github.com/users/cdeszaq/orgs","repos_url":"https://api.github.com/users/cdeszaq/repos","events_url":"https://api.github.com/users/cdeszaq/events{/privacy}","received_events_url":"https://api.github.com/users/cdeszaq/received_events","type":"User","site_admin":false},"body":"While this solution is cute, it uglies up the calls everywhere, making the code much harder to understand. Instead, if we want to do this, we should use annotations on the \"generator\" methods. Take a look at the `@Timed` annotation in the Metrics library to see how they are doing it. Having a similar annotation for the `RequestLog` may be exactly what we're looking for.","created_at":"2016-11-28T23:36:33Z","updated_at":"2016-11-28T23:42:08Z","html_url":"https://github.com/yahoo/fili/pull/110#discussion_r89911097","pull_request_url":"https://api.github.com/repos/yahoo/fili/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments/89911097"},"html":{"href":"https://github.com/yahoo/fili/pull/110#discussion_r89911097"},"pull_request":{"href":"https://api.github.com/repos/yahoo/fili/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/fili/pulls/110","id":95595487,"html_url":"https://github.com/yahoo/fili/pull/110","diff_url":"https://github.com/yahoo/fili/pull/110.diff","patch_url":"https://github.com/yahoo/fili/pull/110.patch","issue_url":"https://api.github.com/repos/yahoo/fili/issues/110","number":110,"state":"open","locked":false,"title":"Adds some additional timings.","user":{"login":"archolewa","id":11720815,"avatar_url":"https://avatars.githubusercontent.com/u/11720815?v=3","gravatar_id":"","url":"https://api.github.com/users/archolewa","html_url":"https://github.com/archolewa","followers_url":"https://api.github.com/users/archolewa/followers","following_url":"https://api.github.com/users/archolewa/following{/other_user}","gists_url":"https://api.github.com/users/archolewa/gists{/gist_id}","starred_url":"https://api.github.com/users/archolewa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archolewa/subscriptions","organizations_url":"https://api.github.com/users/archolewa/orgs","repos_url":"https://api.github.com/users/archolewa/repos","events_url":"https://api.github.com/users/archolewa/events{/privacy}","received_events_url":"https://api.github.com/users/archolewa/received_events","type":"User","site_admin":false},"body":"--In order to better aid in performance optimizations, some additional\r\ntiming has been added to the request processing workflow.\r\n\r\n--Based on past experiences, most slow queries spend the majority of\r\ntheir time building a `DataApiRequest`, so timings have been added\r\naround all the major steps in building a `DataApiRequest`.\r\n\r\n--Furthermore, it's expected that the bulk of the time spent building a\r\n`DataApiRequest` is spent resolving filters, so some additional timings\r\nhave been added to the `LuceneSearchProvider`, the provider most\r\ncommonly used for large dimensions.\r\n\r\n--It's also possible that a lot of the request workflow is spent\r\nserializing large Druid queries, so some timings have been added around\r\nserializing Druid queries.","created_at":"2016-11-28T23:12:56Z","updated_at":"2016-11-28T23:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87155a8a61a27287a64e5afea4cb8885256c8140","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/fili/pulls/110/commits","review_comments_url":"https://api.github.com/repos/yahoo/fili/pulls/110/comments","review_comment_url":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/fili/issues/110/comments","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/e431af9f904ae20be317324e405125787571bcd5","head":{"label":"yahoo:add-timings","ref":"add-timings","sha":"e431af9f904ae20be317324e405125787571bcd5","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2016-11-25T00:16:24Z","pushed_at":"2016-11-28T23:14:59Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"","size":2103,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":25,"forks":18,"open_issues":25,"watchers":20,"default_branch":"master"}},"base":{"label":"yahoo:master","ref":"master","sha":"9859fec825f4b5520930f38103835187cd608731","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2016-11-25T00:16:24Z","pushed_at":"2016-11-28T23:14:59Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"","size":2103,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":25,"forks":18,"open_issues":25,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/110"},"html":{"href":"https://github.com/yahoo/fili/pull/110"},"issue":{"href":"https://api.github.com/repos/yahoo/fili/issues/110"},"comments":{"href":"https://api.github.com/repos/yahoo/fili/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/fili/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/fili/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/fili/statuses/e431af9f904ae20be317324e405125787571bcd5"}}}}
{"actor":{"display_login":"cdeszaq"}}