{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/35640842","id":35640842,"diff_hunk":"@@ -0,0 +1,97 @@\n+import pygal\n+\n+\n+def generate_bar_chart_stat(stat_dict, head, filename, lengend):\n+    \"\"\"Generate Bar chart for stat on concurrent subscription\"\"\"\n+    bar_chart = pygal.Bar()\n+    bar_chart.title = head\n+    bar_chart.x_labels = ('min', 'mean', 'max', 'std')\n+    bar_chart.x_title = 'Statistics'\n+    bar_chart.y_title = 'Time (s)'\n+    for key in range(len(stat_dict)):\n+        bar_chart.add(\n+            '{0}-{1}'.format(lengend, key),\n+            stat_dict.get(key)\n+        )\n+    bar_chart.render_to_file(filename)\n+\n+\n+def generate_line_chart_bucketized_stat(stat_dict, head, filename,\n+                                        bucket_size, num_buckets):\n+    \"\"\"Generate Line chart for stat on concurrent subscription\"\"\"\n+    if bucket_size == 0:\n+        return\n+\n+    # parameters for formats on charts\n+    lengend = ('min', 'median', 'max', 'std')\n+    buckets = [\n+        '{0}-{1}'.format(\n+            bucket_size * i + 1,\n+            bucket_size * (i + 1)\n+        )\n+        for i in range(num_buckets)\n+    ]\n+    line_chart = pygal.Line()\n+    line_chart.title = head\n+    line_chart.x_labels = buckets\n+    line_chart.x_title = 'Buckets'\n+    line_chart.y_title = 'Time (s)'\n+    for stat, stat_value in enumerate(lengend):\n+        # count min/median/max/std separately\n+        tmp_list = []\n+        # accumulate stat item of each client\n+        for index in range(len(stat_dict)):\n+            tmp_list.append(stat_dict.get(index)[stat])\n+        # add list to chart\n+        line_chart.add(\n+            lengend[stat],\n+            tmp_list\n+        )\n+    line_chart.render_to_file(filename)\n+\n+\n+def generate_stacked_line_chart_raw(time_result_dict, head, filename):\n+    \"\"\"Generate Stacked-Line chart for raw data of ak/att/del/reg\"\"\"\n+    stackedline_chart = pygal.StackedLine(\n+        fill=True, show_dots=False, range=(0, 50)","path":"robottelo/performance/graph.py","position":56,"original_position":56,"commit_id":"3154c89e58e86b2c7ca0ee50dba5b41c5d661fba","original_commit_id":"3154c89e58e86b2c7ca0ee50dba5b41c5d661fba","user":{"login":"Ichimonji10","id":1012989,"avatar_url":"https://avatars.githubusercontent.com/u/1012989?v=3","gravatar_id":"","url":"https://api.github.com/users/Ichimonji10","html_url":"https://github.com/Ichimonji10","followers_url":"https://api.github.com/users/Ichimonji10/followers","following_url":"https://api.github.com/users/Ichimonji10/following{/other_user}","gists_url":"https://api.github.com/users/Ichimonji10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichimonji10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichimonji10/subscriptions","organizations_url":"https://api.github.com/users/Ichimonji10/orgs","repos_url":"https://api.github.com/users/Ichimonji10/repos","events_url":"https://api.github.com/users/Ichimonji10/events{/privacy}","received_events_url":"https://api.github.com/users/Ichimonji10/received_events","type":"User","site_admin":false},"body":"Place each argument on its own line, please.\r\n\r\n```python\r\n    stackedline_chart = pygal.StackedLine(\r\n        fill=True,\r\n        range=(0, 50),\r\n        show_dots=False,\r\n    )\r\n```","created_at":"2015-07-28T12:28:15Z","updated_at":"2015-07-28T12:28:15Z","html_url":"https://github.com/SatelliteQE/robottelo/pull/2612#discussion_r35640842","pull_request_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/35640842"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/2612#discussion_r35640842"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612","id":40719560,"html_url":"https://github.com/SatelliteQE/robottelo/pull/2612","diff_url":"https://github.com/SatelliteQE/robottelo/pull/2612.diff","patch_url":"https://github.com/SatelliteQE/robottelo/pull/2612.patch","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2612","number":2612,"state":"open","locked":false,"title":"Separate Register+Attach and Add Graphing Module","user":{"login":"danuzclaudes","id":8943359,"avatar_url":"https://avatars.githubusercontent.com/u/8943359?v=3","gravatar_id":"","url":"https://api.github.com/users/danuzclaudes","html_url":"https://github.com/danuzclaudes","followers_url":"https://api.github.com/users/danuzclaudes/followers","following_url":"https://api.github.com/users/danuzclaudes/following{/other_user}","gists_url":"https://api.github.com/users/danuzclaudes/gists{/gist_id}","starred_url":"https://api.github.com/users/danuzclaudes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danuzclaudes/subscriptions","organizations_url":"https://api.github.com/users/danuzclaudes/orgs","repos_url":"https://api.github.com/users/danuzclaudes/repos","events_url":"https://api.github.com/users/danuzclaudes/events{/privacy}","received_events_url":"https://api.github.com/users/danuzclaudes/received_events","type":"User","site_admin":false},"body":"1. `robottelo.performance.candlepin.py`\r\nCollect time points of register and attach, discard total timing\r\nnote:\r\nRunning performance test would generate 4 sets of test results:\r\n`activationKey/attach/delete/register`\r\n\r\n2. `robottelo.performance.constants`\r\nRename file name into full names for clarity\r\nadd register raw and stat output file name\r\n\r\n3. `robottelo.performance.graph`\r\nAdd graph module\r\n\r\n4. `robottelo.performance.stat`\r\nRevise stat module to return stat results as dictionary\r\n\r\n5. `robottelo.performance.thread`\r\nChange `SubscribeAttachThread` class to separate `time_result_dictionary`\r\ninto two new dictionaries\r\n\r\n6. `robottelo.test.py`\r\nSeparate register and attach as two different dictionaries\r\n    *data structure now:\r\n    `att{client: []}, ak{client: []}, reg{client: []}`\r\nGenerate charts after computing stat:\r\n    *raw-<test_type>-concurrent.csv\r\n    *raw-<test_type>-#-clients-line.svg\r\n    *statistics-<test_type>-per-client-#-clients.svg\r\n    *statistics-<test_type>-per-test-#-clients.svg\r\n    *statistics-<test_type>-test-bucketized-#-clients.svg\r\n    *statistics-<test_type>-client-<id>-bucketized-#-clients.svg\r\n    *statistics-<test_type>-concurrent.csv\r\n`_set_testcase_parameters`:\r\n    for subscription by register + attach test case,\r\n    would set extra parameter of register (i.e. raw/stat output filename)\r\n`_get_output_filename`:\r\n    decide type of test (ak/att/del/reg) and set as chart file name\r\n\r\n7. `tests.foreman.performance.test_candlepin_concurrent_subscription_attach`\r\nAdd filenames for register test","created_at":"2015-07-23T21:18:36Z","updated_at":"2015-07-28T12:28:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79373c84f16884c16d28bc2fc2fcba8dd5b73b4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2612/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/3154c89e58e86b2c7ca0ee50dba5b41c5d661fba","head":{"label":"danuzclaudes:perf-graph","ref":"perf-graph","sha":"3154c89e58e86b2c7ca0ee50dba5b41c5d661fba","user":{"login":"danuzclaudes","id":8943359,"avatar_url":"https://avatars.githubusercontent.com/u/8943359?v=3","gravatar_id":"","url":"https://api.github.com/users/danuzclaudes","html_url":"https://github.com/danuzclaudes","followers_url":"https://api.github.com/users/danuzclaudes/followers","following_url":"https://api.github.com/users/danuzclaudes/following{/other_user}","gists_url":"https://api.github.com/users/danuzclaudes/gists{/gist_id}","starred_url":"https://api.github.com/users/danuzclaudes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danuzclaudes/subscriptions","organizations_url":"https://api.github.com/users/danuzclaudes/orgs","repos_url":"https://api.github.com/users/danuzclaudes/repos","events_url":"https://api.github.com/users/danuzclaudes/events{/privacy}","received_events_url":"https://api.github.com/users/danuzclaudes/received_events","type":"User","site_admin":false},"repo":{"id":36315720,"name":"robottelo","full_name":"danuzclaudes/robottelo","owner":{"login":"danuzclaudes","id":8943359,"avatar_url":"https://avatars.githubusercontent.com/u/8943359?v=3","gravatar_id":"","url":"https://api.github.com/users/danuzclaudes","html_url":"https://github.com/danuzclaudes","followers_url":"https://api.github.com/users/danuzclaudes/followers","following_url":"https://api.github.com/users/danuzclaudes/following{/other_user}","gists_url":"https://api.github.com/users/danuzclaudes/gists{/gist_id}","starred_url":"https://api.github.com/users/danuzclaudes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danuzclaudes/subscriptions","organizations_url":"https://api.github.com/users/danuzclaudes/orgs","repos_url":"https://api.github.com/users/danuzclaudes/repos","events_url":"https://api.github.com/users/danuzclaudes/events{/privacy}","received_events_url":"https://api.github.com/users/danuzclaudes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danuzclaudes/robottelo","description":"Robottelo is a test suite which exercises The Foreman.","fork":true,"url":"https://api.github.com/repos/danuzclaudes/robottelo","forks_url":"https://api.github.com/repos/danuzclaudes/robottelo/forks","keys_url":"https://api.github.com/repos/danuzclaudes/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danuzclaudes/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danuzclaudes/robottelo/teams","hooks_url":"https://api.github.com/repos/danuzclaudes/robottelo/hooks","issue_events_url":"https://api.github.com/repos/danuzclaudes/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/danuzclaudes/robottelo/events","assignees_url":"https://api.github.com/repos/danuzclaudes/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/danuzclaudes/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/danuzclaudes/robottelo/tags","blobs_url":"https://api.github.com/repos/danuzclaudes/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danuzclaudes/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danuzclaudes/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/danuzclaudes/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danuzclaudes/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/danuzclaudes/robottelo/languages","stargazers_url":"https://api.github.com/repos/danuzclaudes/robottelo/stargazers","contributors_url":"https://api.github.com/repos/danuzclaudes/robottelo/contributors","subscribers_url":"https://api.github.com/repos/danuzclaudes/robottelo/subscribers","subscription_url":"https://api.github.com/repos/danuzclaudes/robottelo/subscription","commits_url":"https://api.github.com/repos/danuzclaudes/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/danuzclaudes/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/danuzclaudes/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/danuzclaudes/robottelo/issues/comments{/number}","contents_url":"https://api.github.com/repos/danuzclaudes/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/danuzclaudes/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danuzclaudes/robottelo/merges","archive_url":"https://api.github.com/repos/danuzclaudes/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danuzclaudes/robottelo/downloads","issues_url":"https://api.github.com/repos/danuzclaudes/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/danuzclaudes/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/danuzclaudes/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/danuzclaudes/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danuzclaudes/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/danuzclaudes/robottelo/releases{/id}","created_at":"2015-05-26T18:31:13Z","updated_at":"2015-07-20T02:15:36Z","pushed_at":"2015-07-27T17:27:06Z","git_url":"git://github.com/danuzclaudes/robottelo.git","ssh_url":"git@github.com:danuzclaudes/robottelo.git","clone_url":"https://github.com/danuzclaudes/robottelo.git","svn_url":"https://github.com/danuzclaudes/robottelo","homepage":"","size":8305,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"SatelliteQE:master","ref":"master","sha":"dbdd31ea0f75c13b57df234b997f03837837b36f","user":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"repo":{"id":4000279,"name":"robottelo","full_name":"SatelliteQE/robottelo","owner":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SatelliteQE/robottelo","description":"Robottelo is a test suite which exercises The Foreman.","fork":false,"url":"https://api.github.com/repos/SatelliteQE/robottelo","forks_url":"https://api.github.com/repos/SatelliteQE/robottelo/forks","keys_url":"https://api.github.com/repos/SatelliteQE/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SatelliteQE/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SatelliteQE/robottelo/teams","hooks_url":"https://api.github.com/repos/SatelliteQE/robottelo/hooks","issue_events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/events","assignees_url":"https://api.github.com/repos/SatelliteQE/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/SatelliteQE/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/tags","blobs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/SatelliteQE/robottelo/languages","stargazers_url":"https://api.github.com/repos/SatelliteQE/robottelo/stargazers","contributors_url":"https://api.github.com/repos/SatelliteQE/robottelo/contributors","subscribers_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscribers","subscription_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscription","commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments{/number}","contents_url":"https://api.github.com/repos/SatelliteQE/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/SatelliteQE/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SatelliteQE/robottelo/merges","archive_url":"https://api.github.com/repos/SatelliteQE/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SatelliteQE/robottelo/downloads","issues_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/SatelliteQE/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/SatelliteQE/robottelo/releases{/id}","created_at":"2012-04-12T01:36:39Z","updated_at":"2015-06-23T17:21:41Z","pushed_at":"2015-07-28T11:07:12Z","git_url":"git://github.com/SatelliteQE/robottelo.git","ssh_url":"git@github.com:SatelliteQE/robottelo.git","clone_url":"https://github.com/SatelliteQE/robottelo.git","svn_url":"https://github.com/SatelliteQE/robottelo","homepage":"","size":18084,"stargazers_count":22,"watchers_count":22,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":205,"forks":29,"open_issues":205,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/2612"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2612"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2612/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2612/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/3154c89e58e86b2c7ca0ee50dba5b41c5d661fba"}}}}