{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/beats/pulls/comments/46997935","id":46997935,"diff_hunk":"@@ -169,22 +193,24 @@ func (*parser) parseHTTPLine(s *stream, m *message) (cont, ok, complete bool) {\n \treturn true, true, true\n }\n \n-func parseResponseStatus(s []byte) (uint16, string, error) {\n-\tdebugf(\"parseResponseStatus: %s\", s)\n+func parseResponseStatus(s []byte) (uint16, []byte, error) {\n+\tif isDebug {\n+\t\tdebugf(\"parseResponseStatus: %s\", s)\n+\t}\n \n-\tp := bytes.Index(s, []byte(\" \"))\n+\tp := bytes.IndexByte(s, ' ')\n \tif p == -1 {\n-\t\treturn 0, \"\", errors.New(\"Not beeing able to identify status code\")\n+\t\treturn 0, nil, errors.New(\"Not beeing able to identify status code\")","path":"packetbeat/protos/http/http_parser.go","position":155,"original_position":155,"commit_id":"9e16878cd81f33aef7a81cfadecfdf6f8484cc6d","original_commit_id":"9e16878cd81f33aef7a81cfadecfdf6f8484cc6d","user":{"login":"andrewkroh","id":4565752,"avatar_url":"https://avatars.githubusercontent.com/u/4565752?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewkroh","html_url":"https://github.com/andrewkroh","followers_url":"https://api.github.com/users/andrewkroh/followers","following_url":"https://api.github.com/users/andrewkroh/following{/other_user}","gists_url":"https://api.github.com/users/andrewkroh/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewkroh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewkroh/subscriptions","organizations_url":"https://api.github.com/users/andrewkroh/orgs","repos_url":"https://api.github.com/users/andrewkroh/repos","events_url":"https://api.github.com/users/andrewkroh/events{/privacy}","received_events_url":"https://api.github.com/users/andrewkroh/received_events","type":"User","site_admin":false},"body":"Not new, but \"beeing\" and spelled wrong and can just be dropped form the message. It can be fixed at other time and PR.","created_at":"2015-12-08T19:06:38Z","updated_at":"2015-12-08T19:06:38Z","html_url":"https://github.com/elastic/beats/pull/468#discussion_r46997935","pull_request_url":"https://api.github.com/repos/elastic/beats/pulls/468","_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments/46997935"},"html":{"href":"https://github.com/elastic/beats/pull/468#discussion_r46997935"},"pull_request":{"href":"https://api.github.com/repos/elastic/beats/pulls/468"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/468","id":52912524,"html_url":"https://github.com/elastic/beats/pull/468","diff_url":"https://github.com/elastic/beats/pull/468.diff","patch_url":"https://github.com/elastic/beats/pull/468.patch","issue_url":"https://api.github.com/repos/elastic/beats/issues/468","number":468,"state":"open","locked":false,"title":"http parser performance","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"body":"requires #442 and #453 + some rebase and history updated after merging these two.\r\n\r\nReduce allocations in http parser.\r\n\r\nbenchmarks:\r\n\r\n    original:\r\n    BenchmarkHTTPSimpleResponse-4   \t  100000\t     15197 ns/op\t    3552 B/op\t     140 allocs/op\r\n    BenchmarkHTTPSimpleRequest-4    \t  100000\t     17538 ns/op\t    4320 B/op\t     154 allocs/op\r\n    BenchmarkHTTPSplitResponse-4    \t  100000\t     15665 ns/op\t    3840 B/op\t     141 allocs/op\r\n    BenchmarkHttpSimpleTransaction-4\t   30000\t     44417 ns/op\t   11039 B/op\t     348 allocs/op\r\n\r\n    optimized\r\n    BenchmarkHTTPSimpleResponse-4   \t  500000\t      2837 ns/op\t     560 B/op\t       2 allocs/op\r\n    BenchmarkHTTPSimpleRequest-4    \t  500000\t      3217 ns/op\t     640 B/op\t       3 allocs/op\r\n    BenchmarkHTTPSplitResponse-4    \t 1000000\t      3454 ns/op\t     848 B/op\t       3 allocs/op\r\n    BenchmarkHttpSimpleTransaction-4\t  100000\t     17065 ns/op\t    4398 B/op\t      58 allocs/op\r\n","created_at":"2015-12-07T22:44:11Z","updated_at":"2015-12-08T19:06:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8b32edff3d431e1a379af225cf810ad1157fee7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/beats/pulls/468/commits","review_comments_url":"https://api.github.com/repos/elastic/beats/pulls/468/comments","review_comment_url":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/beats/issues/468/comments","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/9e16878cd81f33aef7a81cfadecfdf6f8484cc6d","head":{"label":"urso:enh/http-perf","ref":"enh/http-perf","sha":"9e16878cd81f33aef7a81cfadecfdf6f8484cc6d","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"repo":{"id":40138298,"name":"beats","full_name":"urso/beats","owner":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/urso/beats","description":"Open Source Real-Time Packet Analyzer","fork":true,"url":"https://api.github.com/repos/urso/beats","forks_url":"https://api.github.com/repos/urso/beats/forks","keys_url":"https://api.github.com/repos/urso/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urso/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urso/beats/teams","hooks_url":"https://api.github.com/repos/urso/beats/hooks","issue_events_url":"https://api.github.com/repos/urso/beats/issues/events{/number}","events_url":"https://api.github.com/repos/urso/beats/events","assignees_url":"https://api.github.com/repos/urso/beats/assignees{/user}","branches_url":"https://api.github.com/repos/urso/beats/branches{/branch}","tags_url":"https://api.github.com/repos/urso/beats/tags","blobs_url":"https://api.github.com/repos/urso/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urso/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urso/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/urso/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urso/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/urso/beats/languages","stargazers_url":"https://api.github.com/repos/urso/beats/stargazers","contributors_url":"https://api.github.com/repos/urso/beats/contributors","subscribers_url":"https://api.github.com/repos/urso/beats/subscribers","subscription_url":"https://api.github.com/repos/urso/beats/subscription","commits_url":"https://api.github.com/repos/urso/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/urso/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/urso/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/urso/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/urso/beats/contents/{+path}","compare_url":"https://api.github.com/repos/urso/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urso/beats/merges","archive_url":"https://api.github.com/repos/urso/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urso/beats/downloads","issues_url":"https://api.github.com/repos/urso/beats/issues{/number}","pulls_url":"https://api.github.com/repos/urso/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/urso/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/urso/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urso/beats/labels{/name}","releases_url":"https://api.github.com/repos/urso/beats/releases{/id}","created_at":"2015-08-03T17:25:21Z","updated_at":"2015-12-02T21:11:16Z","pushed_at":"2015-12-08T18:46:29Z","git_url":"git://github.com/urso/beats.git","ssh_url":"git@github.com:urso/beats.git","clone_url":"https://github.com/urso/beats.git","svn_url":"https://github.com/urso/beats","homepage":"https://www.elastic.co/products/beats/packetbeat","size":23274,"stargazers_count":0,"watchers_count":0,"language":"Go","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":0,"default_branch":"1.0.0-beta2"}},"base":{"label":"elastic:master","ref":"master","sha":"8a45017bac5aae4317a4c846fb58ac29df29dd1f","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":16554739,"name":"beats","full_name":"elastic/beats","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/beats","description":"Beats - Lightweight shippers for Elasticsearch & Logstash","fork":false,"url":"https://api.github.com/repos/elastic/beats","forks_url":"https://api.github.com/repos/elastic/beats/forks","keys_url":"https://api.github.com/repos/elastic/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/beats/teams","hooks_url":"https://api.github.com/repos/elastic/beats/hooks","issue_events_url":"https://api.github.com/repos/elastic/beats/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/beats/events","assignees_url":"https://api.github.com/repos/elastic/beats/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/beats/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/beats/tags","blobs_url":"https://api.github.com/repos/elastic/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/beats/languages","stargazers_url":"https://api.github.com/repos/elastic/beats/stargazers","contributors_url":"https://api.github.com/repos/elastic/beats/contributors","subscribers_url":"https://api.github.com/repos/elastic/beats/subscribers","subscription_url":"https://api.github.com/repos/elastic/beats/subscription","commits_url":"https://api.github.com/repos/elastic/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/beats/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/beats/merges","archive_url":"https://api.github.com/repos/elastic/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/beats/downloads","issues_url":"https://api.github.com/repos/elastic/beats/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/beats/labels{/name}","releases_url":"https://api.github.com/repos/elastic/beats/releases{/id}","created_at":"2014-02-05T19:01:02Z","updated_at":"2015-12-08T14:34:50Z","pushed_at":"2015-12-08T18:46:29Z","git_url":"git://github.com/elastic/beats.git","ssh_url":"git@github.com:elastic/beats.git","clone_url":"https://github.com/elastic/beats.git","svn_url":"https://github.com/elastic/beats","homepage":"https://www.elastic.co/products/beats","size":25073,"stargazers_count":2070,"watchers_count":2070,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":228,"mirror_url":null,"open_issues_count":93,"forks":228,"open_issues":93,"watchers":2070,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/468"},"html":{"href":"https://github.com/elastic/beats/pull/468"},"issue":{"href":"https://api.github.com/repos/elastic/beats/issues/468"},"comments":{"href":"https://api.github.com/repos/elastic/beats/issues/468/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/beats/pulls/468/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/beats/pulls/468/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/beats/statuses/9e16878cd81f33aef7a81cfadecfdf6f8484cc6d"}}}}