From 1ce06f8a8e44e81e1b51ce1a4743514afda5848a Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 1 Jul 2016 17:53:49 +0100 Subject: [PATCH] perf script updates --- tests/scripts/compiler-perf-results.txt | 3 +++ tests/scripts/compiler-perf.fsx | 25 ++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/tests/scripts/compiler-perf-results.txt b/tests/scripts/compiler-perf-results.txt index fc139d46aa2..6928b41f6ae 100644 --- a/tests/scripts/compiler-perf-results.txt +++ b/tests/scripts/compiler-perf-results.txt @@ -7,3 +7,6 @@ https://github.com/forki/visualfsharp.git foreach_optimization d0ab5fec77482e128 https://github.com/forki/visualfsharp.git foreach_optimization d0ab5fec77482e1280578f47e3257cf660d7f1b2 0247247d480340c27ce7f7de9b2fbc3b7c598b03 207.31 10.91 31.03 46.78 62.39 52.11 https://github.com/dsyme/visualfsharp.git no-casts 53d633d6dba0d8f5fcd80f47f588d21cd7a2cff9 0247247d480340c27ce7f7de9b2fbc3b7c598b03 211.45 11.14 30.25 45.66 61.73 53.84 https://github.com/dsyme/visualfsharp.git no-casts 53d633d6dba0d8f5fcd80f47f588d21cd7a2cff9 0247247d480340c27ce7f7de9b2fbc3b7c598b03 207.08 10.69 31.23 46.47 61.97 52.14 +https://github.com/dsyme/visualfsharp.git no-casts 53d633d6dba0d8f5fcd80f47f588d21cd7a2cff9 0247247d480340c27ce7f7de9b2fbc3b7c598b03 208.58 11.25 31.70 47.69 63.06 52.61 +https://github.com/forki/visualfsharp.git foreach_optimization d0ab5fec77482e1280578f47e3257cf660d7f1b2 0247247d480340c27ce7f7de9b2fbc3b7c598b03 211.23 11.36 31.42 47.38 63.22 53.54 +https://github.com/Microsoft/visualfsharp master 0247247d480340c27ce7f7de9b2fbc3b7c598b03 0247247d480340c27ce7f7de9b2fbc3b7c598b03 206.02 11.31 32.09 47.31 63.09 51.53 diff --git a/tests/scripts/compiler-perf.fsx b/tests/scripts/compiler-perf.fsx index e12db371e30..309b3e5294f 100644 --- a/tests/scripts/compiler-perf.fsx +++ b/tests/scripts/compiler-perf.fsx @@ -43,17 +43,24 @@ type Commits = JsonProvider< const (repoApi + "/commits")> type Pulls = JsonProvider< const (repoApi + "/pulls")> +//type Comments = JsonProvider< "https://api.github.com/repos/Microsoft/visualfsharp/issues/848/comments"> +//let comments = Comments.GetSamples() + let commits = Commits.GetSamples() let pulls = Pulls.GetSamples() -//let buildSpecs = [ for pr in pulls -> (pr.Head.Repo.CloneUrl, pr.Head.Sha, pr.Base.Sha, pr.Head.Ref, pr.Number) ] +let repoHeadSha = commits.[0].Sha +// Do performance testing on all open PRs that have [CompilerPerf] in the title let buildSpecs = - [ - ("https://github.com/dsyme/visualfsharp.git","53d633d6dba0d8f5fcd80f47f588d21cd7a2cff9", "0247247d480340c27ce7f7de9b2fbc3b7c598b03", "no-casts", 1308); - ("https://github.com/forki/visualfsharp.git", "d0ab5fec77482e1280578f47e3257cf660d7f1b2", "0247247d480340c27ce7f7de9b2fbc3b7c598b03", "foreach_optimization", 1303); - (repo, "0247247d480340c27ce7f7de9b2fbc3b7c598b03", "0247247d480340c27ce7f7de9b2fbc3b7c598b03", "master", 0); - ] + [ for pr in pulls do + //let comments = Comments.Load(pr.CommentsUrl) + if pr.Title.Contains("[CompilerPerf]") then + yield (pr.Head.Repo.CloneUrl, pr.Head.Sha, repoHeadSha, pr.Head.Ref, pr.Number) + // ("https://github.com/dsyme/visualfsharp.git","53d633d6dba0d8f5fcd80f47f588d21cd7a2cff9", repoHeadSha, "no-casts", 1308); + //yield ("https://github.com/forki/visualfsharp.git", "d0ab5fec77482e1280578f47e3257cf660d7f1b2", repoHeadSha, "foreach_optimization", 1303); + yield (repo, repoHeadSha, repoHeadSha, "master", 0); + ] let time f = @@ -68,6 +75,7 @@ let exec cmd args dir = let result = Shell.Exec(cmd,args,dir) if result <> 0 then failwith (sprintf "FAILED: %s> %s %s" dir cmd args) +/// Build a specific version of the repo, run compiler perf tests and record the result let build(cloneUrl,sha:string,baseSha,ref,prNumber) = let branch = "build-" + string prNumber + "-" + ref + "-" + sha.[0..7] let dirBase = __SOURCE_DIRECTORY__ @@ -123,11 +131,6 @@ let build(cloneUrl,sha:string,baseSha,ref,prNumber) = () -//build(repo, "0247247d480340c27ce7f7de9b2fbc3b7c598b03", "master", 102) -//build(repo, "830a1d4379454d8876fd57b13c16e033c1a7eb1c", "master", 101) -//build(repo, "f47a6bb73e51ce43596c793a1e0a887664ffcfd7", "master", 100) - - for info in buildSpecs do try build info