{"action":"closed","number":266,"pull_request":{"url":"https://api.github.com/repos/finagle/finch/pulls/266","id":35068268,"html_url":"https://github.com/finagle/finch/pull/266","diff_url":"https://github.com/finagle/finch/pull/266.diff","patch_url":"https://github.com/finagle/finch/pull/266.patch","issue_url":"https://api.github.com/repos/finagle/finch/issues/266","number":266,"state":"closed","locked":false,"title":"Add some initial benchmarks for request readers and services","user":{"login":"travisbrown","id":316049,"avatar_url":"https://avatars.githubusercontent.com/u/316049?v=3","gravatar_id":"","url":"https://api.github.com/users/travisbrown","html_url":"https://github.com/travisbrown","followers_url":"https://api.github.com/users/travisbrown/followers","following_url":"https://api.github.com/users/travisbrown/following{/other_user}","gists_url":"https://api.github.com/users/travisbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/travisbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisbrown/subscriptions","organizations_url":"https://api.github.com/users/travisbrown/orgs","repos_url":"https://api.github.com/users/travisbrown/repos","events_url":"https://api.github.com/users/travisbrown/events{/privacy}","received_events_url":"https://api.github.com/users/travisbrown/received_events","type":"User","site_admin":false},"body":"I've added some JMH benchmarks to make it easier to keep track of the performance impact of the new API additions and changes for 0.7.0. This partially addresses #121—I think we can mark that complete when the router benchmarks (which I'll push with the new coproduct stuff, probably later today) go in.\r\n\r\nThe documentation is light and the more integration-y service benchmark doesn't have any tests yet, but I wanted to go ahead and get it out as a starting point.\r\n\r\nNote that this includes my #253 (rebased), since I wanted to be able to compare the performance of a fully-derived request reader.\r\n\r\nThe initial results are heartening. While the derived reader is a little slower than the others (about 75% of the throughput of the other applicative readers), there's no real difference between the new `HList`-based applicative readers (even with the `Generic` machinery) and the old `~` readers:\r\n\r\n```\r\n[info] Benchmark                                             Mode  Cnt       Score      Error  Units\r\n[info] FailingRequestReaderBenchmark.derivedReader          thrpt   20   52650.452 ± 1605.621  ops/s\r\n[info] FailingRequestReaderBenchmark.hlistApplyReader       thrpt   20   60900.097 ±  989.982  ops/s\r\n[info] FailingRequestReaderBenchmark.hlistGenericReader     thrpt   20   60573.071 ± 1062.515  ops/s\r\n[info] FailingRequestReaderBenchmark.monadicReader          thrpt   20  201983.780 ± 5474.721  ops/s\r\n[info] FailingRequestReaderBenchmark.tildeReader            thrpt   20   61516.793 ±  550.878  ops/s\r\n[info] SuccessfulRequestReaderBenchmark.derivedReader       thrpt   20  125559.994 ± 2311.396  ops/s\r\n[info] SuccessfulRequestReaderBenchmark.hlistApplyReader    thrpt   20  163283.190 ± 2934.045  ops/s\r\n[info] SuccessfulRequestReaderBenchmark.hlistGenericReader  thrpt   20  162149.855 ± 1955.893  ops/s\r\n[info] SuccessfulRequestReaderBenchmark.monadicReader       thrpt   20  256000.476 ± 7205.922  ops/s\r\n[info] SuccessfulRequestReaderBenchmark.tildeReader         thrpt   20  169802.934 ± 2864.328  ops/s\r\n```\r\n\r\n(Note that it's not really fair to compare the monadic one to the others, since it doesn't accumulate errors in the case of invalid requests.)\r\n\r\nThe service results also look pretty good (here lower is better):\r\n\r\n```\r\n[info] Benchmark                                          Mode  Cnt    Score   Error  Units\r\n[info] i.f.b.s.argonaut.ArgonautBenchmark.userOperations  avgt   20  181.648 ± 6.394  ms/op\r\n[info] i.f.b.s.finagle.FinagleBenchmark.userOperations    avgt   20  155.486 ± 4.754  ms/op\r\n[info] i.f.b.s.jackson.JacksonBenchmark.userOperations    avgt   20  160.128 ± 4.651  ms/op\r\n[info] i.f.b.s.json4s.Json4sBenchmark.userOperations      avgt   20  177.745 ± 5.174  ms/op\r\n```\r\n\r\nThere's no real difference between using Finch with Jackson vs. the vanilla Finagle HTTP API (also with Jackson), and Argonaut and Json4s are only a bit slower.","created_at":"2015-05-09T15:32:37Z","updated_at":"2015-05-09T20:18:38Z","closed_at":"2015-05-09T20:18:38Z","merged_at":"2015-05-09T20:18:38Z","merge_commit_sha":"def54dfa925e0d56b2b2040973bdccce083f7155","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/finagle/finch/pulls/266/commits","review_comments_url":"https://api.github.com/repos/finagle/finch/pulls/266/comments","review_comment_url":"https://api.github.com/repos/finagle/finch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/finagle/finch/issues/266/comments","statuses_url":"https://api.github.com/repos/finagle/finch/statuses/7d1f496ca92800fe83d7a03eb4bbee88d65ca002","head":{"label":"travisbrown:topic/initial-benchmarks","ref":"topic/initial-benchmarks","sha":"7d1f496ca92800fe83d7a03eb4bbee88d65ca002","user":{"login":"travisbrown","id":316049,"avatar_url":"https://avatars.githubusercontent.com/u/316049?v=3","gravatar_id":"","url":"https://api.github.com/users/travisbrown","html_url":"https://github.com/travisbrown","followers_url":"https://api.github.com/users/travisbrown/followers","following_url":"https://api.github.com/users/travisbrown/following{/other_user}","gists_url":"https://api.github.com/users/travisbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/travisbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisbrown/subscriptions","organizations_url":"https://api.github.com/users/travisbrown/orgs","repos_url":"https://api.github.com/users/travisbrown/repos","events_url":"https://api.github.com/users/travisbrown/events{/privacy}","received_events_url":"https://api.github.com/users/travisbrown/received_events","type":"User","site_admin":false},"repo":{"id":21905321,"name":"finch","full_name":"travisbrown/finch","owner":{"login":"travisbrown","id":316049,"avatar_url":"https://avatars.githubusercontent.com/u/316049?v=3","gravatar_id":"","url":"https://api.github.com/users/travisbrown","html_url":"https://github.com/travisbrown","followers_url":"https://api.github.com/users/travisbrown/followers","following_url":"https://api.github.com/users/travisbrown/following{/other_user}","gists_url":"https://api.github.com/users/travisbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/travisbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisbrown/subscriptions","organizations_url":"https://api.github.com/users/travisbrown/orgs","repos_url":"https://api.github.com/users/travisbrown/repos","events_url":"https://api.github.com/users/travisbrown/events{/privacy}","received_events_url":"https://api.github.com/users/travisbrown/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/travisbrown/finch","description":"A lightweight REST API atop of Finagle","fork":true,"url":"https://api.github.com/repos/travisbrown/finch","forks_url":"https://api.github.com/repos/travisbrown/finch/forks","keys_url":"https://api.github.com/repos/travisbrown/finch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/travisbrown/finch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/travisbrown/finch/teams","hooks_url":"https://api.github.com/repos/travisbrown/finch/hooks","issue_events_url":"https://api.github.com/repos/travisbrown/finch/issues/events{/number}","events_url":"https://api.github.com/repos/travisbrown/finch/events","assignees_url":"https://api.github.com/repos/travisbrown/finch/assignees{/user}","branches_url":"https://api.github.com/repos/travisbrown/finch/branches{/branch}","tags_url":"https://api.github.com/repos/travisbrown/finch/tags","blobs_url":"https://api.github.com/repos/travisbrown/finch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/travisbrown/finch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/travisbrown/finch/git/refs{/sha}","trees_url":"https://api.github.com/repos/travisbrown/finch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/travisbrown/finch/statuses/{sha}","languages_url":"https://api.github.com/repos/travisbrown/finch/languages","stargazers_url":"https://api.github.com/repos/travisbrown/finch/stargazers","contributors_url":"https://api.github.com/repos/travisbrown/finch/contributors","subscribers_url":"https://api.github.com/repos/travisbrown/finch/subscribers","subscription_url":"https://api.github.com/repos/travisbrown/finch/subscription","commits_url":"https://api.github.com/repos/travisbrown/finch/commits{/sha}","git_commits_url":"https://api.github.com/repos/travisbrown/finch/git/commits{/sha}","comments_url":"https://api.github.com/repos/travisbrown/finch/comments{/number}","issue_comment_url":"https://api.github.com/repos/travisbrown/finch/issues/comments{/number}","contents_url":"https://api.github.com/repos/travisbrown/finch/contents/{+path}","compare_url":"https://api.github.com/repos/travisbrown/finch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/travisbrown/finch/merges","archive_url":"https://api.github.com/repos/travisbrown/finch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/travisbrown/finch/downloads","issues_url":"https://api.github.com/repos/travisbrown/finch/issues{/number}","pulls_url":"https://api.github.com/repos/travisbrown/finch/pulls{/number}","milestones_url":"https://api.github.com/repos/travisbrown/finch/milestones{/number}","notifications_url":"https://api.github.com/repos/travisbrown/finch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/travisbrown/finch/labels{/name}","releases_url":"https://api.github.com/repos/travisbrown/finch/releases{/id}","created_at":"2014-07-16T14:59:41Z","updated_at":"2015-04-27T16:35:46Z","pushed_at":"2015-05-09T20:04:57Z","git_url":"git://github.com/travisbrown/finch.git","ssh_url":"git@github.com:travisbrown/finch.git","clone_url":"https://github.com/travisbrown/finch.git","svn_url":"https://github.com/travisbrown/finch","homepage":"","size":1570,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"finagle:master","ref":"master","sha":"bfc12325ef92f8c6287cdc135003f29a4c97a68d","user":{"login":"finagle","id":7944306,"avatar_url":"https://avatars.githubusercontent.com/u/7944306?v=3","gravatar_id":"","url":"https://api.github.com/users/finagle","html_url":"https://github.com/finagle","followers_url":"https://api.github.com/users/finagle/followers","following_url":"https://api.github.com/users/finagle/following{/other_user}","gists_url":"https://api.github.com/users/finagle/gists{/gist_id}","starred_url":"https://api.github.com/users/finagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finagle/subscriptions","organizations_url":"https://api.github.com/users/finagle/orgs","repos_url":"https://api.github.com/users/finagle/repos","events_url":"https://api.github.com/users/finagle/events{/privacy}","received_events_url":"https://api.github.com/users/finagle/received_events","type":"Organization","site_admin":false},"repo":{"id":18798826,"name":"finch","full_name":"finagle/finch","owner":{"login":"finagle","id":7944306,"avatar_url":"https://avatars.githubusercontent.com/u/7944306?v=3","gravatar_id":"","url":"https://api.github.com/users/finagle","html_url":"https://github.com/finagle","followers_url":"https://api.github.com/users/finagle/followers","following_url":"https://api.github.com/users/finagle/following{/other_user}","gists_url":"https://api.github.com/users/finagle/gists{/gist_id}","starred_url":"https://api.github.com/users/finagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finagle/subscriptions","organizations_url":"https://api.github.com/users/finagle/orgs","repos_url":"https://api.github.com/users/finagle/repos","events_url":"https://api.github.com/users/finagle/events{/privacy}","received_events_url":"https://api.github.com/users/finagle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/finagle/finch","description":"An idiomatic Scala version of finagle-http","fork":false,"url":"https://api.github.com/repos/finagle/finch","forks_url":"https://api.github.com/repos/finagle/finch/forks","keys_url":"https://api.github.com/repos/finagle/finch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/finagle/finch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/finagle/finch/teams","hooks_url":"https://api.github.com/repos/finagle/finch/hooks","issue_events_url":"https://api.github.com/repos/finagle/finch/issues/events{/number}","events_url":"https://api.github.com/repos/finagle/finch/events","assignees_url":"https://api.github.com/repos/finagle/finch/assignees{/user}","branches_url":"https://api.github.com/repos/finagle/finch/branches{/branch}","tags_url":"https://api.github.com/repos/finagle/finch/tags","blobs_url":"https://api.github.com/repos/finagle/finch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/finagle/finch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/finagle/finch/git/refs{/sha}","trees_url":"https://api.github.com/repos/finagle/finch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/finagle/finch/statuses/{sha}","languages_url":"https://api.github.com/repos/finagle/finch/languages","stargazers_url":"https://api.github.com/repos/finagle/finch/stargazers","contributors_url":"https://api.github.com/repos/finagle/finch/contributors","subscribers_url":"https://api.github.com/repos/finagle/finch/subscribers","subscription_url":"https://api.github.com/repos/finagle/finch/subscription","commits_url":"https://api.github.com/repos/finagle/finch/commits{/sha}","git_commits_url":"https://api.github.com/repos/finagle/finch/git/commits{/sha}","comments_url":"https://api.github.com/repos/finagle/finch/comments{/number}","issue_comment_url":"https://api.github.com/repos/finagle/finch/issues/comments{/number}","contents_url":"https://api.github.com/repos/finagle/finch/contents/{+path}","compare_url":"https://api.github.com/repos/finagle/finch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/finagle/finch/merges","archive_url":"https://api.github.com/repos/finagle/finch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/finagle/finch/downloads","issues_url":"https://api.github.com/repos/finagle/finch/issues{/number}","pulls_url":"https://api.github.com/repos/finagle/finch/pulls{/number}","milestones_url":"https://api.github.com/repos/finagle/finch/milestones{/number}","notifications_url":"https://api.github.com/repos/finagle/finch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/finagle/finch/labels{/name}","releases_url":"https://api.github.com/repos/finagle/finch/releases{/id}","created_at":"2014-04-15T12:17:44Z","updated_at":"2015-05-07T17:54:55Z","pushed_at":"2015-05-09T20:18:38Z","git_url":"git://github.com/finagle/finch.git","ssh_url":"git@github.com:finagle/finch.git","clone_url":"https://github.com/finagle/finch.git","svn_url":"https://github.com/finagle/finch","homepage":"","size":5324,"stargazers_count":316,"watchers_count":316,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":22,"forks":35,"open_issues":22,"watchers":316,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/finagle/finch/pulls/266"},"html":{"href":"https://github.com/finagle/finch/pull/266"},"issue":{"href":"https://api.github.com/repos/finagle/finch/issues/266"},"comments":{"href":"https://api.github.com/repos/finagle/finch/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/finagle/finch/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/finagle/finch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/finagle/finch/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/finagle/finch/statuses/7d1f496ca92800fe83d7a03eb4bbee88d65ca002"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"vkostyukov","id":1098539,"avatar_url":"https://avatars.githubusercontent.com/u/1098539?v=3","gravatar_id":"","url":"https://api.github.com/users/vkostyukov","html_url":"https://github.com/vkostyukov","followers_url":"https://api.github.com/users/vkostyukov/followers","following_url":"https://api.github.com/users/vkostyukov/following{/other_user}","gists_url":"https://api.github.com/users/vkostyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkostyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkostyukov/subscriptions","organizations_url":"https://api.github.com/users/vkostyukov/orgs","repos_url":"https://api.github.com/users/vkostyukov/repos","events_url":"https://api.github.com/users/vkostyukov/events{/privacy}","received_events_url":"https://api.github.com/users/vkostyukov/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":2,"additions":616,"deletions":2,"changed_files":17}}