{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/cli/pulls/comments/61534110","id":61534110,"diff_hunk":"@@ -0,0 +1,285 @@\n+﻿// Copyright (c) .NET Foundation and contributors. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System.Linq;\n+using Microsoft.DotNet.Tools.Test.Utilities;\n+using Microsoft.Xunit.Performance;\n+using Microsoft.DotNet.TestFramework;\n+using System.IO;\n+using System.Runtime.CompilerServices;\n+using System;\n+\n+namespace Microsoft.DotNet.Tools.Builder.Tests\n+{\n+    public class BuildPerformanceTest : TestBase\n+    {\n+        private static string SingleTargetApp = \"SingleTargetApp\";\n+        private static string TwoTargetApp = \"TwoTargetApp\";\n+\n+        private static string[] SingleTargetGraph = new[]\n+        {\n+            \"SingleTargetGraph/SingleTargetP0\",\n+            \"SingleTargetGraph/SingleTargetP1\",\n+            \"SingleTargetGraph/SingleTargetP2\"\n+        };\n+\n+        private static string[] TwoTargetGraph = new[]\n+        {\n+            \"TwoTargetGraph/TwoTargetP0\",\n+            \"TwoTargetGraph/TwoTargetP1\",\n+            \"TwoTargetGraph/TwoTargetP2\"\n+        };\n+\n+        private static string[] TwoTargetGraphLarge = new[]\n+        {\n+            \"TwoTargetGraphLarge/TwoTargetLargeP0\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP1\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP2\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP3\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP4\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP5\",\n+            \"TwoTargetGraphLarge/TwoTargetLargeP6\"\n+        };\n+\n+        [Benchmark]\n+        public void BuildSingleProject_SingleTargetApp() => BuildSingleProject(CreateTestInstance(SingleTargetApp));\n+        [Benchmark]\n+        public void BuildSingleProject_TwoTargetApp() => BuildSingleProject(CreateTestInstance(TwoTargetApp));\n+\n+        public void BuildSingleProject(TestInstance instance)\n+        {\n+            foreach (var iteration in Benchmark.Iterations)\n+            {\n+                using (iteration.StartMeasurement())\n+                {\n+                    new BuildCommand(instance.TestRoot, buildProfile: false)","path":"test/Performance/BuildPerformanceTest.cs","position":55,"original_position":55,"commit_id":"842bfc1963e22503852540d6749a5fc68a3ca63f","original_commit_id":"842bfc1963e22503852540d6749a5fc68a3ca63f","user":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars.githubusercontent.com/u/1697911?v=3","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"body":"Overhead is minimal, we are measuring in seconds, object allocation is quick event compared to process start overhead.","created_at":"2016-04-29T04:47:25Z","updated_at":"2016-04-29T04:47:25Z","html_url":"https://github.com/dotnet/cli/pull/2663#discussion_r61534110","pull_request_url":"https://api.github.com/repos/dotnet/cli/pulls/2663","_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments/61534110"},"html":{"href":"https://github.com/dotnet/cli/pull/2663#discussion_r61534110"},"pull_request":{"href":"https://api.github.com/repos/dotnet/cli/pulls/2663"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/cli/pulls/2663","id":67588536,"html_url":"https://github.com/dotnet/cli/pull/2663","diff_url":"https://github.com/dotnet/cli/pull/2663.diff","patch_url":"https://github.com/dotnet/cli/pull/2663.patch","issue_url":"https://api.github.com/repos/dotnet/cli/issues/2663","number":2663,"state":"open","locked":false,"title":"Add performance tests","user":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars.githubusercontent.com/u/1697911?v=3","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"body":"@davidfowl\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/dotnet/cli/2663)\n<!-- Reviewable:end -->\n","created_at":"2016-04-23T00:07:23Z","updated_at":"2016-04-29T04:47:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"168817536ca95b3f0ec9825d583b985c59a8c063","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/cli/pulls/2663/commits","review_comments_url":"https://api.github.com/repos/dotnet/cli/pulls/2663/comments","review_comment_url":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/2663/comments","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/842bfc1963e22503852540d6749a5fc68a3ca63f","head":{"label":"dotnet:pakrym/perf-tests","ref":"pakrym/perf-tests","sha":"842bfc1963e22503852540d6749a5fc68a3ca63f","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":43568107,"name":"cli","full_name":"dotnet/cli","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/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":false,"url":"https://api.github.com/repos/dotnet/cli","forks_url":"https://api.github.com/repos/dotnet/cli/forks","keys_url":"https://api.github.com/repos/dotnet/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/cli/teams","hooks_url":"https://api.github.com/repos/dotnet/cli/hooks","issue_events_url":"https://api.github.com/repos/dotnet/cli/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/cli/events","assignees_url":"https://api.github.com/repos/dotnet/cli/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/cli/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/cli/tags","blobs_url":"https://api.github.com/repos/dotnet/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/cli/languages","stargazers_url":"https://api.github.com/repos/dotnet/cli/stargazers","contributors_url":"https://api.github.com/repos/dotnet/cli/contributors","subscribers_url":"https://api.github.com/repos/dotnet/cli/subscribers","subscription_url":"https://api.github.com/repos/dotnet/cli/subscription","commits_url":"https://api.github.com/repos/dotnet/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/cli/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/cli/merges","archive_url":"https://api.github.com/repos/dotnet/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/cli/downloads","issues_url":"https://api.github.com/repos/dotnet/cli/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/cli/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/cli/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/cli/deployments","created_at":"2015-10-02T18:03:15Z","updated_at":"2016-04-29T03:37:59Z","pushed_at":"2016-04-29T02:16:42Z","git_url":"git://github.com/dotnet/cli.git","ssh_url":"git@github.com:dotnet/cli.git","clone_url":"https://github.com/dotnet/cli.git","svn_url":"https://github.com/dotnet/cli","homepage":"http://dotnet.github.io/","size":28500,"stargazers_count":885,"watchers_count":885,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":707,"forks":177,"open_issues":707,"watchers":885,"default_branch":"rel/1.0.0"}},"base":{"label":"dotnet:rel/1.0.0","ref":"rel/1.0.0","sha":"f8300f8747ceb91c39861e59ee2bedc40e757627","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":43568107,"name":"cli","full_name":"dotnet/cli","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/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":false,"url":"https://api.github.com/repos/dotnet/cli","forks_url":"https://api.github.com/repos/dotnet/cli/forks","keys_url":"https://api.github.com/repos/dotnet/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/cli/teams","hooks_url":"https://api.github.com/repos/dotnet/cli/hooks","issue_events_url":"https://api.github.com/repos/dotnet/cli/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/cli/events","assignees_url":"https://api.github.com/repos/dotnet/cli/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/cli/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/cli/tags","blobs_url":"https://api.github.com/repos/dotnet/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/cli/languages","stargazers_url":"https://api.github.com/repos/dotnet/cli/stargazers","contributors_url":"https://api.github.com/repos/dotnet/cli/contributors","subscribers_url":"https://api.github.com/repos/dotnet/cli/subscribers","subscription_url":"https://api.github.com/repos/dotnet/cli/subscription","commits_url":"https://api.github.com/repos/dotnet/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/cli/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/cli/merges","archive_url":"https://api.github.com/repos/dotnet/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/cli/downloads","issues_url":"https://api.github.com/repos/dotnet/cli/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/cli/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/cli/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/cli/deployments","created_at":"2015-10-02T18:03:15Z","updated_at":"2016-04-29T03:37:59Z","pushed_at":"2016-04-29T02:16:42Z","git_url":"git://github.com/dotnet/cli.git","ssh_url":"git@github.com:dotnet/cli.git","clone_url":"https://github.com/dotnet/cli.git","svn_url":"https://github.com/dotnet/cli","homepage":"http://dotnet.github.io/","size":28500,"stargazers_count":885,"watchers_count":885,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":707,"forks":177,"open_issues":707,"watchers":885,"default_branch":"rel/1.0.0"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/2663"},"html":{"href":"https://github.com/dotnet/cli/pull/2663"},"issue":{"href":"https://api.github.com/repos/dotnet/cli/issues/2663"},"comments":{"href":"https://api.github.com/repos/dotnet/cli/issues/2663/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/cli/pulls/2663/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/cli/pulls/2663/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/cli/statuses/842bfc1963e22503852540d6749a5fc68a3ca63f"}}}}