diff --git a/FSharp.Benchmarks.sln b/FSharp.Benchmarks.sln
index 2ace22c151..e04c208232 100644
--- a/FSharp.Benchmarks.sln
+++ b/FSharp.Benchmarks.sln
@@ -1,4 +1,5 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
@@ -26,6 +27,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FCSSourceFiles", "tests\ben
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Test.Utilities", "tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{0B149238-0912-493E-8877-F831AE01B942}"
EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{62DED1EA-6A33-4537-8ED2-118462D0FEE5}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -109,6 +112,14 @@ Global
{0B149238-0912-493E-8877-F831AE01B942}.Release|Any CPU.Build.0 = Release|Any CPU
{0B149238-0912-493E-8877-F831AE01B942}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU
{0B149238-0912-493E-8877-F831AE01B942}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.ReleaseCompressed|Any CPU.ActiveCfg = Release|Any CPU
+ {62DED1EA-6A33-4537-8ED2-118462D0FEE5}.ReleaseCompressed|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/FSharp.Compiler.Service.sln b/FSharp.Compiler.Service.sln
index ca14b9f9e0..45997f8a6d 100644
--- a/FSharp.Compiler.Service.sln
+++ b/FSharp.Compiler.Service.sln
@@ -61,6 +61,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Interactive
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}"
EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -143,6 +145,10 @@ Global
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -154,6 +160,7 @@ Global
{35F5F1C5-AE4F-4B5A-8D94-1AF708724FD5} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
{C1950E28-1CB7-4DEC-BB3A-8A0443A17282} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
{07CD957A-3C31-4F75-A735-16CE72E1BD71} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
+ {A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F9A60F3B-D894-4C8E-BA0F-C51115B25A5A}
diff --git a/FSharp.sln b/FSharp.sln
index c021f7026b..5ce2e4eeb3 100644
--- a/FSharp.sln
+++ b/FSharp.sln
@@ -106,6 +106,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\Compiler\FSCompCheck.fsx = src\Compiler\FSCompCheck.fsx
EndProjectSection
EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{7D482560-DF6F-46A5-B50C-20ECF7C38759}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -416,6 +418,18 @@ Global
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|Any CPU.Build.0 = Release|Any CPU
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|x86.ActiveCfg = Release|Any CPU
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|x86.Build.0 = Release|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|x86.Build.0 = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|x86.ActiveCfg = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|x86.Build.0 = Debug|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|x86.ActiveCfg = Release|Any CPU
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -447,6 +461,7 @@ Global
{209C7D37-8C01-413C-8698-EC25F4C86976} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{BEC6E796-7E53-4888-AAFC-B8FD55C425DF} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
+ {7D482560-DF6F-46A5-B50C-20ECF7C38759} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD5177C7-1380-40E7-94D2-7768E1A8B1B8}
diff --git a/VisualFSharp.sln b/VisualFSharp.sln
index 485d887f3c..486cc03a16 100644
--- a/VisualFSharp.sln
+++ b/VisualFSharp.sln
@@ -193,6 +193,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor.Tests", "vsin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Editor.IntegrationTests", "vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj", "{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}"
EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{6734FC6F-B5F3-45E1-9A72-720378BB49C9}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1019,6 +1021,18 @@ Global
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|Any CPU.Build.0 = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.ActiveCfg = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.Build.0 = Release|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|x86.Build.0 = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|x86.ActiveCfg = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|x86.Build.0 = Debug|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.ActiveCfg = Release|Any CPU
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1099,6 +1113,7 @@ Global
{39CDF34B-FB23-49AE-AB27-0975DA379BB5} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{CBC96CC7-65AB-46EA-A82E-F6A788DABF80} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
+ {6734FC6F-B5F3-45E1-9A72-720378BB49C9} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37}
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 1de2f4309f..afd393f820 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -713,14 +713,14 @@ stages:
continueOnError: true
condition: always()
- # Build benchmarks
- - job: Plain_Build_Benchmarks
+ # Build and run fast benchmarks
+ - job: Benchmarks
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
variables:
- name: _BuildConfig
- value: Debug
+ value: Release
steps:
- checkout: self
clean: true
@@ -734,11 +734,15 @@ stages:
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- - script: dotnet build .\FSharp.Benchmarks.sln /bl:\"artifacts/log/$(_BuildConfig)/BenchmarkBuild.binlog\"
+ - script: dotnet build -c $(_BuildConfig) .\FSharp.Benchmarks.sln /bl:\"artifacts/log/$(_BuildConfig)/BenchmarkBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)
- displayName: Regular rebuild of FSharp.Benchmarks.sln
+ displayName: Plain build of FSharp.Benchmarks.sln
continueOnError: true
condition: always()
+ - script: .\Build.cmd -c $(_BuildConfig)
+ - pwsh: ./SmokeTestBenchmarks.ps1
+ workingDirectory: $(Build.SourcesDirectory)/tests/benchmarks
+ displayName: Smoke test fast benchmarks
# Test trimming on Windows
- job: Build_And_Test_Trimming_Windows
diff --git a/buildtools/AssemblyCheck/SkipVerifyEmbeddedPdb.txt b/buildtools/AssemblyCheck/SkipVerifyEmbeddedPdb.txt
index f823017f4a..07ec037928 100644
--- a/buildtools/AssemblyCheck/SkipVerifyEmbeddedPdb.txt
+++ b/buildtools/AssemblyCheck/SkipVerifyEmbeddedPdb.txt
@@ -1,4 +1,5 @@
FSharp.Build.UnitTests.dll
+FSharp.Benchmarks.Common.dll
FSharp.Compiler.Benchmarks.dll
FSharp.Compiler.ComponentTests.dll
FSharp.Test.Utilities.dll
diff --git a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
index 2534ba292b..09ca5cb691 100644
--- a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
@@ -59,6 +59,9 @@
$(FSharpCoreDllPath)
+
+
+
diff --git a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/Program.fs b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/Program.fs
index 779a18a770..2a4f8af4ce 100644
--- a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/Program.fs
+++ b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/Program.fs
@@ -3,6 +3,7 @@ namespace HistoricalBenchmark
open System.IO
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
+open FSharp.Benchmarks.Common.Categories
[]
type SingleFileCompilerBenchmarkBase(compiler : SingleFileCompiler) =
@@ -20,6 +21,7 @@ type SingleFileCompilerBenchmarkBase(compiler : SingleFileCompiler) =
[]
[]
+[]
type DecentlySizedStandAloneFileBenchmark() =
inherit SingleFileCompilerBenchmarkBase(
SingleFileCompiler(
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/BackgroundCompilerBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/BackgroundCompilerBenchmarks.fs
index d7d643ab91..528557fa3d 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/BackgroundCompilerBenchmarks.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/BackgroundCompilerBenchmarks.fs
@@ -6,15 +6,10 @@ open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Text
open FSharp.Compiler.Diagnostics
open FSharp.Test.ProjectGeneration
-open BenchmarkDotNet.Engines
-
-
-[]
-let FSharpCategory = "fsharp"
-
+open FSharp.Benchmarks.Common.Categories
[]
-[]
+[]
type BackgroundCompilerBenchmarks () =
let size = 50
@@ -104,7 +99,7 @@ type BackgroundCompilerBenchmarks () =
this.Benchmark.DeleteProjectDir()
[]
-[]
+[]
type ParsingBenchmark() =
let mutable checker: FSharpChecker = Unchecked.defaultof<_>
@@ -134,7 +129,7 @@ type ParsingBenchmark() =
failwith "ParseHadErrors"
[]
-[]
+[]
type NoFileSystemCheckerBenchmark() =
let size = 30
@@ -229,8 +224,8 @@ type TestProjectType =
[]
[]
-[]
[]
+[]
type TransparentCompilerBenchmark() =
let size = 30
@@ -331,9 +326,9 @@ type TransparentCompilerBenchmark() =
benchmark.DeleteProjectDir()
+// needs Giraffe repo somewhere nearby, hence benchmarks disabled
[]
[]
-[]
[]
type TransparentCompilerGiraffeBenchmark() =
@@ -399,7 +394,7 @@ type TransparentCompilerGiraffeBenchmark() =
checkFile (this.Project.SourceFiles |> List.last).Id expectOk
}
- []
+ // []
member this.SomeWorkflow() =
use _ = Activity.start "Benchmark" [
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs
index 4910b2e19e..2b28cdce00 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs
@@ -12,6 +12,7 @@ open FSharp.Compiler.AbstractIL.ILBinaryReader
open BenchmarkDotNet.Attributes
open FSharp.Compiler.Benchmarks
open Microsoft.CodeAnalysis.Text
+open FSharp.Benchmarks.Common.Categories
type private Config =
{
@@ -66,6 +67,7 @@ let function%s{moduleName} (x: %s{moduleName}) =
[]
+[]
type CompilerServiceBenchmarks() =
let mutable configOpt : Config option = None
let sourcePath = Path.Combine(__SOURCE_DIRECTORY__, "../decentlySizedStandAloneFile.fs")
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/ComputationExpressionBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/ComputationExpressionBenchmarks.fs
index 92a7141822..815d481834 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/ComputationExpressionBenchmarks.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/ComputationExpressionBenchmarks.fs
@@ -4,12 +4,10 @@ open System.IO
open BenchmarkDotNet.Attributes
open FSharp.Compiler.CodeAnalysis
open FSharp.Test.ProjectGeneration
-
-[]
-let FSharpCategory = "fsharp"
+open FSharp.Benchmarks.Common.Categories
[]
-[]
+[]
type ComputationExpressionBenchmarks() =
let mutable sourceFileName = ""
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/DecentlySizedStandAloneFileBenchmark.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/DecentlySizedStandAloneFileBenchmark.fs
index 58dcb885e5..b1926b44e6 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/DecentlySizedStandAloneFileBenchmark.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/DecentlySizedStandAloneFileBenchmark.fs
@@ -4,6 +4,7 @@ open System.IO
open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Text
open BenchmarkDotNet.Attributes
+open FSharp.Benchmarks.Common.Categories
type private SingleFileCompilerConfig =
{
@@ -12,6 +13,7 @@ type private SingleFileCompilerConfig =
}
[]
+[]
type DecentlySizedStandAloneFileBenchmark() =
let mutable configOpt : SingleFileCompilerConfig option = None
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
index 55968eddda..043de02d37 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
@@ -25,6 +25,7 @@
+
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs
index 686153577f..6eddb5eb5b 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs
@@ -2,18 +2,13 @@
open System
open System.IO
-open System.Text
open FSharp.Compiler.CodeAnalysis
-open FSharp.Compiler.Diagnostics
-open FSharp.Compiler.EditorServices
open FSharp.Compiler.Text
-open FSharp.Compiler.AbstractIL.IL
-open FSharp.Compiler.AbstractIL.ILBinaryReader
open BenchmarkDotNet.Attributes
open FSharp.Compiler.Benchmarks
-open Microsoft.CodeAnalysis.Text
open BenchmarkDotNet.Order
open BenchmarkDotNet.Mathematics
+open FSharp.Benchmarks.Common.Categories
[]
module private CascadeProjectHelpers =
@@ -87,6 +82,7 @@ val processFunc{number}: x: MyType{number} -> func: MyFunctionType{number} -> As
[]
[]
[]
+[]
type FileCascadeBenchmarks() =
let mutable project : FSharpProjectOptions option = None
let filesToCreate = 128
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/GraphTypeCheckingBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/GraphTypeCheckingBenchmarks.fs
index dd16e8b13a..3f2f170a41 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/GraphTypeCheckingBenchmarks.fs
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/GraphTypeCheckingBenchmarks.fs
@@ -4,12 +4,10 @@ open System.IO
open BenchmarkDotNet.Attributes
open FSharp.Compiler.CodeAnalysis
open FSharp.Test.ProjectGeneration
-
-[]
-let FSharpCategory = "fsharp"
+open FSharp.Benchmarks.Common.Categories
[]
-[]
+[]
type GraphTypeCheckingBenchmarks() =
let size = 250
diff --git a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
index 3774aa8702..92255adb46 100644
--- a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
@@ -16,6 +16,7 @@
+
diff --git a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs
index 9c8148ed4d..7b71650515 100644
--- a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs
+++ b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs
@@ -5,6 +5,7 @@ open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Text
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
+open FSharp.Benchmarks.Common.Categories
module Project =
let nugetCache =
@@ -874,6 +875,7 @@ module Project =
Stamp = None }
[]
+[]
type CompilerService() =
let mutable checkerOpt = None
let mutable sourceOpt : (string * ISourceText) array option = None
diff --git a/tests/benchmarks/FCSBenchmarks/SmokeTestAllBenchmarks.ps1 b/tests/benchmarks/FCSBenchmarks/SmokeTestAllBenchmarks.ps1
deleted file mode 100644
index 688434a176..0000000000
--- a/tests/benchmarks/FCSBenchmarks/SmokeTestAllBenchmarks.ps1
+++ /dev/null
@@ -1,19 +0,0 @@
-# Smoke test for checking that all the benchmarks work
-# The test is successful if all the benchmarks run and produce results.
-# The actual numbers produced aren't accurate.
-# Results can be checked in BenchmarkDotNet.Artifacts/results
-
-function Run {
- param (
- [string[]]$path
- )
- # Build the benchmark project itself but no dependencies - still fast, but reduces risk of not accounting for code changes
- dotnet build -c release --no-dependencies $path
- # Run the minimum the CLI API allows - ideally we would use ColdStart but that's not part of the CLI API
- # For API details see https://benchmarkdotnet.org/articles/guides/console-args.html
- dotnet run -c release --project $path --no-build -- --warmupCount 0 --iterationCount 1 --runOncePerIteration --filter *
-}
-
-Run "BenchmarkComparison/HistoricalBenchmark.fsproj"
-Run "CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj"
-Run "FCSSourceFiles/FCSSourceFiles.fsproj"
\ No newline at end of file
diff --git a/tests/benchmarks/FSharp.Benchmarks.Common/Categories.fs b/tests/benchmarks/FSharp.Benchmarks.Common/Categories.fs
new file mode 100644
index 0000000000..deadacbfd6
--- /dev/null
+++ b/tests/benchmarks/FSharp.Benchmarks.Common/Categories.fs
@@ -0,0 +1,10 @@
+namespace FSharp.Benchmarks.Common
+
+module Categories =
+
+ []
+ let ShortCategory = "short"
+
+ []
+ let LongCategory = "long"
+
diff --git a/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj b/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj
new file mode 100644
index 0000000000..2e6b2e9ceb
--- /dev/null
+++ b/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj
@@ -0,0 +1,12 @@
+
+
+
+ net8.0
+ true
+
+
+
+
+
+
+
diff --git a/tests/benchmarks/SmokeTestBenchmarks.ps1 b/tests/benchmarks/SmokeTestBenchmarks.ps1
new file mode 100644
index 0000000000..710d8c3e2b
--- /dev/null
+++ b/tests/benchmarks/SmokeTestBenchmarks.ps1
@@ -0,0 +1,21 @@
+# Smoke test for checking that some (faster) benchmarks work.
+# The test is successful if all the benchmarks run and produce results.
+# The actual numbers produced aren't accurate.
+
+function Run {
+ param (
+ [string[]]$path
+ )
+
+ dotnet run `
+ --project $path `
+ -c release `
+ --no-build `
+ --job Dry `
+ --allCategories short `
+ --stopOnFirstError
+}
+
+Run "FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj"
+Run "FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj"
+Run "FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj"
\ No newline at end of file