{"action":"created","comment":{"url":"https://api.github.com/repos/mantidproject/documents/pulls/comments/46163317","id":46163317,"diff_hunk":"@@ -0,0 +1,82 @@\n+#Overview\n+\n+We have several algorithms that are similar and would love to rationalise the code and make the choice of which algorithm to use easier for scientists.\n+However we always face the problem that we never know how much an algorithm is used.  It was agreed at the SSC2015 the we could track the usage of algorithms alongside simple startups of Mantid.\n+\n+This design document should be considered as an extension of the previous implemented design [MeasureUsageStatistics](MeasureUsageStatistics.md).\n+\n+##Proposed Changes\n+\n+We propose to Centralise the sending of all Usage reports into a central service, and extend the current functinality to \n+allow usage reports of features within Mantid, where a feature might be:\n+\n+1. Execution of an algorithm, parent or child\n+1. Startup of a Interface\n+1. Usage of a particular feature in an interface\n+\n+Initially we would only intend to automatically track Algorithm usage, but other usage reports can be added by developer as they deem helpful.\n+The contents of a Feature usage would be:\n+\n+* type - Algorithm, Interface, Feature\n+* name - Identifying name, for algorithms this would be Algorithm and version\n+* time - The datetime of execution start\n+* duration - (optional) the execution duration\n+* details - (optional) Further details - for algorithms this will be a properties string, or possibly the python string of the Algorithm call.\n+\n+These would be sent in addition to these fields in common with the startup Usage details:\n+\n+* User ID hash\n+* host ID hash\n+\n+###New Code\n+\n+####API::UsageService\n+\n+We would create a new service class called Usage Service which would be responsible for collating, and sending\n+all usage data.  This would centralise all the logic covering Usage Reporting including:\n+\n+1. Detecting if repoting is enabled\n+1. Registering the startup of Mantid\n+1. Sending Startup usage reports, immediately, and every 24 hours thereafter\n+1. Registering feature usage, and storing in a feature usage buffer\n+1. Sending Feature usage reports on application exit, and when the feature usage buffer is above a size threshold.\n+\n+###### Implementation Notes:\n+\n+1. Use Poco::Timer to handle the timed aspects of the class","path":"Design/Usage/AlgorithmUsageStatistics.md","position":46,"original_position":46,"commit_id":"76f950e8978a4a1f1a6867686fec06c0eedc5e06","original_commit_id":"76f950e8978a4a1f1a6867686fec06c0eedc5e06","user":{"login":"NickDraper","id":1017173,"avatar_url":"https://avatars.githubusercontent.com/u/1017173?v=3","gravatar_id":"","url":"https://api.github.com/users/NickDraper","html_url":"https://github.com/NickDraper","followers_url":"https://api.github.com/users/NickDraper/followers","following_url":"https://api.github.com/users/NickDraper/following{/other_user}","gists_url":"https://api.github.com/users/NickDraper/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDraper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDraper/subscriptions","organizations_url":"https://api.github.com/users/NickDraper/orgs","repos_url":"https://api.github.com/users/NickDraper/repos","events_url":"https://api.github.com/users/NickDraper/events{/privacy}","received_events_url":"https://api.github.com/users/NickDraper/received_events","type":"User","site_admin":false},"body":"That just does wall clock timings, the Poco::Timer runs in a seperate thread and fires off callbacks on an interval.  Rather different, and it is already in use elsewhere.","created_at":"2015-11-30T16:12:11Z","updated_at":"2015-11-30T16:12:11Z","html_url":"https://github.com/mantidproject/documents/pull/5#discussion_r46163317","pull_request_url":"https://api.github.com/repos/mantidproject/documents/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/comments/46163317"},"html":{"href":"https://github.com/mantidproject/documents/pull/5#discussion_r46163317"},"pull_request":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/mantidproject/documents/pulls/5","id":52137169,"html_url":"https://github.com/mantidproject/documents/pull/5","diff_url":"https://github.com/mantidproject/documents/pull/5.diff","patch_url":"https://github.com/mantidproject/documents/pull/5.patch","issue_url":"https://api.github.com/repos/mantidproject/documents/issues/5","number":5,"state":"open","locked":false,"title":"Create AlgorithmUsageStatistics.md","user":{"login":"NickDraper","id":1017173,"avatar_url":"https://avatars.githubusercontent.com/u/1017173?v=3","gravatar_id":"","url":"https://api.github.com/users/NickDraper","html_url":"https://github.com/NickDraper","followers_url":"https://api.github.com/users/NickDraper/followers","following_url":"https://api.github.com/users/NickDraper/following{/other_user}","gists_url":"https://api.github.com/users/NickDraper/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDraper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDraper/subscriptions","organizations_url":"https://api.github.com/users/NickDraper/orgs","repos_url":"https://api.github.com/users/NickDraper/repos","events_url":"https://api.github.com/users/NickDraper/events{/privacy}","received_events_url":"https://api.github.com/users/NickDraper/received_events","type":"User","site_admin":false},"body":"Design document for Algorithm usage statistics","created_at":"2015-11-30T15:24:08Z","updated_at":"2015-11-30T16:12:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30663f9bb312da24871af219fb01e67f8e9cae2c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mantidproject/documents/pulls/5/commits","review_comments_url":"https://api.github.com/repos/mantidproject/documents/pulls/5/comments","review_comment_url":"https://api.github.com/repos/mantidproject/documents/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mantidproject/documents/issues/5/comments","statuses_url":"https://api.github.com/repos/mantidproject/documents/statuses/76f950e8978a4a1f1a6867686fec06c0eedc5e06","head":{"label":"mantidproject:Algorithm_usage_statistics_design","ref":"Algorithm_usage_statistics_design","sha":"76f950e8978a4a1f1a6867686fec06c0eedc5e06","user":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2577235,"name":"documents","full_name":"mantidproject/documents","owner":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantidproject/documents","description":"Holds documents relating to the Mantid project","fork":false,"url":"https://api.github.com/repos/mantidproject/documents","forks_url":"https://api.github.com/repos/mantidproject/documents/forks","keys_url":"https://api.github.com/repos/mantidproject/documents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantidproject/documents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantidproject/documents/teams","hooks_url":"https://api.github.com/repos/mantidproject/documents/hooks","issue_events_url":"https://api.github.com/repos/mantidproject/documents/issues/events{/number}","events_url":"https://api.github.com/repos/mantidproject/documents/events","assignees_url":"https://api.github.com/repos/mantidproject/documents/assignees{/user}","branches_url":"https://api.github.com/repos/mantidproject/documents/branches{/branch}","tags_url":"https://api.github.com/repos/mantidproject/documents/tags","blobs_url":"https://api.github.com/repos/mantidproject/documents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantidproject/documents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantidproject/documents/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantidproject/documents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantidproject/documents/statuses/{sha}","languages_url":"https://api.github.com/repos/mantidproject/documents/languages","stargazers_url":"https://api.github.com/repos/mantidproject/documents/stargazers","contributors_url":"https://api.github.com/repos/mantidproject/documents/contributors","subscribers_url":"https://api.github.com/repos/mantidproject/documents/subscribers","subscription_url":"https://api.github.com/repos/mantidproject/documents/subscription","commits_url":"https://api.github.com/repos/mantidproject/documents/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantidproject/documents/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantidproject/documents/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantidproject/documents/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantidproject/documents/contents/{+path}","compare_url":"https://api.github.com/repos/mantidproject/documents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantidproject/documents/merges","archive_url":"https://api.github.com/repos/mantidproject/documents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantidproject/documents/downloads","issues_url":"https://api.github.com/repos/mantidproject/documents/issues{/number}","pulls_url":"https://api.github.com/repos/mantidproject/documents/pulls{/number}","milestones_url":"https://api.github.com/repos/mantidproject/documents/milestones{/number}","notifications_url":"https://api.github.com/repos/mantidproject/documents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantidproject/documents/labels{/name}","releases_url":"https://api.github.com/repos/mantidproject/documents/releases{/id}","created_at":"2011-10-14T16:05:10Z","updated_at":"2015-05-05T21:18:27Z","pushed_at":"2015-11-30T15:24:08Z","git_url":"git://github.com/mantidproject/documents.git","ssh_url":"git@github.com:mantidproject/documents.git","clone_url":"https://github.com/mantidproject/documents.git","svn_url":"https://github.com/mantidproject/documents","homepage":"www.mantidproject.org","size":1251080,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"mantidproject:master","ref":"master","sha":"1f1e825e787b19abcbf6ba9ea9d2e6507f9eb0f6","user":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2577235,"name":"documents","full_name":"mantidproject/documents","owner":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantidproject/documents","description":"Holds documents relating to the Mantid project","fork":false,"url":"https://api.github.com/repos/mantidproject/documents","forks_url":"https://api.github.com/repos/mantidproject/documents/forks","keys_url":"https://api.github.com/repos/mantidproject/documents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantidproject/documents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantidproject/documents/teams","hooks_url":"https://api.github.com/repos/mantidproject/documents/hooks","issue_events_url":"https://api.github.com/repos/mantidproject/documents/issues/events{/number}","events_url":"https://api.github.com/repos/mantidproject/documents/events","assignees_url":"https://api.github.com/repos/mantidproject/documents/assignees{/user}","branches_url":"https://api.github.com/repos/mantidproject/documents/branches{/branch}","tags_url":"https://api.github.com/repos/mantidproject/documents/tags","blobs_url":"https://api.github.com/repos/mantidproject/documents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantidproject/documents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantidproject/documents/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantidproject/documents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantidproject/documents/statuses/{sha}","languages_url":"https://api.github.com/repos/mantidproject/documents/languages","stargazers_url":"https://api.github.com/repos/mantidproject/documents/stargazers","contributors_url":"https://api.github.com/repos/mantidproject/documents/contributors","subscribers_url":"https://api.github.com/repos/mantidproject/documents/subscribers","subscription_url":"https://api.github.com/repos/mantidproject/documents/subscription","commits_url":"https://api.github.com/repos/mantidproject/documents/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantidproject/documents/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantidproject/documents/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantidproject/documents/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantidproject/documents/contents/{+path}","compare_url":"https://api.github.com/repos/mantidproject/documents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantidproject/documents/merges","archive_url":"https://api.github.com/repos/mantidproject/documents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantidproject/documents/downloads","issues_url":"https://api.github.com/repos/mantidproject/documents/issues{/number}","pulls_url":"https://api.github.com/repos/mantidproject/documents/pulls{/number}","milestones_url":"https://api.github.com/repos/mantidproject/documents/milestones{/number}","notifications_url":"https://api.github.com/repos/mantidproject/documents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantidproject/documents/labels{/name}","releases_url":"https://api.github.com/repos/mantidproject/documents/releases{/id}","created_at":"2011-10-14T16:05:10Z","updated_at":"2015-05-05T21:18:27Z","pushed_at":"2015-11-30T15:24:08Z","git_url":"git://github.com/mantidproject/documents.git","ssh_url":"git@github.com:mantidproject/documents.git","clone_url":"https://github.com/mantidproject/documents.git","svn_url":"https://github.com/mantidproject/documents","homepage":"www.mantidproject.org","size":1251080,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/5"},"html":{"href":"https://github.com/mantidproject/documents/pull/5"},"issue":{"href":"https://api.github.com/repos/mantidproject/documents/issues/5"},"comments":{"href":"https://api.github.com/repos/mantidproject/documents/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mantidproject/documents/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/mantidproject/documents/statuses/76f950e8978a4a1f1a6867686fec06c0eedc5e06"}}}}