{"action":"created","comment":{"url":"https://api.github.com/repos/canaryio/canary/pulls/comments/30630685","id":30630685,"diff_hunk":"@@ -33,15 +35,13 @@ func (t *Target) SetHash() {\n \n type Sample struct {\n \tStatusCode      int\n-\tT1              time.Time\n-\tT2              time.Time\n-\tResponseHeaders map[string]string\n-}\n-\n-// Latency returns the amount of milliseconds between T1\n-// and T2 (start and finish).\n-func (s Sample) Latency() float64 {\n-\treturn s.T2.Sub(s.T1).Seconds() * 1000\n+\tTimeStart       time.Time\n+\tTimeToConnect   time.Time\n+\tTimeToFirstByte time.Time\n+\tTimeEnd         time.Time","path":"pkg/sampler/sampler.go","position":43,"original_position":43,"commit_id":"043cc8e5c409e3920af54eab708c3a97abc8b2ed","original_commit_id":"043cc8e5c409e3920af54eab708c3a97abc8b2ed","user":{"login":"blalor","id":109915,"avatar_url":"https://avatars.githubusercontent.com/u/109915?v=3","gravatar_id":"","url":"https://api.github.com/users/blalor","html_url":"https://github.com/blalor","followers_url":"https://api.github.com/users/blalor/followers","following_url":"https://api.github.com/users/blalor/following{/other_user}","gists_url":"https://api.github.com/users/blalor/gists{/gist_id}","starred_url":"https://api.github.com/users/blalor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blalor/subscriptions","organizations_url":"https://api.github.com/users/blalor/orgs","repos_url":"https://api.github.com/users/blalor/repos","events_url":"https://api.github.com/users/blalor/events{/privacy}","received_events_url":"https://api.github.com/users/blalor/received_events","type":"User","site_admin":false},"body":"Should these be `time.Duration`?","created_at":"2015-05-19T18:29:16Z","updated_at":"2015-05-19T18:29:16Z","html_url":"https://github.com/canaryio/canary/pull/42#discussion_r30630685","pull_request_url":"https://api.github.com/repos/canaryio/canary/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/canaryio/canary/pulls/comments/30630685"},"html":{"href":"https://github.com/canaryio/canary/pull/42#discussion_r30630685"},"pull_request":{"href":"https://api.github.com/repos/canaryio/canary/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/canaryio/canary/pulls/42","id":35589087,"html_url":"https://github.com/canaryio/canary/pull/42","diff_url":"https://github.com/canaryio/canary/pull/42.diff","patch_url":"https://github.com/canaryio/canary/pull/42.patch","issue_url":"https://api.github.com/repos/canaryio/canary/issues/42","number":42,"state":"closed","locked":false,"title":"introduce a new sampler","user":{"login":"gorsuch","id":148854,"avatar_url":"https://avatars.githubusercontent.com/u/148854?v=3","gravatar_id":"","url":"https://api.github.com/users/gorsuch","html_url":"https://github.com/gorsuch","followers_url":"https://api.github.com/users/gorsuch/followers","following_url":"https://api.github.com/users/gorsuch/following{/other_user}","gists_url":"https://api.github.com/users/gorsuch/gists{/gist_id}","starred_url":"https://api.github.com/users/gorsuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorsuch/subscriptions","organizations_url":"https://api.github.com/users/gorsuch/orgs","repos_url":"https://api.github.com/users/gorsuch/repos","events_url":"https://api.github.com/users/gorsuch/events{/privacy}","received_events_url":"https://api.github.com/users/gorsuch/received_events","type":"User","site_admin":false},"body":"This is a new, arguably simpler, HTTP sampler that implements a very\r\nlightweight HTTP parser.\r\n\r\nIn this changeset we find the following:\r\n\r\n* the sample.Sampler type has been removed in favor of sample.Ping()\r\n* the Sample struct has been updated to return the following additional data\r\n  points:\r\n  - local and remote IP addresses\r\n  - start time\r\n  - time to connect\r\n  - time until first byte\r\n  - finish time\r\n\r\nWhile working on this I discovered a few things I didn't like so much\r\nabout the codebase:\r\n\r\n* use of int in a few places instead of time.Duration\r\n* original error handling in sampler.go feels lousy, my bad\r\n* should be using pointers more instead of passing by value everywhere\r\n* wondering if we can ultimately merge the sampler and sensor\r\n  packages... need to give that more thought\r\n* management of configuration feels convoluted, might be time to refactor some of that","created_at":"2015-05-17T15:58:54Z","updated_at":"2015-05-19T18:29:16Z","closed_at":"2015-05-19T18:24:00Z","merged_at":"2015-05-19T18:24:00Z","merge_commit_sha":"6727c0716ea60085c42fdba8b612e67b56f022b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/canaryio/canary/pulls/42/commits","review_comments_url":"https://api.github.com/repos/canaryio/canary/pulls/42/comments","review_comment_url":"https://api.github.com/repos/canaryio/canary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/canaryio/canary/issues/42/comments","statuses_url":"https://api.github.com/repos/canaryio/canary/statuses/043cc8e5c409e3920af54eab708c3a97abc8b2ed","head":{"label":"canaryio:new-sampler","ref":"new-sampler","sha":"043cc8e5c409e3920af54eab708c3a97abc8b2ed","user":{"login":"canaryio","id":1618471,"avatar_url":"https://avatars.githubusercontent.com/u/1618471?v=3","gravatar_id":"","url":"https://api.github.com/users/canaryio","html_url":"https://github.com/canaryio","followers_url":"https://api.github.com/users/canaryio/followers","following_url":"https://api.github.com/users/canaryio/following{/other_user}","gists_url":"https://api.github.com/users/canaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/canaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canaryio/subscriptions","organizations_url":"https://api.github.com/users/canaryio/orgs","repos_url":"https://api.github.com/users/canaryio/repos","events_url":"https://api.github.com/users/canaryio/events{/privacy}","received_events_url":"https://api.github.com/users/canaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":26513062,"name":"canary","full_name":"canaryio/canary","owner":{"login":"canaryio","id":1618471,"avatar_url":"https://avatars.githubusercontent.com/u/1618471?v=3","gravatar_id":"","url":"https://api.github.com/users/canaryio","html_url":"https://github.com/canaryio","followers_url":"https://api.github.com/users/canaryio/followers","following_url":"https://api.github.com/users/canaryio/following{/other_user}","gists_url":"https://api.github.com/users/canaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/canaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canaryio/subscriptions","organizations_url":"https://api.github.com/users/canaryio/orgs","repos_url":"https://api.github.com/users/canaryio/repos","events_url":"https://api.github.com/users/canaryio/events{/privacy}","received_events_url":"https://api.github.com/users/canaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/canaryio/canary","description":"open monitoring for the open web.","fork":false,"url":"https://api.github.com/repos/canaryio/canary","forks_url":"https://api.github.com/repos/canaryio/canary/forks","keys_url":"https://api.github.com/repos/canaryio/canary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canaryio/canary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canaryio/canary/teams","hooks_url":"https://api.github.com/repos/canaryio/canary/hooks","issue_events_url":"https://api.github.com/repos/canaryio/canary/issues/events{/number}","events_url":"https://api.github.com/repos/canaryio/canary/events","assignees_url":"https://api.github.com/repos/canaryio/canary/assignees{/user}","branches_url":"https://api.github.com/repos/canaryio/canary/branches{/branch}","tags_url":"https://api.github.com/repos/canaryio/canary/tags","blobs_url":"https://api.github.com/repos/canaryio/canary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canaryio/canary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canaryio/canary/git/refs{/sha}","trees_url":"https://api.github.com/repos/canaryio/canary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canaryio/canary/statuses/{sha}","languages_url":"https://api.github.com/repos/canaryio/canary/languages","stargazers_url":"https://api.github.com/repos/canaryio/canary/stargazers","contributors_url":"https://api.github.com/repos/canaryio/canary/contributors","subscribers_url":"https://api.github.com/repos/canaryio/canary/subscribers","subscription_url":"https://api.github.com/repos/canaryio/canary/subscription","commits_url":"https://api.github.com/repos/canaryio/canary/commits{/sha}","git_commits_url":"https://api.github.com/repos/canaryio/canary/git/commits{/sha}","comments_url":"https://api.github.com/repos/canaryio/canary/comments{/number}","issue_comment_url":"https://api.github.com/repos/canaryio/canary/issues/comments{/number}","contents_url":"https://api.github.com/repos/canaryio/canary/contents/{+path}","compare_url":"https://api.github.com/repos/canaryio/canary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canaryio/canary/merges","archive_url":"https://api.github.com/repos/canaryio/canary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canaryio/canary/downloads","issues_url":"https://api.github.com/repos/canaryio/canary/issues{/number}","pulls_url":"https://api.github.com/repos/canaryio/canary/pulls{/number}","milestones_url":"https://api.github.com/repos/canaryio/canary/milestones{/number}","notifications_url":"https://api.github.com/repos/canaryio/canary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canaryio/canary/labels{/name}","releases_url":"https://api.github.com/repos/canaryio/canary/releases{/id}","created_at":"2014-11-12T01:15:00Z","updated_at":"2015-04-19T19:15:31Z","pushed_at":"2015-05-19T18:24:02Z","git_url":"git://github.com/canaryio/canary.git","ssh_url":"git@github.com:canaryio/canary.git","clone_url":"https://github.com/canaryio/canary.git","svn_url":"https://github.com/canaryio/canary","homepage":"","size":1151,"stargazers_count":27,"watchers_count":27,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":27,"default_branch":"master"}},"base":{"label":"canaryio:master","ref":"master","sha":"ecb78dbae39686dbdda0c75a3f09151a1510bb83","user":{"login":"canaryio","id":1618471,"avatar_url":"https://avatars.githubusercontent.com/u/1618471?v=3","gravatar_id":"","url":"https://api.github.com/users/canaryio","html_url":"https://github.com/canaryio","followers_url":"https://api.github.com/users/canaryio/followers","following_url":"https://api.github.com/users/canaryio/following{/other_user}","gists_url":"https://api.github.com/users/canaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/canaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canaryio/subscriptions","organizations_url":"https://api.github.com/users/canaryio/orgs","repos_url":"https://api.github.com/users/canaryio/repos","events_url":"https://api.github.com/users/canaryio/events{/privacy}","received_events_url":"https://api.github.com/users/canaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":26513062,"name":"canary","full_name":"canaryio/canary","owner":{"login":"canaryio","id":1618471,"avatar_url":"https://avatars.githubusercontent.com/u/1618471?v=3","gravatar_id":"","url":"https://api.github.com/users/canaryio","html_url":"https://github.com/canaryio","followers_url":"https://api.github.com/users/canaryio/followers","following_url":"https://api.github.com/users/canaryio/following{/other_user}","gists_url":"https://api.github.com/users/canaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/canaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canaryio/subscriptions","organizations_url":"https://api.github.com/users/canaryio/orgs","repos_url":"https://api.github.com/users/canaryio/repos","events_url":"https://api.github.com/users/canaryio/events{/privacy}","received_events_url":"https://api.github.com/users/canaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/canaryio/canary","description":"open monitoring for the open web.","fork":false,"url":"https://api.github.com/repos/canaryio/canary","forks_url":"https://api.github.com/repos/canaryio/canary/forks","keys_url":"https://api.github.com/repos/canaryio/canary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canaryio/canary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canaryio/canary/teams","hooks_url":"https://api.github.com/repos/canaryio/canary/hooks","issue_events_url":"https://api.github.com/repos/canaryio/canary/issues/events{/number}","events_url":"https://api.github.com/repos/canaryio/canary/events","assignees_url":"https://api.github.com/repos/canaryio/canary/assignees{/user}","branches_url":"https://api.github.com/repos/canaryio/canary/branches{/branch}","tags_url":"https://api.github.com/repos/canaryio/canary/tags","blobs_url":"https://api.github.com/repos/canaryio/canary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canaryio/canary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canaryio/canary/git/refs{/sha}","trees_url":"https://api.github.com/repos/canaryio/canary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canaryio/canary/statuses/{sha}","languages_url":"https://api.github.com/repos/canaryio/canary/languages","stargazers_url":"https://api.github.com/repos/canaryio/canary/stargazers","contributors_url":"https://api.github.com/repos/canaryio/canary/contributors","subscribers_url":"https://api.github.com/repos/canaryio/canary/subscribers","subscription_url":"https://api.github.com/repos/canaryio/canary/subscription","commits_url":"https://api.github.com/repos/canaryio/canary/commits{/sha}","git_commits_url":"https://api.github.com/repos/canaryio/canary/git/commits{/sha}","comments_url":"https://api.github.com/repos/canaryio/canary/comments{/number}","issue_comment_url":"https://api.github.com/repos/canaryio/canary/issues/comments{/number}","contents_url":"https://api.github.com/repos/canaryio/canary/contents/{+path}","compare_url":"https://api.github.com/repos/canaryio/canary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canaryio/canary/merges","archive_url":"https://api.github.com/repos/canaryio/canary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canaryio/canary/downloads","issues_url":"https://api.github.com/repos/canaryio/canary/issues{/number}","pulls_url":"https://api.github.com/repos/canaryio/canary/pulls{/number}","milestones_url":"https://api.github.com/repos/canaryio/canary/milestones{/number}","notifications_url":"https://api.github.com/repos/canaryio/canary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canaryio/canary/labels{/name}","releases_url":"https://api.github.com/repos/canaryio/canary/releases{/id}","created_at":"2014-11-12T01:15:00Z","updated_at":"2015-04-19T19:15:31Z","pushed_at":"2015-05-19T18:24:02Z","git_url":"git://github.com/canaryio/canary.git","ssh_url":"git@github.com:canaryio/canary.git","clone_url":"https://github.com/canaryio/canary.git","svn_url":"https://github.com/canaryio/canary","homepage":"","size":1151,"stargazers_count":27,"watchers_count":27,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/canaryio/canary/pulls/42"},"html":{"href":"https://github.com/canaryio/canary/pull/42"},"issue":{"href":"https://api.github.com/repos/canaryio/canary/issues/42"},"comments":{"href":"https://api.github.com/repos/canaryio/canary/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/canaryio/canary/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/canaryio/canary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/canaryio/canary/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/canaryio/canary/statuses/043cc8e5c409e3920af54eab708c3a97abc8b2ed"}}}}