{"action":"created","comment":{"url":"https://api.github.com/repos/kbacha/rench/pulls/comments/165435464","pull_request_review_id":93375042,"id":165435464,"diff_hunk":"@@ -0,0 +1,91 @@\n+pub struct Chart {\n+    height: u32,\n+    fill: char,\n+    space: char,\n+}\n+\n+impl Chart {\n+    pub fn new() -> Chart {\n+        Chart {\n+            height: 10,\n+            fill: '▌',\n+            space: ' ',\n+        }\n+    }\n+\n+    pub fn height(mut self, h: u32) -> Chart {\n+        self.height = h;\n+        self\n+    }\n+\n+    pub fn make<N>(&self, data: Vec<N>) -> String\n+    where\n+        N: Into<f64>,\n+    {\n+        let data: Vec<f64> = data.into_iter().map(|d| d.into()).collect();\n+        let (min, max): (f64, f64) = data.iter().fold((0., 0.), |(min, max), datum| {\n+            let datum = datum.clone();\n+            (\n+                if datum < min { datum } else { min },\n+                if max < datum { datum } else { max },\n+            )\n+        });\n+        let row_increment = (max - min) / self.height as f64;\n+        let mut ret = String::with_capacity(self.height as usize * data.len());\n+        for row in 0..self.height {","path":"src/chart.rs","position":35,"original_position":35,"commit_id":"ae00f81684fddf2bb2e4693633c486d5eaad6f2c","original_commit_id":"ae00f81684fddf2bb2e4693633c486d5eaad6f2c","user":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"body":"perhaps, not sure that improves readability.","created_at":"2018-02-01T17:49:24Z","updated_at":"2018-02-01T17:49:24Z","html_url":"https://github.com/kbacha/rench/pull/9#discussion_r165435464","pull_request_url":"https://api.github.com/repos/kbacha/rench/pulls/9","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/kbacha/rench/pulls/comments/165435464"},"html":{"href":"https://github.com/kbacha/rench/pull/9#discussion_r165435464"},"pull_request":{"href":"https://api.github.com/repos/kbacha/rench/pulls/9"}},"in_reply_to_id":165434941},"pull_request":{"url":"https://api.github.com/repos/kbacha/rench/pulls/9","id":166606094,"html_url":"https://github.com/kbacha/rench/pull/9","diff_url":"https://github.com/kbacha/rench/pull/9.diff","patch_url":"https://github.com/kbacha/rench/pull/9.patch","issue_url":"https://api.github.com/repos/kbacha/rench/issues/9","number":9,"state":"open","locked":false,"title":"Add percentiles as a chart","user":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"body":"```\r\n$ ./target/release/rench -c 7 -n 10000 http://0.0.0.0:6768/api/release-name/abc\r\nBeginning requests\r\n1000 requests\r\n2000 requests\r\n3000 requests\r\n4000 requests\r\n5000 requests\r\n6000 requests\r\n7000 requests\r\n8000 requests\r\n9000 requests\r\nFinished!\r\n\r\nTook 0.66941569 seconds\r\n14938.400980712 requests / second\r\n\r\nSummary\r\n  Average:   0.451604 ms\r\n  Median:    0.431447 ms\r\n  Longest:   1.882176 ms\r\n  Shortest:  0.311665 ms\r\n  Requests:  9996\r\n\r\nLatency Percentiles:\r\n                                                                                                   ▌ 0.841882\r\n                                                                                                  ▌▌\r\n                                                                                                ▌▌▌▌\r\n                                                                                     ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n                                           ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌\r\n▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ 0\r\n```","created_at":"2018-02-01T17:43:40Z","updated_at":"2018-02-01T17:49:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cb8420b3cb91b1bc155597ecb98780f48cbd231","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/kbacha/rench/pulls/9/commits","review_comments_url":"https://api.github.com/repos/kbacha/rench/pulls/9/comments","review_comment_url":"https://api.github.com/repos/kbacha/rench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kbacha/rench/issues/9/comments","statuses_url":"https://api.github.com/repos/kbacha/rench/statuses/ae00f81684fddf2bb2e4693633c486d5eaad6f2c","head":{"label":"kbacha:add-percentile-chart","ref":"add-percentile-chart","sha":"ae00f81684fddf2bb2e4693633c486d5eaad6f2c","user":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"repo":{"id":118643083,"name":"rench","full_name":"kbacha/rench","owner":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbacha/rench","description":null,"fork":false,"url":"https://api.github.com/repos/kbacha/rench","forks_url":"https://api.github.com/repos/kbacha/rench/forks","keys_url":"https://api.github.com/repos/kbacha/rench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbacha/rench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbacha/rench/teams","hooks_url":"https://api.github.com/repos/kbacha/rench/hooks","issue_events_url":"https://api.github.com/repos/kbacha/rench/issues/events{/number}","events_url":"https://api.github.com/repos/kbacha/rench/events","assignees_url":"https://api.github.com/repos/kbacha/rench/assignees{/user}","branches_url":"https://api.github.com/repos/kbacha/rench/branches{/branch}","tags_url":"https://api.github.com/repos/kbacha/rench/tags","blobs_url":"https://api.github.com/repos/kbacha/rench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbacha/rench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbacha/rench/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbacha/rench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbacha/rench/statuses/{sha}","languages_url":"https://api.github.com/repos/kbacha/rench/languages","stargazers_url":"https://api.github.com/repos/kbacha/rench/stargazers","contributors_url":"https://api.github.com/repos/kbacha/rench/contributors","subscribers_url":"https://api.github.com/repos/kbacha/rench/subscribers","subscription_url":"https://api.github.com/repos/kbacha/rench/subscription","commits_url":"https://api.github.com/repos/kbacha/rench/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbacha/rench/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbacha/rench/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbacha/rench/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbacha/rench/contents/{+path}","compare_url":"https://api.github.com/repos/kbacha/rench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbacha/rench/merges","archive_url":"https://api.github.com/repos/kbacha/rench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbacha/rench/downloads","issues_url":"https://api.github.com/repos/kbacha/rench/issues{/number}","pulls_url":"https://api.github.com/repos/kbacha/rench/pulls{/number}","milestones_url":"https://api.github.com/repos/kbacha/rench/milestones{/number}","notifications_url":"https://api.github.com/repos/kbacha/rench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbacha/rench/labels{/name}","releases_url":"https://api.github.com/repos/kbacha/rench/releases{/id}","deployments_url":"https://api.github.com/repos/kbacha/rench/deployments","created_at":"2018-01-23T17:15:03Z","updated_at":"2018-02-01T00:15:12Z","pushed_at":"2018-02-01T17:43:40Z","git_url":"git://github.com/kbacha/rench.git","ssh_url":"git@github.com:kbacha/rench.git","clone_url":"https://github.com/kbacha/rench.git","svn_url":"https://github.com/kbacha/rench","homepage":null,"size":20,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"kbacha:master","ref":"master","sha":"d714028d77aca2e29fc63de748ceb41e9a0e6999","user":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"repo":{"id":118643083,"name":"rench","full_name":"kbacha/rench","owner":{"login":"kbacha","id":2043529,"avatar_url":"https://avatars0.githubusercontent.com/u/2043529?v=4","gravatar_id":"","url":"https://api.github.com/users/kbacha","html_url":"https://github.com/kbacha","followers_url":"https://api.github.com/users/kbacha/followers","following_url":"https://api.github.com/users/kbacha/following{/other_user}","gists_url":"https://api.github.com/users/kbacha/gists{/gist_id}","starred_url":"https://api.github.com/users/kbacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbacha/subscriptions","organizations_url":"https://api.github.com/users/kbacha/orgs","repos_url":"https://api.github.com/users/kbacha/repos","events_url":"https://api.github.com/users/kbacha/events{/privacy}","received_events_url":"https://api.github.com/users/kbacha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbacha/rench","description":null,"fork":false,"url":"https://api.github.com/repos/kbacha/rench","forks_url":"https://api.github.com/repos/kbacha/rench/forks","keys_url":"https://api.github.com/repos/kbacha/rench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbacha/rench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbacha/rench/teams","hooks_url":"https://api.github.com/repos/kbacha/rench/hooks","issue_events_url":"https://api.github.com/repos/kbacha/rench/issues/events{/number}","events_url":"https://api.github.com/repos/kbacha/rench/events","assignees_url":"https://api.github.com/repos/kbacha/rench/assignees{/user}","branches_url":"https://api.github.com/repos/kbacha/rench/branches{/branch}","tags_url":"https://api.github.com/repos/kbacha/rench/tags","blobs_url":"https://api.github.com/repos/kbacha/rench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbacha/rench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbacha/rench/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbacha/rench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbacha/rench/statuses/{sha}","languages_url":"https://api.github.com/repos/kbacha/rench/languages","stargazers_url":"https://api.github.com/repos/kbacha/rench/stargazers","contributors_url":"https://api.github.com/repos/kbacha/rench/contributors","subscribers_url":"https://api.github.com/repos/kbacha/rench/subscribers","subscription_url":"https://api.github.com/repos/kbacha/rench/subscription","commits_url":"https://api.github.com/repos/kbacha/rench/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbacha/rench/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbacha/rench/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbacha/rench/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbacha/rench/contents/{+path}","compare_url":"https://api.github.com/repos/kbacha/rench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbacha/rench/merges","archive_url":"https://api.github.com/repos/kbacha/rench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbacha/rench/downloads","issues_url":"https://api.github.com/repos/kbacha/rench/issues{/number}","pulls_url":"https://api.github.com/repos/kbacha/rench/pulls{/number}","milestones_url":"https://api.github.com/repos/kbacha/rench/milestones{/number}","notifications_url":"https://api.github.com/repos/kbacha/rench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbacha/rench/labels{/name}","releases_url":"https://api.github.com/repos/kbacha/rench/releases{/id}","deployments_url":"https://api.github.com/repos/kbacha/rench/deployments","created_at":"2018-01-23T17:15:03Z","updated_at":"2018-02-01T00:15:12Z","pushed_at":"2018-02-01T17:43:40Z","git_url":"git://github.com/kbacha/rench.git","ssh_url":"git@github.com:kbacha/rench.git","clone_url":"https://github.com/kbacha/rench.git","svn_url":"https://github.com/kbacha/rench","homepage":null,"size":20,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kbacha/rench/pulls/9"},"html":{"href":"https://github.com/kbacha/rench/pull/9"},"issue":{"href":"https://api.github.com/repos/kbacha/rench/issues/9"},"comments":{"href":"https://api.github.com/repos/kbacha/rench/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/kbacha/rench/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/kbacha/rench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kbacha/rench/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/kbacha/rench/statuses/ae00f81684fddf2bb2e4693633c486d5eaad6f2c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kbacha"}}