{"action":"created","comment":{"url":"https://api.github.com/repos/fortio/fortio/pulls/comments/303619582","pull_request_review_id":262054368,"id":303619582,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMzYxOTU4Mg==","diff_hunk":"@@ -308,6 +311,50 @@ func (e *HistogramData) CalcPercentile(percentile float64) float64 {\n \treturn e.Max // not reached\n }\n \n+func sumOfSquares(stdev float64, sum float64, count int64) float64 {\n+\tfC := float64(count)\n+\tvariance := math.Pow(stdev, 2)\n+\n+\tret := (variance * fC) + (sum * sum / fC)\n+\treturn ret\n+}\n+\n+func indexSlice(slice []int32, value int32) int {\n+\tfor p, v := range slice {\n+\t\tif v == value {\n+\t\t\treturn p\n+\t\t}\n+\t}\n+\treturn -1\n+}\n+\n+// Import translate the external representation of the histogram data in\n+// an internally usable one.\n+func (histData *HistogramData) Import() *Histogram {","path":"stats/stats.go","position":33,"original_position":33,"commit_id":"8dce3861289cacb9349f0da1adc6bc39fcb8dd36","original_commit_id":"8dce3861289cacb9349f0da1adc6bc39fcb8dd36","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"receiver name histData should be consistent with previous receiver name e for HistogramData","created_at":"2019-07-15T20:24:43Z","updated_at":"2019-07-15T20:24:44Z","html_url":"https://github.com/fortio/fortio/pull/345#discussion_r303619582","pull_request_url":"https://api.github.com/repos/fortio/fortio/pulls/345","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/fortio/fortio/pulls/comments/303619582"},"html":{"href":"https://github.com/fortio/fortio/pull/345#discussion_r303619582"},"pull_request":{"href":"https://api.github.com/repos/fortio/fortio/pulls/345"}}},"pull_request":{"url":"https://api.github.com/repos/fortio/fortio/pulls/345","id":297773477,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk3NzczNDc3","html_url":"https://github.com/fortio/fortio/pull/345","diff_url":"https://github.com/fortio/fortio/pull/345.diff","patch_url":"https://github.com/fortio/fortio/pull/345.patch","issue_url":"https://api.github.com/repos/fortio/fortio/issues/345","number":345,"state":"open","locked":false,"title":"Added Merging Functionality","user":{"login":"saimsalman36","id":15901862,"node_id":"MDQ6VXNlcjE1OTAxODYy","avatar_url":"https://avatars3.githubusercontent.com/u/15901862?v=4","gravatar_id":"","url":"https://api.github.com/users/saimsalman36","html_url":"https://github.com/saimsalman36","followers_url":"https://api.github.com/users/saimsalman36/followers","following_url":"https://api.github.com/users/saimsalman36/following{/other_user}","gists_url":"https://api.github.com/users/saimsalman36/gists{/gist_id}","starred_url":"https://api.github.com/users/saimsalman36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saimsalman36/subscriptions","organizations_url":"https://api.github.com/users/saimsalman36/orgs","repos_url":"https://api.github.com/users/saimsalman36/repos","events_url":"https://api.github.com/users/saimsalman36/events{/privacy}","received_events_url":"https://api.github.com/users/saimsalman36/received_events","type":"User","site_admin":false},"body":"Addresses Issues (https://github.com/fortio/fortio/issues/99, https://github.com/fortio/fortio/issues/134). Adds the functionality to merge multiple fortio json outputs. \r\n\r\nExample: `fortio merge -json \"MergedResults.json\" -files Result1.json,Result2.json,Result3.json`\r\n\r\n1. To enable the merging functionality I had to include the `Offset` and `Divider` variables in the json output to recover the original Histogram from the result.\r\n2. To calculate the Duration I add up all the Durations in the individual files. It might be better to take the average.\r\n","created_at":"2019-07-15T20:23:50Z","updated_at":"2019-07-15T20:24:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81e68594aeb149ba6d6be742732881b6fb99e5a2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fortio/fortio/pulls/345/commits","review_comments_url":"https://api.github.com/repos/fortio/fortio/pulls/345/comments","review_comment_url":"https://api.github.com/repos/fortio/fortio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fortio/fortio/issues/345/comments","statuses_url":"https://api.github.com/repos/fortio/fortio/statuses/8dce3861289cacb9349f0da1adc6bc39fcb8dd36","head":{"label":"saimsalman36:master","ref":"master","sha":"8dce3861289cacb9349f0da1adc6bc39fcb8dd36","user":{"login":"saimsalman36","id":15901862,"node_id":"MDQ6VXNlcjE1OTAxODYy","avatar_url":"https://avatars3.githubusercontent.com/u/15901862?v=4","gravatar_id":"","url":"https://api.github.com/users/saimsalman36","html_url":"https://github.com/saimsalman36","followers_url":"https://api.github.com/users/saimsalman36/followers","following_url":"https://api.github.com/users/saimsalman36/following{/other_user}","gists_url":"https://api.github.com/users/saimsalman36/gists{/gist_id}","starred_url":"https://api.github.com/users/saimsalman36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saimsalman36/subscriptions","organizations_url":"https://api.github.com/users/saimsalman36/orgs","repos_url":"https://api.github.com/users/saimsalman36/repos","events_url":"https://api.github.com/users/saimsalman36/events{/privacy}","received_events_url":"https://api.github.com/users/saimsalman36/received_events","type":"User","site_admin":false},"repo":{"id":196785747,"node_id":"MDEwOlJlcG9zaXRvcnkxOTY3ODU3NDc=","name":"fortio","full_name":"saimsalman36/fortio","private":false,"owner":{"login":"saimsalman36","id":15901862,"node_id":"MDQ6VXNlcjE1OTAxODYy","avatar_url":"https://avatars3.githubusercontent.com/u/15901862?v=4","gravatar_id":"","url":"https://api.github.com/users/saimsalman36","html_url":"https://github.com/saimsalman36","followers_url":"https://api.github.com/users/saimsalman36/followers","following_url":"https://api.github.com/users/saimsalman36/following{/other_user}","gists_url":"https://api.github.com/users/saimsalman36/gists{/gist_id}","starred_url":"https://api.github.com/users/saimsalman36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saimsalman36/subscriptions","organizations_url":"https://api.github.com/users/saimsalman36/orgs","repos_url":"https://api.github.com/users/saimsalman36/repos","events_url":"https://api.github.com/users/saimsalman36/events{/privacy}","received_events_url":"https://api.github.com/users/saimsalman36/received_events","type":"User","site_admin":false},"html_url":"https://github.com/saimsalman36/fortio","description":"Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.","fork":true,"url":"https://api.github.com/repos/saimsalman36/fortio","forks_url":"https://api.github.com/repos/saimsalman36/fortio/forks","keys_url":"https://api.github.com/repos/saimsalman36/fortio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saimsalman36/fortio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saimsalman36/fortio/teams","hooks_url":"https://api.github.com/repos/saimsalman36/fortio/hooks","issue_events_url":"https://api.github.com/repos/saimsalman36/fortio/issues/events{/number}","events_url":"https://api.github.com/repos/saimsalman36/fortio/events","assignees_url":"https://api.github.com/repos/saimsalman36/fortio/assignees{/user}","branches_url":"https://api.github.com/repos/saimsalman36/fortio/branches{/branch}","tags_url":"https://api.github.com/repos/saimsalman36/fortio/tags","blobs_url":"https://api.github.com/repos/saimsalman36/fortio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saimsalman36/fortio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saimsalman36/fortio/git/refs{/sha}","trees_url":"https://api.github.com/repos/saimsalman36/fortio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saimsalman36/fortio/statuses/{sha}","languages_url":"https://api.github.com/repos/saimsalman36/fortio/languages","stargazers_url":"https://api.github.com/repos/saimsalman36/fortio/stargazers","contributors_url":"https://api.github.com/repos/saimsalman36/fortio/contributors","subscribers_url":"https://api.github.com/repos/saimsalman36/fortio/subscribers","subscription_url":"https://api.github.com/repos/saimsalman36/fortio/subscription","commits_url":"https://api.github.com/repos/saimsalman36/fortio/commits{/sha}","git_commits_url":"https://api.github.com/repos/saimsalman36/fortio/git/commits{/sha}","comments_url":"https://api.github.com/repos/saimsalman36/fortio/comments{/number}","issue_comment_url":"https://api.github.com/repos/saimsalman36/fortio/issues/comments{/number}","contents_url":"https://api.github.com/repos/saimsalman36/fortio/contents/{+path}","compare_url":"https://api.github.com/repos/saimsalman36/fortio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saimsalman36/fortio/merges","archive_url":"https://api.github.com/repos/saimsalman36/fortio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saimsalman36/fortio/downloads","issues_url":"https://api.github.com/repos/saimsalman36/fortio/issues{/number}","pulls_url":"https://api.github.com/repos/saimsalman36/fortio/pulls{/number}","milestones_url":"https://api.github.com/repos/saimsalman36/fortio/milestones{/number}","notifications_url":"https://api.github.com/repos/saimsalman36/fortio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saimsalman36/fortio/labels{/name}","releases_url":"https://api.github.com/repos/saimsalman36/fortio/releases{/id}","deployments_url":"https://api.github.com/repos/saimsalman36/fortio/deployments","created_at":"2019-07-14T02:36:09Z","updated_at":"2019-07-15T19:49:56Z","pushed_at":"2019-07-15T19:49:54Z","git_url":"git://github.com/saimsalman36/fortio.git","ssh_url":"git@github.com:saimsalman36/fortio.git","clone_url":"https://github.com/saimsalman36/fortio.git","svn_url":"https://github.com/saimsalman36/fortio","homepage":"https://fortio.org","size":1213,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fortio:master","ref":"master","sha":"f8f17fa310d60960f8267e1625231cf6e5ce459d","user":{"login":"fortio","id":32624974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjI0OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/32624974?v=4","gravatar_id":"","url":"https://api.github.com/users/fortio","html_url":"https://github.com/fortio","followers_url":"https://api.github.com/users/fortio/followers","following_url":"https://api.github.com/users/fortio/following{/other_user}","gists_url":"https://api.github.com/users/fortio/gists{/gist_id}","starred_url":"https://api.github.com/users/fortio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fortio/subscriptions","organizations_url":"https://api.github.com/users/fortio/orgs","repos_url":"https://api.github.com/users/fortio/repos","events_url":"https://api.github.com/users/fortio/events{/privacy}","received_events_url":"https://api.github.com/users/fortio/received_events","type":"Organization","site_admin":false},"repo":{"id":106351459,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNTE0NTk=","name":"fortio","full_name":"fortio/fortio","private":false,"owner":{"login":"fortio","id":32624974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjI0OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/32624974?v=4","gravatar_id":"","url":"https://api.github.com/users/fortio","html_url":"https://github.com/fortio","followers_url":"https://api.github.com/users/fortio/followers","following_url":"https://api.github.com/users/fortio/following{/other_user}","gists_url":"https://api.github.com/users/fortio/gists{/gist_id}","starred_url":"https://api.github.com/users/fortio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fortio/subscriptions","organizations_url":"https://api.github.com/users/fortio/orgs","repos_url":"https://api.github.com/users/fortio/repos","events_url":"https://api.github.com/users/fortio/events{/privacy}","received_events_url":"https://api.github.com/users/fortio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fortio/fortio","description":"Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.","fork":false,"url":"https://api.github.com/repos/fortio/fortio","forks_url":"https://api.github.com/repos/fortio/fortio/forks","keys_url":"https://api.github.com/repos/fortio/fortio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fortio/fortio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fortio/fortio/teams","hooks_url":"https://api.github.com/repos/fortio/fortio/hooks","issue_events_url":"https://api.github.com/repos/fortio/fortio/issues/events{/number}","events_url":"https://api.github.com/repos/fortio/fortio/events","assignees_url":"https://api.github.com/repos/fortio/fortio/assignees{/user}","branches_url":"https://api.github.com/repos/fortio/fortio/branches{/branch}","tags_url":"https://api.github.com/repos/fortio/fortio/tags","blobs_url":"https://api.github.com/repos/fortio/fortio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fortio/fortio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fortio/fortio/git/refs{/sha}","trees_url":"https://api.github.com/repos/fortio/fortio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fortio/fortio/statuses/{sha}","languages_url":"https://api.github.com/repos/fortio/fortio/languages","stargazers_url":"https://api.github.com/repos/fortio/fortio/stargazers","contributors_url":"https://api.github.com/repos/fortio/fortio/contributors","subscribers_url":"https://api.github.com/repos/fortio/fortio/subscribers","subscription_url":"https://api.github.com/repos/fortio/fortio/subscription","commits_url":"https://api.github.com/repos/fortio/fortio/commits{/sha}","git_commits_url":"https://api.github.com/repos/fortio/fortio/git/commits{/sha}","comments_url":"https://api.github.com/repos/fortio/fortio/comments{/number}","issue_comment_url":"https://api.github.com/repos/fortio/fortio/issues/comments{/number}","contents_url":"https://api.github.com/repos/fortio/fortio/contents/{+path}","compare_url":"https://api.github.com/repos/fortio/fortio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fortio/fortio/merges","archive_url":"https://api.github.com/repos/fortio/fortio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fortio/fortio/downloads","issues_url":"https://api.github.com/repos/fortio/fortio/issues{/number}","pulls_url":"https://api.github.com/repos/fortio/fortio/pulls{/number}","milestones_url":"https://api.github.com/repos/fortio/fortio/milestones{/number}","notifications_url":"https://api.github.com/repos/fortio/fortio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fortio/fortio/labels{/name}","releases_url":"https://api.github.com/repos/fortio/fortio/releases{/id}","deployments_url":"https://api.github.com/repos/fortio/fortio/deployments","created_at":"2017-10-10T01:01:39Z","updated_at":"2019-07-15T13:25:35Z","pushed_at":"2019-07-15T20:23:51Z","git_url":"git://github.com/fortio/fortio.git","ssh_url":"git@github.com:fortio/fortio.git","clone_url":"https://github.com/fortio/fortio.git","svn_url":"https://github.com/fortio/fortio","homepage":"https://fortio.org","size":1174,"stargazers_count":849,"watchers_count":849,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":62,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":69,"open_issues":62,"watchers":849,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fortio/fortio/pulls/345"},"html":{"href":"https://github.com/fortio/fortio/pull/345"},"issue":{"href":"https://api.github.com/repos/fortio/fortio/issues/345"},"comments":{"href":"https://api.github.com/repos/fortio/fortio/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/fortio/fortio/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/fortio/fortio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fortio/fortio/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/fortio/fortio/statuses/8dce3861289cacb9349f0da1adc6bc39fcb8dd36"}},"author_association":"NONE"}}
{"actor":{"display_login":"codeclimate"}}