{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments/43175357","id":43175357,"diff_hunk":"@@ -0,0 +1,132 @@\n+\"\"\"\n+Loadtests for the Discussions API\n+\n+These classes of tests are tests that run a suite of tasks that answers a single\n+question.\n+\n+Usage:\n+\n+  $ locust --host=\"http://localhost:8000\"\n+\n+Supported Environment Variables:\n+\n+  BASIC_AUTH_USER, BASIC_AUTH_PASS - if set, will use for HTTP Authentication\n+  LOCUST_TASK_SET - if set, will run the specified TaskSet (must be imported in this module)\n+  COURSE_ID - course that will be tested on the target host, default is set in lms.LmsTasks\n+  SEEDED_DATA - required for the any test that uses GET Thread\n+  LOCUST_MIN_WAIT - Minimum wait time\n+  LOCUST_MAX_WAIT = Maximum wait time\n+\n+\"\"\"\n+import os\n+import requests\n+\n+from locust import HttpLocust\n+\n+from dapi import DiscussionsApiTasks\n+from tasks.dapi_tasks import (\n+    DeleteCommentsTask,\n+    DeleteThreadsTask,\n+    GetThreadsTask,\n+    GetThreadListTask,\n+    GetThreadWithCommentsTask,\n+    PatchCommentsTask,\n+    PatchThreadsTask,\n+    PostCommentsTask,\n+    PostThreadsTask,\n+)\n+\n+requests.packages.urllib3.disable_warnings()\n+\n+\n+class DiscussionsApiTest(DiscussionsApiTasks):\n+    \"\"\"\n+    This is a repeatable baseline test which utilizes the most used requests.\n+\n+    PATCH, POST, and DELETE can affect the response times of the discussions\n+    API over time. Since the GET Thread and GET Thread List are used the most by\n+    far, we use GET Thread and GET Thread List as the baseline.","path":"discussions_api/locustfile.py","position":48,"original_position":48,"commit_id":"2cd6ffebdbba29a0704ee87c0c8cda6b2a524f41","original_commit_id":"2cd6ffebdbba29a0704ee87c0c8cda6b2a524f41","user":{"login":"benpatterson","id":2004678,"avatar_url":"https://avatars.githubusercontent.com/u/2004678?v=3","gravatar_id":"","url":"https://api.github.com/users/benpatterson","html_url":"https://github.com/benpatterson","followers_url":"https://api.github.com/users/benpatterson/followers","following_url":"https://api.github.com/users/benpatterson/following{/other_user}","gists_url":"https://api.github.com/users/benpatterson/gists{/gist_id}","starred_url":"https://api.github.com/users/benpatterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpatterson/subscriptions","organizations_url":"https://api.github.com/users/benpatterson/orgs","repos_url":"https://api.github.com/users/benpatterson/repos","events_url":"https://api.github.com/users/benpatterson/events{/privacy}","received_events_url":"https://api.github.com/users/benpatterson/received_events","type":"User","site_admin":false},"body":"Hmm do you expect an increase in POST/PATCH/DELETES with the new functionality?","created_at":"2015-10-27T19:42:31Z","updated_at":"2015-10-27T19:42:31Z","html_url":"https://github.com/edx/edx-load-tests/pull/27#discussion_r43175357","pull_request_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/comments/43175357"},"html":{"href":"https://github.com/edx/edx-load-tests/pull/27#discussion_r43175357"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-load-tests/pulls/27","id":48253364,"html_url":"https://github.com/edx/edx-load-tests/pull/27","diff_url":"https://github.com/edx/edx-load-tests/pull/27.diff","patch_url":"https://github.com/edx/edx-load-tests/pull/27.patch","issue_url":"https://api.github.com/repos/edx/edx-load-tests/issues/27","number":27,"state":"open","locked":false,"title":"Clee/dapi locust","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":"@benpatterson @macdiesel \r\n\r\nOptional: @jimabramson \r\n\r\nThis is a new loadtest for the new Discussions API.\r\n\r\nData seeding scripts were removed from this PR. \r\n\r\nFYI @nasthagiri ","created_at":"2015-10-20T20:29:37Z","updated_at":"2015-10-27T19:42:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"210c0baa93def30ea0ee19903bde39ae634c74dc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/27/commits","review_comments_url":"https://api.github.com/repos/edx/edx-load-tests/pulls/27/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/27/comments","statuses_url":"https://api.github.com/repos/edx/edx-load-tests/statuses/2cd6ffebdbba29a0704ee87c0c8cda6b2a524f41","head":{"label":"edx:clee/dapi_locust","ref":"clee/dapi_locust","sha":"2cd6ffebdbba29a0704ee87c0c8cda6b2a524f41","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-10-27T18:05:20Z","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":695,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"a930a57b72e261c992ee29410356792a26dbef50","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-10-27T18:05:20Z","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":695,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/27"},"html":{"href":"https://github.com/edx/edx-load-tests/pull/27"},"issue":{"href":"https://api.github.com/repos/edx/edx-load-tests/issues/27"},"comments":{"href":"https://api.github.com/repos/edx/edx-load-tests/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-load-tests/pulls/27/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/27/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-load-tests/statuses/2cd6ffebdbba29a0704ee87c0c8cda6b2a524f41"}}}}