{"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/73076392","id":73076392,"diff_hunk":"@@ -0,0 +1,40 @@\n+package play.api.mvc\n+\n+import org.openjdk.jmh.annotations._\n+\n+/**\n+ * This benchmark reads a cookie value from a RequestHeader.\n+ */\n+@State(Scope.Benchmark)\n+class Cookies_01_ReadCookieFromHeader {\n+\n+  var requestHeader: RequestHeader = null\n+  var result: String = null\n+\n+  @Setup(Level.Iteration)\n+  def setup(): Unit = {\n+    requestHeader = MvcHelpers.requestHeader(List(\n+      \"Accept-Encoding\" -> \"gzip, deflate, sdch, br\",\n+      \"Host\" -> \"www.playframework.com\",\n+      \"Accept-Language\" -> \"en-US,en;q=0.8\",\n+      \"Upgrade-Insecure-Requests\" -> \"1\",\n+      \"User-Agent\" -> \"Mozilla/9.9 (Macintosh; Intel Mac OS X 10_99_9) AppleWebKit/999.99 (KHTML, like Gecko) Chrome/99.9.9999.999 Safari/999.999\",\n+      \"Accept\" -> \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\n+      \"Cache-Control\" -> \"max-age=0\",\n+      \"Cookie\" -> \"__utma=99999999999999999999999999999999999999999999999999999; __utmz=999999999999999999999999999999999999999999999999999999999999999999999; _mkto_trk=999999999999999999999999999999999999999999999999999999999999999\",\n+      \"Connection\" -> \"keep-alive\"\n+    ))\n+    result = null\n+  }\n+\n+  @TearDown(Level.Iteration)\n+  def tearDown(): Unit = {\n+    // Check the benchmark got the correct result\n+    assert(result == \"99999999999999999999999999999999999999999999999999999\")\n+  }\n+\n+  @Benchmark\n+  def getSomeCookie(): Unit = {\n+    result = requestHeader.cookies.get(\"__utma\").get.value","path":"framework/src/play-microbenchmark/src/main/scala/play/api/mvc/Cookies_01_ReadCookieFromHeader.scala","position":38,"original_position":38,"commit_id":"cf34302c7d12a2b6824b785f380a80bdc5aea1ee","original_commit_id":"cf34302c7d12a2b6824b785f380a80bdc5aea1ee","user":{"login":"richdougherty","id":14750,"avatar_url":"https://avatars.githubusercontent.com/u/14750?v=3","gravatar_id":"","url":"https://api.github.com/users/richdougherty","html_url":"https://github.com/richdougherty","followers_url":"https://api.github.com/users/richdougherty/followers","following_url":"https://api.github.com/users/richdougherty/following{/other_user}","gists_url":"https://api.github.com/users/richdougherty/gists{/gist_id}","starred_url":"https://api.github.com/users/richdougherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdougherty/subscriptions","organizations_url":"https://api.github.com/users/richdougherty/orgs","repos_url":"https://api.github.com/users/richdougherty/repos","events_url":"https://api.github.com/users/richdougherty/events{/privacy}","received_events_url":"https://api.github.com/users/richdougherty/received_events","type":"User","site_admin":false},"body":"See comment below about samples.","created_at":"2016-08-02T00:18:12Z","updated_at":"2016-08-02T00:18:12Z","html_url":"https://github.com/playframework/playframework/pull/6297#discussion_r73076392","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/6297","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/73076392"},"html":{"href":"https://github.com/playframework/playframework/pull/6297#discussion_r73076392"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6297"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/6297","id":76204725,"html_url":"https://github.com/playframework/playframework/pull/6297","diff_url":"https://github.com/playframework/playframework/pull/6297.diff","patch_url":"https://github.com/playframework/playframework/pull/6297.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/6297","number":6297,"state":"closed","locked":false,"title":"Add some microbenchmarks","user":{"login":"richdougherty","id":14750,"avatar_url":"https://avatars.githubusercontent.com/u/14750?v=3","gravatar_id":"","url":"https://api.github.com/users/richdougherty","html_url":"https://github.com/richdougherty","followers_url":"https://api.github.com/users/richdougherty/followers","following_url":"https://api.github.com/users/richdougherty/following{/other_user}","gists_url":"https://api.github.com/users/richdougherty/gists{/gist_id}","starred_url":"https://api.github.com/users/richdougherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdougherty/subscriptions","organizations_url":"https://api.github.com/users/richdougherty/orgs","repos_url":"https://api.github.com/users/richdougherty/repos","events_url":"https://api.github.com/users/richdougherty/events{/privacy}","received_events_url":"https://api.github.com/users/richdougherty/received_events","type":"User","site_admin":false},"body":"The microbenchmarks have been added in a new Play subproject called Play-Microbenchmark. The microbenchmarks are executed using JMH via the sbt-jmh plugin. They can be run with the `jmh:run` command. I've added a few simple benchmarks to show how they are implemented.\r\n\r\nCc @gmethvin, @wsargent, @ktoso.","created_at":"2016-07-04T23:13:26Z","updated_at":"2016-08-02T00:18:12Z","closed_at":"2016-07-07T05:18:12Z","merged_at":"2016-07-07T05:18:12Z","merge_commit_sha":"07decc90c5712ba756a36d5d75f498c2c72fd8ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/6297/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/6297/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/6297/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/cf34302c7d12a2b6824b785f380a80bdc5aea1ee","head":{"label":"richdougherty:microbenchmark","ref":"microbenchmark","sha":"cf34302c7d12a2b6824b785f380a80bdc5aea1ee","user":{"login":"richdougherty","id":14750,"avatar_url":"https://avatars.githubusercontent.com/u/14750?v=3","gravatar_id":"","url":"https://api.github.com/users/richdougherty","html_url":"https://github.com/richdougherty","followers_url":"https://api.github.com/users/richdougherty/followers","following_url":"https://api.github.com/users/richdougherty/following{/other_user}","gists_url":"https://api.github.com/users/richdougherty/gists{/gist_id}","starred_url":"https://api.github.com/users/richdougherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdougherty/subscriptions","organizations_url":"https://api.github.com/users/richdougherty/orgs","repos_url":"https://api.github.com/users/richdougherty/repos","events_url":"https://api.github.com/users/richdougherty/events{/privacy}","received_events_url":"https://api.github.com/users/richdougherty/received_events","type":"User","site_admin":false},"repo":{"id":8997972,"name":"playframework","full_name":"richdougherty/playframework","owner":{"login":"richdougherty","id":14750,"avatar_url":"https://avatars.githubusercontent.com/u/14750?v=3","gravatar_id":"","url":"https://api.github.com/users/richdougherty","html_url":"https://github.com/richdougherty","followers_url":"https://api.github.com/users/richdougherty/followers","following_url":"https://api.github.com/users/richdougherty/following{/other_user}","gists_url":"https://api.github.com/users/richdougherty/gists{/gist_id}","starred_url":"https://api.github.com/users/richdougherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdougherty/subscriptions","organizations_url":"https://api.github.com/users/richdougherty/orgs","repos_url":"https://api.github.com/users/richdougherty/repos","events_url":"https://api.github.com/users/richdougherty/events{/privacy}","received_events_url":"https://api.github.com/users/richdougherty/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richdougherty/playframework","description":"Play Framework","fork":true,"url":"https://api.github.com/repos/richdougherty/playframework","forks_url":"https://api.github.com/repos/richdougherty/playframework/forks","keys_url":"https://api.github.com/repos/richdougherty/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richdougherty/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richdougherty/playframework/teams","hooks_url":"https://api.github.com/repos/richdougherty/playframework/hooks","issue_events_url":"https://api.github.com/repos/richdougherty/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/richdougherty/playframework/events","assignees_url":"https://api.github.com/repos/richdougherty/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/richdougherty/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/richdougherty/playframework/tags","blobs_url":"https://api.github.com/repos/richdougherty/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richdougherty/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richdougherty/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/richdougherty/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richdougherty/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/richdougherty/playframework/languages","stargazers_url":"https://api.github.com/repos/richdougherty/playframework/stargazers","contributors_url":"https://api.github.com/repos/richdougherty/playframework/contributors","subscribers_url":"https://api.github.com/repos/richdougherty/playframework/subscribers","subscription_url":"https://api.github.com/repos/richdougherty/playframework/subscription","commits_url":"https://api.github.com/repos/richdougherty/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/richdougherty/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/richdougherty/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/richdougherty/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/richdougherty/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/richdougherty/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richdougherty/playframework/merges","archive_url":"https://api.github.com/repos/richdougherty/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richdougherty/playframework/downloads","issues_url":"https://api.github.com/repos/richdougherty/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/richdougherty/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/richdougherty/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/richdougherty/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richdougherty/playframework/labels{/name}","releases_url":"https://api.github.com/repos/richdougherty/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/richdougherty/playframework/deployments","created_at":"2013-03-25T03:20:47Z","updated_at":"2015-04-30T04:45:17Z","pushed_at":"2016-07-13T23:40:39Z","git_url":"git://github.com/richdougherty/playframework.git","ssh_url":"git@github.com:richdougherty/playframework.git","clone_url":"https://github.com/richdougherty/playframework.git","svn_url":"https://github.com/richdougherty/playframework","homepage":"http://www.playframework.org/","size":84732,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"playframework:master","ref":"master","sha":"650f3fdff857433af0c5db353d51aa7c89721a95","user":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2340549,"name":"playframework","full_name":"playframework/playframework","owner":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playframework/playframework","description":"Play Framework","fork":false,"url":"https://api.github.com/repos/playframework/playframework","forks_url":"https://api.github.com/repos/playframework/playframework/forks","keys_url":"https://api.github.com/repos/playframework/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playframework/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playframework/playframework/teams","hooks_url":"https://api.github.com/repos/playframework/playframework/hooks","issue_events_url":"https://api.github.com/repos/playframework/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/playframework/playframework/events","assignees_url":"https://api.github.com/repos/playframework/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/playframework/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/playframework/playframework/tags","blobs_url":"https://api.github.com/repos/playframework/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playframework/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playframework/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/playframework/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/playframework/playframework/languages","stargazers_url":"https://api.github.com/repos/playframework/playframework/stargazers","contributors_url":"https://api.github.com/repos/playframework/playframework/contributors","subscribers_url":"https://api.github.com/repos/playframework/playframework/subscribers","subscription_url":"https://api.github.com/repos/playframework/playframework/subscription","commits_url":"https://api.github.com/repos/playframework/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/playframework/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/playframework/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/playframework/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/playframework/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/playframework/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playframework/playframework/merges","archive_url":"https://api.github.com/repos/playframework/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playframework/playframework/downloads","issues_url":"https://api.github.com/repos/playframework/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/playframework/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/playframework/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/playframework/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playframework/playframework/labels{/name}","releases_url":"https://api.github.com/repos/playframework/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/playframework/playframework/deployments","created_at":"2011-09-07T09:24:08Z","updated_at":"2016-08-02T00:15:47Z","pushed_at":"2016-08-01T22:24:10Z","git_url":"git://github.com/playframework/playframework.git","ssh_url":"git@github.com:playframework/playframework.git","clone_url":"https://github.com/playframework/playframework.git","svn_url":"https://github.com/playframework/playframework","homepage":"http://www.playframework.com/","size":94026,"stargazers_count":8176,"watchers_count":8176,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2825,"mirror_url":null,"open_issues_count":297,"forks":2825,"open_issues":297,"watchers":8176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6297"},"html":{"href":"https://github.com/playframework/playframework/pull/6297"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/6297"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/6297/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6297/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6297/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/cf34302c7d12a2b6824b785f380a80bdc5aea1ee"}}}}
{"actor":{"display_login":"richdougherty"}}