{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/62240910","id":62240910,"diff_hunk":"@@ -0,0 +1,34 @@\n+﻿using System;\n+using System.Diagnostics;\n+using System.IO;\n+using System.Threading;\n+using System.Threading.Tasks;\n+\n+Task.Run(() => StartWatching());\n+Console.WriteLine(\"Press any key to continue\");\n+Console.Read();\n+\n+void StartWatching()\n+{\n+    FileSystemWatcher watcher = new FileSystemWatcher();\n+    watcher.Path = Args[0];\n+    watcher.Created += new FileSystemEventHandler(OnChanged);\n+    watcher.IncludeSubdirectories = false;\n+    watcher.EnableRaisingEvents = true;\n+    while (true)\n+    {\n+        // Stay in loop\n+    }\n+}\n+\n+void OnChanged(object sender, FileSystemEventArgs e)\n+{\n+    // Wait for 120 seconds to make sure all the contents are copied over to the share\n+    // If there is a better estimate then we can modify the wait time to be a little over the estimate.\n+    Thread.Sleep(120000);","path":"src/Test/Perf/infra/monitor_and_start_test.csx","position":28,"original_position":28,"commit_id":"d88c56b6db7ff4c8fe8d5f4ccf474ed8345ac46c","original_commit_id":"d88c56b6db7ff4c8fe8d5f4ccf474ed8345ac46c","user":{"login":"basoundr","id":10550513,"avatar_url":"https://avatars.githubusercontent.com/u/10550513?v=3","gravatar_id":"","url":"https://api.github.com/users/basoundr","html_url":"https://github.com/basoundr","followers_url":"https://api.github.com/users/basoundr/followers","following_url":"https://api.github.com/users/basoundr/following{/other_user}","gists_url":"https://api.github.com/users/basoundr/gists{/gist_id}","starred_url":"https://api.github.com/users/basoundr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basoundr/subscriptions","organizations_url":"https://api.github.com/users/basoundr/orgs","repos_url":"https://api.github.com/users/basoundr/repos","events_url":"https://api.github.com/users/basoundr/events{/privacy}","received_events_url":"https://api.github.com/users/basoundr/received_events","type":"User","site_admin":false},"body":"I would assume that the build produces the binaries and keeps it in the build machine until all of the build process is done. Once the build process is done, we copy everything over to the share. So above approach wont work","created_at":"2016-05-05T19:28:58Z","updated_at":"2016-05-05T19:28:58Z","html_url":"https://github.com/dotnet/roslyn/pull/11085#discussion_r62240910","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/11085","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/62240910"},"html":{"href":"https://github.com/dotnet/roslyn/pull/11085#discussion_r62240910"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/11085"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/11085","id":68969859,"html_url":"https://github.com/dotnet/roslyn/pull/11085","diff_url":"https://github.com/dotnet/roslyn/pull/11085.diff","patch_url":"https://github.com/dotnet/roslyn/pull/11085.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/11085","number":11085,"state":"open","locked":false,"title":"Monitor share to run automation","user":{"login":"basoundr","id":10550513,"avatar_url":"https://avatars.githubusercontent.com/u/10550513?v=3","gravatar_id":"","url":"https://api.github.com/users/basoundr","html_url":"https://github.com/basoundr","followers_url":"https://api.github.com/users/basoundr/followers","following_url":"https://api.github.com/users/basoundr/following{/other_user}","gists_url":"https://api.github.com/users/basoundr/gists{/gist_id}","starred_url":"https://api.github.com/users/basoundr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basoundr/subscriptions","organizations_url":"https://api.github.com/users/basoundr/orgs","repos_url":"https://api.github.com/users/basoundr/repos","events_url":"https://api.github.com/users/basoundr/events{/privacy}","received_events_url":"https://api.github.com/users/basoundr/received_events","type":"User","site_admin":false},"body":"We can now monitor any share and trigger an automated test run when we see a new build has been for a particular build share\r\n\r\nThe flow is,\r\n1. MonitorShareTask starts a monitor_and_start_test process which is constantly listening for new binaries in the build output folder\r\n2. When the new binaries arrive, we start the TriggerAutomation which will fetch the new binaries and start the autoamted tests.\r\n\r\nMonitorShareTask mentions the share to monitor and it can be added a scheduled task in all the performance infra machines as a startup task.\r\n\r\nTagging @KevinH-MS @rchande @TyOverby for review","created_at":"2016-05-05T06:12:53Z","updated_at":"2016-05-05T19:28:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cce9599f79a04818da82b5f632eb79d14264fe50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/11085/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/11085/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/11085/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/d88c56b6db7ff4c8fe8d5f4ccf474ed8345ac46c","head":{"label":"basoundr:MonitorTask","ref":"MonitorTask","sha":"d88c56b6db7ff4c8fe8d5f4ccf474ed8345ac46c","user":{"login":"basoundr","id":10550513,"avatar_url":"https://avatars.githubusercontent.com/u/10550513?v=3","gravatar_id":"","url":"https://api.github.com/users/basoundr","html_url":"https://github.com/basoundr","followers_url":"https://api.github.com/users/basoundr/followers","following_url":"https://api.github.com/users/basoundr/following{/other_user}","gists_url":"https://api.github.com/users/basoundr/gists{/gist_id}","starred_url":"https://api.github.com/users/basoundr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basoundr/subscriptions","organizations_url":"https://api.github.com/users/basoundr/orgs","repos_url":"https://api.github.com/users/basoundr/repos","events_url":"https://api.github.com/users/basoundr/events{/privacy}","received_events_url":"https://api.github.com/users/basoundr/received_events","type":"User","site_admin":false},"repo":{"id":30552118,"name":"roslyn","full_name":"basoundr/roslyn","owner":{"login":"basoundr","id":10550513,"avatar_url":"https://avatars.githubusercontent.com/u/10550513?v=3","gravatar_id":"","url":"https://api.github.com/users/basoundr","html_url":"https://github.com/basoundr","followers_url":"https://api.github.com/users/basoundr/followers","following_url":"https://api.github.com/users/basoundr/following{/other_user}","gists_url":"https://api.github.com/users/basoundr/gists{/gist_id}","starred_url":"https://api.github.com/users/basoundr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basoundr/subscriptions","organizations_url":"https://api.github.com/users/basoundr/orgs","repos_url":"https://api.github.com/users/basoundr/repos","events_url":"https://api.github.com/users/basoundr/events{/privacy}","received_events_url":"https://api.github.com/users/basoundr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/basoundr/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/basoundr/roslyn","forks_url":"https://api.github.com/repos/basoundr/roslyn/forks","keys_url":"https://api.github.com/repos/basoundr/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basoundr/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basoundr/roslyn/teams","hooks_url":"https://api.github.com/repos/basoundr/roslyn/hooks","issue_events_url":"https://api.github.com/repos/basoundr/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/basoundr/roslyn/events","assignees_url":"https://api.github.com/repos/basoundr/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/basoundr/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/basoundr/roslyn/tags","blobs_url":"https://api.github.com/repos/basoundr/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basoundr/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basoundr/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/basoundr/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basoundr/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/basoundr/roslyn/languages","stargazers_url":"https://api.github.com/repos/basoundr/roslyn/stargazers","contributors_url":"https://api.github.com/repos/basoundr/roslyn/contributors","subscribers_url":"https://api.github.com/repos/basoundr/roslyn/subscribers","subscription_url":"https://api.github.com/repos/basoundr/roslyn/subscription","commits_url":"https://api.github.com/repos/basoundr/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/basoundr/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/basoundr/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/basoundr/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/basoundr/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/basoundr/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basoundr/roslyn/merges","archive_url":"https://api.github.com/repos/basoundr/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basoundr/roslyn/downloads","issues_url":"https://api.github.com/repos/basoundr/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/basoundr/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/basoundr/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/basoundr/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basoundr/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/basoundr/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/basoundr/roslyn/deployments","created_at":"2015-02-09T18:50:00Z","updated_at":"2016-04-08T15:52:24Z","pushed_at":"2016-05-05T16:26:22Z","git_url":"git://github.com/basoundr/roslyn.git","ssh_url":"git@github.com:basoundr/roslyn.git","clone_url":"https://github.com/basoundr/roslyn.git","svn_url":"https://github.com/basoundr/roslyn","homepage":"","size":142862,"stargazers_count":0,"watchers_count":0,"language":"C#","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":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"58230a04bbe1f288a43e0fea81feb29109e06cff","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2016-05-05T18:53:25Z","pushed_at":"2016-05-05T19:18:40Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":290203,"stargazers_count":5052,"watchers_count":5052,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1276,"mirror_url":null,"open_issues_count":2780,"forks":1276,"open_issues":2780,"watchers":5052,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/11085"},"html":{"href":"https://github.com/dotnet/roslyn/pull/11085"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/11085"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/11085/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/11085/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/11085/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/d88c56b6db7ff4c8fe8d5f4ccf474ed8345ac46c"}}}}