{"action":"created","comment":{"url":"https://api.github.com/repos/jazzband/django-silk/pulls/comments/186280285","pull_request_review_id":117832762,"id":186280285,"diff_hunk":"@@ -2,15 +2,37 @@\n \n from django.utils import six\n \n+from dealer.auto import auto\n+\n from silk.singleton import Singleton\n \n \n+\n def default_permissions(user):\n     if user:\n         return user.is_staff\n     return False\n \n \n+def default_revision():\n+    revision = auto.revision\n+    try:\n+        # This is a pretty flaky way of getting revisions in a semi chronological\n+        # order (of course two commits from the same second cannot be correctly\n+        # ordered) for a couple of reasons:\n+        #\n+        #  - it only works for git\n+        #  - it's using the protected _repo attribute from dealer\n+        #  - the timestamp becomes visible in the revision\n+        #\n+        # However it is better than order commit hashes alphabetically\n+        timestamp = auto._repo.git('show -s --format=%at ' + revision)\n+        revision = ' # '.join([timestamp.decode(), revision])\n+    except:\n+        pass","path":"silk/config.py","position":31,"original_position":31,"commit_id":"3bfb00edcfceda29dcb76f908c767a97fcabb832","original_commit_id":"3bfb00edcfceda29dcb76f908c767a97fcabb832","user":{"login":"albertyw","id":3151040,"avatar_url":"https://avatars3.githubusercontent.com/u/3151040?v=4","gravatar_id":"","url":"https://api.github.com/users/albertyw","html_url":"https://github.com/albertyw","followers_url":"https://api.github.com/users/albertyw/followers","following_url":"https://api.github.com/users/albertyw/following{/other_user}","gists_url":"https://api.github.com/users/albertyw/gists{/gist_id}","starred_url":"https://api.github.com/users/albertyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertyw/subscriptions","organizations_url":"https://api.github.com/users/albertyw/orgs","repos_url":"https://api.github.com/users/albertyw/repos","events_url":"https://api.github.com/users/albertyw/events{/privacy}","received_events_url":"https://api.github.com/users/albertyw/received_events","type":"User","site_admin":false},"body":"Does this make more sense to be `revision = ''`?\r\n\r\nAnd does the rest of the app work correctly with an empty string or `None` value?  There seem to be several areas of the app that filter or group by revision value.","created_at":"2018-05-06T06:52:19Z","updated_at":"2018-05-06T07:03:47Z","html_url":"https://github.com/jazzband/django-silk/pull/281#discussion_r186280285","pull_request_url":"https://api.github.com/repos/jazzband/django-silk/pulls/281","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/comments/186280285"},"html":{"href":"https://github.com/jazzband/django-silk/pull/281#discussion_r186280285"},"pull_request":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/jazzband/django-silk/pulls/281","id":186097185,"html_url":"https://github.com/jazzband/django-silk/pull/281","diff_url":"https://github.com/jazzband/django-silk/pull/281.diff","patch_url":"https://github.com/jazzband/django-silk/pull/281.patch","issue_url":"https://api.github.com/repos/jazzband/django-silk/issues/281","number":281,"state":"open","locked":false,"title":"Added a distribution tab to visualize request time distributions over time","user":{"login":"danielbradburn","id":29945176,"avatar_url":"https://avatars0.githubusercontent.com/u/29945176?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbradburn","html_url":"https://github.com/danielbradburn","followers_url":"https://api.github.com/users/danielbradburn/followers","following_url":"https://api.github.com/users/danielbradburn/following{/other_user}","gists_url":"https://api.github.com/users/danielbradburn/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbradburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbradburn/subscriptions","organizations_url":"https://api.github.com/users/danielbradburn/orgs","repos_url":"https://api.github.com/users/danielbradburn/repos","events_url":"https://api.github.com/users/danielbradburn/events{/privacy}","received_events_url":"https://api.github.com/users/danielbradburn/received_events","type":"User","site_admin":false},"body":"This PR adds a distribution tab (at the moment opt in using the SILK_DISTRIBUTION_TAB configuration setting) with a visualisation of the request time distributions grouped by date or revision. We are using this at crunchr for continous benchmarking to ensure we don't introduce changes to our codebase that degrade the performance of our backend. This might be particularly useful for benchmarking django apps over time or versions.\r\n\r\n![11](https://user-images.githubusercontent.com/29945176/39652005-5e55ef90-4fec-11e8-9432-23a7498daa4b.png)\r\n","created_at":"2018-05-04T20:35:23Z","updated_at":"2018-05-06T07:03:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9581da575c5d6f0ea266b042b2aabba2d1035c42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jazzband/django-silk/pulls/281/commits","review_comments_url":"https://api.github.com/repos/jazzband/django-silk/pulls/281/comments","review_comment_url":"https://api.github.com/repos/jazzband/django-silk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jazzband/django-silk/issues/281/comments","statuses_url":"https://api.github.com/repos/jazzband/django-silk/statuses/3bfb00edcfceda29dcb76f908c767a97fcabb832","head":{"label":"crunchr:add-distribution-tab","ref":"add-distribution-tab","sha":"3bfb00edcfceda29dcb76f908c767a97fcabb832","user":{"login":"crunchr","id":29945215,"avatar_url":"https://avatars0.githubusercontent.com/u/29945215?v=4","gravatar_id":"","url":"https://api.github.com/users/crunchr","html_url":"https://github.com/crunchr","followers_url":"https://api.github.com/users/crunchr/followers","following_url":"https://api.github.com/users/crunchr/following{/other_user}","gists_url":"https://api.github.com/users/crunchr/gists{/gist_id}","starred_url":"https://api.github.com/users/crunchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crunchr/subscriptions","organizations_url":"https://api.github.com/users/crunchr/orgs","repos_url":"https://api.github.com/users/crunchr/repos","events_url":"https://api.github.com/users/crunchr/events{/privacy}","received_events_url":"https://api.github.com/users/crunchr/received_events","type":"Organization","site_admin":false},"repo":{"id":96741909,"name":"silk","full_name":"crunchr/silk","owner":{"login":"crunchr","id":29945215,"avatar_url":"https://avatars0.githubusercontent.com/u/29945215?v=4","gravatar_id":"","url":"https://api.github.com/users/crunchr","html_url":"https://github.com/crunchr","followers_url":"https://api.github.com/users/crunchr/followers","following_url":"https://api.github.com/users/crunchr/following{/other_user}","gists_url":"https://api.github.com/users/crunchr/gists{/gist_id}","starred_url":"https://api.github.com/users/crunchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crunchr/subscriptions","organizations_url":"https://api.github.com/users/crunchr/orgs","repos_url":"https://api.github.com/users/crunchr/repos","events_url":"https://api.github.com/users/crunchr/events{/privacy}","received_events_url":"https://api.github.com/users/crunchr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crunchr/silk","description":"Silky smooth profiling for Django","fork":true,"url":"https://api.github.com/repos/crunchr/silk","forks_url":"https://api.github.com/repos/crunchr/silk/forks","keys_url":"https://api.github.com/repos/crunchr/silk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crunchr/silk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crunchr/silk/teams","hooks_url":"https://api.github.com/repos/crunchr/silk/hooks","issue_events_url":"https://api.github.com/repos/crunchr/silk/issues/events{/number}","events_url":"https://api.github.com/repos/crunchr/silk/events","assignees_url":"https://api.github.com/repos/crunchr/silk/assignees{/user}","branches_url":"https://api.github.com/repos/crunchr/silk/branches{/branch}","tags_url":"https://api.github.com/repos/crunchr/silk/tags","blobs_url":"https://api.github.com/repos/crunchr/silk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crunchr/silk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crunchr/silk/git/refs{/sha}","trees_url":"https://api.github.com/repos/crunchr/silk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crunchr/silk/statuses/{sha}","languages_url":"https://api.github.com/repos/crunchr/silk/languages","stargazers_url":"https://api.github.com/repos/crunchr/silk/stargazers","contributors_url":"https://api.github.com/repos/crunchr/silk/contributors","subscribers_url":"https://api.github.com/repos/crunchr/silk/subscribers","subscription_url":"https://api.github.com/repos/crunchr/silk/subscription","commits_url":"https://api.github.com/repos/crunchr/silk/commits{/sha}","git_commits_url":"https://api.github.com/repos/crunchr/silk/git/commits{/sha}","comments_url":"https://api.github.com/repos/crunchr/silk/comments{/number}","issue_comment_url":"https://api.github.com/repos/crunchr/silk/issues/comments{/number}","contents_url":"https://api.github.com/repos/crunchr/silk/contents/{+path}","compare_url":"https://api.github.com/repos/crunchr/silk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crunchr/silk/merges","archive_url":"https://api.github.com/repos/crunchr/silk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crunchr/silk/downloads","issues_url":"https://api.github.com/repos/crunchr/silk/issues{/number}","pulls_url":"https://api.github.com/repos/crunchr/silk/pulls{/number}","milestones_url":"https://api.github.com/repos/crunchr/silk/milestones{/number}","notifications_url":"https://api.github.com/repos/crunchr/silk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crunchr/silk/labels{/name}","releases_url":"https://api.github.com/repos/crunchr/silk/releases{/id}","deployments_url":"https://api.github.com/repos/crunchr/silk/deployments","created_at":"2017-07-10T06:12:42Z","updated_at":"2018-04-06T06:56:19Z","pushed_at":"2018-05-04T20:32:41Z","git_url":"git://github.com/crunchr/silk.git","ssh_url":"git@github.com:crunchr/silk.git","clone_url":"https://github.com/crunchr/silk.git","svn_url":"https://github.com/crunchr/silk","homepage":"","size":7052,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jazzband:master","ref":"master","sha":"e4536b3bdd5efe5158f57ad9f5bc53303e995b0b","user":{"login":"jazzband","id":15129049,"avatar_url":"https://avatars1.githubusercontent.com/u/15129049?v=4","gravatar_id":"","url":"https://api.github.com/users/jazzband","html_url":"https://github.com/jazzband","followers_url":"https://api.github.com/users/jazzband/followers","following_url":"https://api.github.com/users/jazzband/following{/other_user}","gists_url":"https://api.github.com/users/jazzband/gists{/gist_id}","starred_url":"https://api.github.com/users/jazzband/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazzband/subscriptions","organizations_url":"https://api.github.com/users/jazzband/orgs","repos_url":"https://api.github.com/users/jazzband/repos","events_url":"https://api.github.com/users/jazzband/events{/privacy}","received_events_url":"https://api.github.com/users/jazzband/received_events","type":"Organization","site_admin":false},"repo":{"id":20037651,"name":"django-silk","full_name":"jazzband/django-silk","owner":{"login":"jazzband","id":15129049,"avatar_url":"https://avatars1.githubusercontent.com/u/15129049?v=4","gravatar_id":"","url":"https://api.github.com/users/jazzband","html_url":"https://github.com/jazzband","followers_url":"https://api.github.com/users/jazzband/followers","following_url":"https://api.github.com/users/jazzband/following{/other_user}","gists_url":"https://api.github.com/users/jazzband/gists{/gist_id}","starred_url":"https://api.github.com/users/jazzband/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazzband/subscriptions","organizations_url":"https://api.github.com/users/jazzband/orgs","repos_url":"https://api.github.com/users/jazzband/repos","events_url":"https://api.github.com/users/jazzband/events{/privacy}","received_events_url":"https://api.github.com/users/jazzband/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jazzband/django-silk","description":"Silky smooth profiling for Django","fork":false,"url":"https://api.github.com/repos/jazzband/django-silk","forks_url":"https://api.github.com/repos/jazzband/django-silk/forks","keys_url":"https://api.github.com/repos/jazzband/django-silk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jazzband/django-silk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jazzband/django-silk/teams","hooks_url":"https://api.github.com/repos/jazzband/django-silk/hooks","issue_events_url":"https://api.github.com/repos/jazzband/django-silk/issues/events{/number}","events_url":"https://api.github.com/repos/jazzband/django-silk/events","assignees_url":"https://api.github.com/repos/jazzband/django-silk/assignees{/user}","branches_url":"https://api.github.com/repos/jazzband/django-silk/branches{/branch}","tags_url":"https://api.github.com/repos/jazzband/django-silk/tags","blobs_url":"https://api.github.com/repos/jazzband/django-silk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jazzband/django-silk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jazzband/django-silk/git/refs{/sha}","trees_url":"https://api.github.com/repos/jazzband/django-silk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jazzband/django-silk/statuses/{sha}","languages_url":"https://api.github.com/repos/jazzband/django-silk/languages","stargazers_url":"https://api.github.com/repos/jazzband/django-silk/stargazers","contributors_url":"https://api.github.com/repos/jazzband/django-silk/contributors","subscribers_url":"https://api.github.com/repos/jazzband/django-silk/subscribers","subscription_url":"https://api.github.com/repos/jazzband/django-silk/subscription","commits_url":"https://api.github.com/repos/jazzband/django-silk/commits{/sha}","git_commits_url":"https://api.github.com/repos/jazzband/django-silk/git/commits{/sha}","comments_url":"https://api.github.com/repos/jazzband/django-silk/comments{/number}","issue_comment_url":"https://api.github.com/repos/jazzband/django-silk/issues/comments{/number}","contents_url":"https://api.github.com/repos/jazzband/django-silk/contents/{+path}","compare_url":"https://api.github.com/repos/jazzband/django-silk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jazzband/django-silk/merges","archive_url":"https://api.github.com/repos/jazzband/django-silk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jazzband/django-silk/downloads","issues_url":"https://api.github.com/repos/jazzband/django-silk/issues{/number}","pulls_url":"https://api.github.com/repos/jazzband/django-silk/pulls{/number}","milestones_url":"https://api.github.com/repos/jazzband/django-silk/milestones{/number}","notifications_url":"https://api.github.com/repos/jazzband/django-silk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jazzband/django-silk/labels{/name}","releases_url":"https://api.github.com/repos/jazzband/django-silk/releases{/id}","deployments_url":"https://api.github.com/repos/jazzband/django-silk/deployments","created_at":"2014-05-21T21:14:45Z","updated_at":"2018-05-05T06:10:21Z","pushed_at":"2018-05-04T20:35:24Z","git_url":"git://github.com/jazzband/django-silk.git","ssh_url":"git@github.com:jazzband/django-silk.git","clone_url":"https://github.com/jazzband/django-silk.git","svn_url":"https://github.com/jazzband/django-silk","homepage":"","size":6738,"stargazers_count":1561,"watchers_count":1561,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":142,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":142,"open_issues":53,"watchers":1561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/281"},"html":{"href":"https://github.com/jazzband/django-silk/pull/281"},"issue":{"href":"https://api.github.com/repos/jazzband/django-silk/issues/281"},"comments":{"href":"https://api.github.com/repos/jazzband/django-silk/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jazzband/django-silk/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/jazzband/django-silk/statuses/3bfb00edcfceda29dcb76f908c767a97fcabb832"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"albertyw"}}