{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments/37543735","id":37543735,"diff_hunk":"@@ -0,0 +1,211 @@\n+\"\"\"\n+Generate graphs from the raw Locust data captured in MongoDB.\n+\n+You must have installed the requirements in the util_requirements.txt file in order to\n+successfully run this script.\n+\"\"\"\n+\n+import datetime\n+import click\n+import pymongo\n+# If you remove the pandas import below, some of the numpy calls fail below.\n+# TODO: Figure out why...\n+import pandas as pd\n+import numpy as np\n+import matplotlib.pyplot as plt\n+\n+# MongoDB defaults\n+DEFAULT_MONGO_HOST = \"localhost\"\n+DEFAULT_MONGO_PORT = 27017\n+DEFAULT_MONGO_DATABASE = \"locust_data\"\n+\n+RAW_DATA_COLLECTION_FMT = 'requests_{}'\n+TEST_RUN_COLLECTION = \"test_runs\"\n+\n+\n+class MongoConnection(object):","path":"util/csm_reports.py","position":26,"original_position":26,"commit_id":"92c2db2a443b1fc9d6782b7f8f304507d97f8ce4","original_commit_id":"92c2db2a443b1fc9d6782b7f8f304507d97f8ce4","user":{"login":"BenjiLee","id":7101723,"avatar_url":"https://avatars.githubusercontent.com/u/7101723?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjiLee","html_url":"https://github.com/BenjiLee","followers_url":"https://api.github.com/users/BenjiLee/followers","following_url":"https://api.github.com/users/BenjiLee/following{/other_user}","gists_url":"https://api.github.com/users/BenjiLee/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjiLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjiLee/subscriptions","organizations_url":"https://api.github.com/users/BenjiLee/orgs","repos_url":"https://api.github.com/users/BenjiLee/repos","events_url":"https://api.github.com/users/BenjiLee/events{/privacy}","received_events_url":"https://api.github.com/users/BenjiLee/received_events","type":"User","site_admin":false},"body":"Could we also put this in another helper helper file?","created_at":"2015-08-20T15:32:14Z","updated_at":"2015-08-20T15:32:14Z","html_url":"https://github.com/edx/edx-load-tests/pull/2#discussion_r37543735","pull_request_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments/37543735"},"html":{"href":"https://github.com/edx/edx-load-tests/pull/2#discussion_r37543735"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-load-tests/pulls/2","id":42403343,"html_url":"https://github.com/edx/edx-load-tests/pull/2","diff_url":"https://github.com/edx/edx-load-tests/pull/2.diff","patch_url":"https://github.com/edx/edx-load-tests/pull/2.patch","issue_url":"https://api.github.com/repos/edx/edx-load-tests/issues/2","number":2,"state":"closed","locked":false,"title":"Tools to capture and analyze raw load test request data.","user":{"login":"doctoryes","id":7285237,"avatar_url":"https://avatars.githubusercontent.com/u/7285237?v=3","gravatar_id":"","url":"https://api.github.com/users/doctoryes","html_url":"https://github.com/doctoryes","followers_url":"https://api.github.com/users/doctoryes/followers","following_url":"https://api.github.com/users/doctoryes/following{/other_user}","gists_url":"https://api.github.com/users/doctoryes/gists{/gist_id}","starred_url":"https://api.github.com/users/doctoryes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctoryes/subscriptions","organizations_url":"https://api.github.com/users/doctoryes/orgs","repos_url":"https://api.github.com/users/doctoryes/repos","events_url":"https://api.github.com/users/doctoryes/events{/privacy}","received_events_url":"https://api.github.com/users/doctoryes/received_events","type":"User","site_admin":false},"body":"Add requirements files.\r\nCopy auto_auth and raw data capture in MongoDB over from private repo.\r\nAdd automatic segmentation of test run data.\r\nSave the CSV information into mongo at end of test.","created_at":"2015-08-13T21:48:18Z","updated_at":"2015-08-20T15:32:14Z","closed_at":"2015-08-20T14:27:09Z","merged_at":"2015-08-20T14:27:09Z","merge_commit_sha":"12cfe13229231fd8aaf0502a1edd79fb3fd46faf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/2/commits","review_comments_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/2/comments","review_comment_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-load-tests/issues/2/comments","statuses_url":"https://api.github.com/repos/edx/edx-load-tests/statuses/92c2db2a443b1fc9d6782b7f8f304507d97f8ce4","head":{"label":"edx:jeskew/plot_csm_load_test_data","ref":"jeskew/plot_csm_load_test_data","sha":"92c2db2a443b1fc9d6782b7f8f304507d97f8ce4","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":39958996,"name":"edx-load-tests","full_name":"edx/edx-load-tests","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/edx-load-tests","description":"Open source load tests for edX software components","fork":false,"url":"https://api.github.com/repos/edx/edx-load-tests","forks_url":"https://api.github.com/repos/edx/edx-load-tests/forks","keys_url":"https://api.github.com/repos/edx/edx-load-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-load-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-load-tests/teams","hooks_url":"https://api.github.com/repos/edx/edx-load-tests/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-load-tests/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-load-tests/events","assignees_url":"https://api.github.com/repos/edx/edx-load-tests/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-load-tests/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-load-tests/tags","blobs_url":"https://api.github.com/repos/edx/edx-load-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-load-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-load-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-load-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-load-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-load-tests/languages","stargazers_url":"https://api.github.com/repos/edx/edx-load-tests/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-load-tests/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-load-tests/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-load-tests/subscription","commits_url":"https://api.github.com/repos/edx/edx-load-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-load-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-load-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-load-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-load-tests/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-load-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-load-tests/merges","archive_url":"https://api.github.com/repos/edx/edx-load-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-load-tests/downloads","issues_url":"https://api.github.com/repos/edx/edx-load-tests/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-load-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-load-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-load-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-load-tests/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-load-tests/releases{/id}","created_at":"2015-07-30T15:52:54Z","updated_at":"2015-08-19T21:04:20Z","pushed_at":"2015-08-20T15:21:21Z","git_url":"git://github.com/edx/edx-load-tests.git","ssh_url":"git@github.com:edx/edx-load-tests.git","clone_url":"https://github.com/edx/edx-load-tests.git","svn_url":"https://github.com/edx/edx-load-tests","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"fff19811f8239bae1dd0a5f6d052ba39e4b634ee","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":39958996,"name":"edx-load-tests","full_name":"edx/edx-load-tests","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/edx-load-tests","description":"Open source load tests for edX software components","fork":false,"url":"https://api.github.com/repos/edx/edx-load-tests","forks_url":"https://api.github.com/repos/edx/edx-load-tests/forks","keys_url":"https://api.github.com/repos/edx/edx-load-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-load-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-load-tests/teams","hooks_url":"https://api.github.com/repos/edx/edx-load-tests/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-load-tests/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-load-tests/events","assignees_url":"https://api.github.com/repos/edx/edx-load-tests/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-load-tests/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-load-tests/tags","blobs_url":"https://api.github.com/repos/edx/edx-load-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-load-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-load-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-load-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-load-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-load-tests/languages","stargazers_url":"https://api.github.com/repos/edx/edx-load-tests/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-load-tests/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-load-tests/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-load-tests/subscription","commits_url":"https://api.github.com/repos/edx/edx-load-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-load-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-load-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-load-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-load-tests/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-load-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-load-tests/merges","archive_url":"https://api.github.com/repos/edx/edx-load-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-load-tests/downloads","issues_url":"https://api.github.com/repos/edx/edx-load-tests/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-load-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-load-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-load-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-load-tests/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-load-tests/releases{/id}","created_at":"2015-07-30T15:52:54Z","updated_at":"2015-08-19T21:04:20Z","pushed_at":"2015-08-20T15:21:21Z","git_url":"git://github.com/edx/edx-load-tests.git","ssh_url":"git@github.com:edx/edx-load-tests.git","clone_url":"https://github.com/edx/edx-load-tests.git","svn_url":"https://github.com/edx/edx-load-tests","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/2"},"html":{"href":"https://github.com/edx/edx-load-tests/pull/2"},"issue":{"href":"https://api.github.com/repos/edx/edx-load-tests/issues/2"},"comments":{"href":"https://api.github.com/repos/edx/edx-load-tests/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-load-tests/statuses/92c2db2a443b1fc9d6782b7f8f304507d97f8ce4"}}}}