{"action":"created","comment":{"url":"https://api.github.com/repos/edx/locust/pulls/comments/26411341","id":26411341,"diff_hunk":"@@ -392,6 +392,67 @@ def from_dict(cls, data):\n         )\n \n \n+    @classmethod\n+    def get_distribution_stats_csv(cls):\n+        rows = [\",\".join((\n+            '\"Name\"',\n+            '\"# requests\"',\n+            '\"50%\"',\n+            '\"66%\"',\n+            '\"75%\"',\n+            '\"80%\"',\n+            '\"90%\"',\n+            '\"95%\"',\n+            '\"98%\"',\n+            '\"99%\"',\n+            '\"100%\"',\n+        ))]\n+        for s in chain(\n+                (stats for (name, stats) in sorted(cls.requests.iteritems())),\n+                [cls.sum_stats(\"Total\", full_request_history=True)]\n+            ):\n+            if s.num_reqs:\n+                rows.append(s.percentile(tpl='\"%s\",%i,%i,%i,%i,%i,%i,%i,%i,%i,%i'))\n+            else:\n+                rows.append('\"%s\",0,\"N/A\",\"N/A\",\"N/A\",\"N/A\",\"N/A\",\"N/A\",\"N/A\",\"N/A\",\"N/A\"' % s.name)","path":"locust/stats.py","position":26,"original_position":26,"commit_id":"5bfcf3eaea88fd72ee931b4be139b937e6b472f3","original_commit_id":"5bfcf3eaea88fd72ee931b4be139b937e6b472f3","user":{"login":"cgoldberg","id":1113081,"avatar_url":"https://avatars.githubusercontent.com/u/1113081?v=3","gravatar_id":"","url":"https://api.github.com/users/cgoldberg","html_url":"https://github.com/cgoldberg","followers_url":"https://api.github.com/users/cgoldberg/followers","following_url":"https://api.github.com/users/cgoldberg/following{/other_user}","gists_url":"https://api.github.com/users/cgoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/cgoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgoldberg/subscriptions","organizations_url":"https://api.github.com/users/cgoldberg/orgs","repos_url":"https://api.github.com/users/cgoldberg/repos","events_url":"https://api.github.com/users/cgoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/cgoldberg/received_events","type":"User","site_admin":false},"body":"nit:  use format() instead of old-school string formatting","created_at":"2015-03-13T18:32:02Z","updated_at":"2015-03-13T18:32:02Z","html_url":"https://github.com/edx/locust/pull/1#discussion_r26411341","pull_request_url":"https://api.github.com/repos/edx/locust/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/edx/locust/pulls/comments/26411341"},"html":{"href":"https://github.com/edx/locust/pull/1#discussion_r26411341"},"pull_request":{"href":"https://api.github.com/repos/edx/locust/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/edx/locust/pulls/1","id":31151357,"html_url":"https://github.com/edx/locust/pull/1","diff_url":"https://github.com/edx/locust/pull/1.diff","patch_url":"https://github.com/edx/locust/pull/1.patch","issue_url":"https://api.github.com/repos/edx/locust/issues/1","number":1,"state":"open","locked":false,"title":"Add distribution and request csvs to commandline usage.","user":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"body":"Original-Author: Kevin Peter Savage (https://github.com/kevinpetersavage)","created_at":"2015-03-13T18:24:51Z","updated_at":"2015-03-13T18:32:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3544a4d5d70f162d0b27b9389b7fe3ea72522e29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/locust/pulls/1/commits","review_comments_url":"https://api.github.com/repos/edx/locust/pulls/1/comments","review_comment_url":"https://api.github.com/repos/edx/locust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/locust/issues/1/comments","statuses_url":"https://api.github.com/repos/edx/locust/statuses/5bfcf3eaea88fd72ee931b4be139b937e6b472f3","head":{"label":"cpennington:commandline-csv","ref":"commandline-csv","sha":"5bfcf3eaea88fd72ee931b4be139b937e6b472f3","user":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"repo":{"id":31914973,"name":"locust","full_name":"cpennington/locust","owner":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cpennington/locust","description":"Scalable user load testing tool written in Python","fork":true,"url":"https://api.github.com/repos/cpennington/locust","forks_url":"https://api.github.com/repos/cpennington/locust/forks","keys_url":"https://api.github.com/repos/cpennington/locust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpennington/locust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpennington/locust/teams","hooks_url":"https://api.github.com/repos/cpennington/locust/hooks","issue_events_url":"https://api.github.com/repos/cpennington/locust/issues/events{/number}","events_url":"https://api.github.com/repos/cpennington/locust/events","assignees_url":"https://api.github.com/repos/cpennington/locust/assignees{/user}","branches_url":"https://api.github.com/repos/cpennington/locust/branches{/branch}","tags_url":"https://api.github.com/repos/cpennington/locust/tags","blobs_url":"https://api.github.com/repos/cpennington/locust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpennington/locust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpennington/locust/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpennington/locust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpennington/locust/statuses/{sha}","languages_url":"https://api.github.com/repos/cpennington/locust/languages","stargazers_url":"https://api.github.com/repos/cpennington/locust/stargazers","contributors_url":"https://api.github.com/repos/cpennington/locust/contributors","subscribers_url":"https://api.github.com/repos/cpennington/locust/subscribers","subscription_url":"https://api.github.com/repos/cpennington/locust/subscription","commits_url":"https://api.github.com/repos/cpennington/locust/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpennington/locust/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpennington/locust/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpennington/locust/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpennington/locust/contents/{+path}","compare_url":"https://api.github.com/repos/cpennington/locust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpennington/locust/merges","archive_url":"https://api.github.com/repos/cpennington/locust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpennington/locust/downloads","issues_url":"https://api.github.com/repos/cpennington/locust/issues{/number}","pulls_url":"https://api.github.com/repos/cpennington/locust/pulls{/number}","milestones_url":"https://api.github.com/repos/cpennington/locust/milestones{/number}","notifications_url":"https://api.github.com/repos/cpennington/locust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpennington/locust/labels{/name}","releases_url":"https://api.github.com/repos/cpennington/locust/releases{/id}","created_at":"2015-03-09T18:22:10Z","updated_at":"2015-03-13T18:12:45Z","pushed_at":"2015-03-09T18:22:15Z","git_url":"git://github.com/cpennington/locust.git","ssh_url":"git@github.com:cpennington/locust.git","clone_url":"https://github.com/cpennington/locust.git","svn_url":"https://github.com/cpennington/locust","homepage":"http://locust.io","size":1546,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"edx:edx","ref":"edx","sha":"a8e8b866f8181bf88de2535cede5b935632b2991","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":32172700,"name":"locust","full_name":"edx/locust","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/locust","description":"Scalable user load testing tool written in Python","fork":true,"url":"https://api.github.com/repos/edx/locust","forks_url":"https://api.github.com/repos/edx/locust/forks","keys_url":"https://api.github.com/repos/edx/locust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/locust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/locust/teams","hooks_url":"https://api.github.com/repos/edx/locust/hooks","issue_events_url":"https://api.github.com/repos/edx/locust/issues/events{/number}","events_url":"https://api.github.com/repos/edx/locust/events","assignees_url":"https://api.github.com/repos/edx/locust/assignees{/user}","branches_url":"https://api.github.com/repos/edx/locust/branches{/branch}","tags_url":"https://api.github.com/repos/edx/locust/tags","blobs_url":"https://api.github.com/repos/edx/locust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/locust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/locust/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/locust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/locust/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/locust/languages","stargazers_url":"https://api.github.com/repos/edx/locust/stargazers","contributors_url":"https://api.github.com/repos/edx/locust/contributors","subscribers_url":"https://api.github.com/repos/edx/locust/subscribers","subscription_url":"https://api.github.com/repos/edx/locust/subscription","commits_url":"https://api.github.com/repos/edx/locust/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/locust/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/locust/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/locust/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/locust/contents/{+path}","compare_url":"https://api.github.com/repos/edx/locust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/locust/merges","archive_url":"https://api.github.com/repos/edx/locust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/locust/downloads","issues_url":"https://api.github.com/repos/edx/locust/issues{/number}","pulls_url":"https://api.github.com/repos/edx/locust/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/locust/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/locust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/locust/labels{/name}","releases_url":"https://api.github.com/repos/edx/locust/releases{/id}","created_at":"2015-03-13T18:13:07Z","updated_at":"2015-03-13T18:13:07Z","pushed_at":"2015-03-13T18:18:51Z","git_url":"git://github.com/edx/locust.git","ssh_url":"git@github.com:edx/locust.git","clone_url":"https://github.com/edx/locust.git","svn_url":"https://github.com/edx/locust","homepage":"http://locust.io","size":2805,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/locust/pulls/1"},"html":{"href":"https://github.com/edx/locust/pull/1"},"issue":{"href":"https://api.github.com/repos/edx/locust/issues/1"},"comments":{"href":"https://api.github.com/repos/edx/locust/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/locust/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/locust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/locust/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/edx/locust/statuses/5bfcf3eaea88fd72ee931b4be139b937e6b472f3"}}}}