{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/119247100","pull_request_review_id":41108635,"id":119247100,"diff_hunk":"@@ -0,0 +1,45 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the MIT License. See License.txt in the project root for license information.\n+\n+using System;\n+using System.Diagnostics.CodeAnalysis;\n+\n+namespace Microsoft.Azure.WebJobs.Script.Scaling\n+{\n+    [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", Justification = \"By design\")]\n+    public static class ArgumentUtils\n+    {\n+        public static void ValidateArgument(string name, string arg)\n+        {\n+            if (string.IsNullOrEmpty(arg))\n+            {\n+                throw new ArgumentNullException(name, \"Parameter must not be null or empty.\");\n+            }\n+        }\n+\n+        public static void ValidateArgument(string name, object arg)\n+        {\n+            if (arg == null)\n+            {\n+                throw new ArgumentNullException(name, \"Parameter must not be null.\");\n+            }\n+        }\n+\n+        public static void ValidateArgument(IWorkerInfo worker)\n+        {\n+            ValidateArgument(\"worker\", (object)worker);\n+            ValidateArgument(\"worker.SiteName\", worker.SiteName);","path":"src/WebJobs.Script.Scaling/ArgumentUtils.cs","position":31,"original_position":31,"commit_id":"1e701bb26b4c2b9bffe27908a76da0aebdc2993c","original_commit_id":"1e701bb26b4c2b9bffe27908a76da0aebdc2993c","user":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars0.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"body":"Must be the new C# 7 thing.   Will fix it.","created_at":"2017-05-31T00:27:51Z","updated_at":"2017-05-31T00:27:51Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549#discussion_r119247100","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/119247100"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549#discussion_r119247100"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549","id":122737326,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549","diff_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/1549","number":1549,"state":"open","locked":false,"title":"Initial ScaleManager implementation","user":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars0.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"body":"This is initial implementation per design discussion with @davidebbo , @paulbatum and @mathewc.   We reviewed and walked thru all the codes with @ruslany and @jocawtho. \r\n\r\nThe entry point for function runtime are ..\r\n\r\n```csharp\r\nAzureScaleManager.UpdateWorkStatus(string activityId, int loadFactor);\r\n```\r\nAll the knobs are `ScaleSettings.Instance`.\r\n\r\n```csharp\r\nScaleSettings.Instance.BusyWorkerLoadFactor = 80;\r\n```\r\n\r\nBuild and test results.\r\n```\r\n  === TEST EXECUTION SUMMARY ===\r\n     Microsoft.Azure.WebJobs.Script.Scaling.Tests  Total:  86, Errors: 0, Failed: 0, Skipped: 0, Time:   3.377s\r\n     Microsoft.Azure.WebJobs.Script.Tests          Total: 538, Errors: 0, Failed: 0, Skipped: 0, Time:  97.832s\r\n                                                          ---          -          -           -        --------\r\n                                             GRAND TOTAL: 624          0          0           0        101.209s (118.309s)\r\n```\r\n\r\n","created_at":"2017-05-27T00:05:06Z","updated_at":"2017-05-31T00:27:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d12382d6aee02cbc2895daaf1d1ce9c0cce1a1a7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/1549/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/1e701bb26b4c2b9bffe27908a76da0aebdc2993c","head":{"label":"suwatch:suwatch_work","ref":"suwatch_work","sha":"1e701bb26b4c2b9bffe27908a76da0aebdc2993c","user":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars0.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"repo":{"id":64435426,"name":"azure-webjobs-sdk-script","full_name":"suwatch/azure-webjobs-sdk-script","owner":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars0.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/suwatch/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":true,"url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/suwatch/azure-webjobs-sdk-script/deployments","created_at":"2016-07-28T23:44:29Z","updated_at":"2016-07-28T23:44:32Z","pushed_at":"2017-05-26T23:54:06Z","git_url":"git://github.com/suwatch/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:suwatch/azure-webjobs-sdk-script.git","clone_url":"https://github.com/suwatch/azure-webjobs-sdk-script.git","svn_url":"https://github.com/suwatch/azure-webjobs-sdk-script","homepage":"","size":18075,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"699205a9353ea7b32326197c8bf15521c35c1027","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2017-05-31T00:19:01Z","pushed_at":"2017-05-31T00:06:37Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":18357,"stargazers_count":283,"watchers_count":283,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":252,"forks":97,"open_issues":252,"watchers":283,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/1549"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/1549"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/1549/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/1549/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/1e701bb26b4c2b9bffe27908a76da0aebdc2993c"}}}}
{"actor":{"display_login":"suwatch"}}