Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facelifting FCS benchmarks #16484

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<Configurations>Release</Configurations>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ type CompilerServiceBenchmarks() =
|> Some

[<Benchmark>]
member _.ParsingTypeCheckerFs() =
member _.ParsingCheckExpressionsFs() =
let config = getConfig()
let results = config.Checker.ParseFile("CheckExpressions.fs", config.Source |> SourceText.toFSharpSourceText, parsingOptions) |> Async.RunSynchronously
if results.ParseHadErrors then failwithf $"parse had errors: %A{results.Diagnostics}"

[<IterationCleanup(Target = "ParsingTypeCheckerFs")>]
member _.ParsingTypeCheckerFsSetup() =
[<IterationCleanup(Target = "ParsingCheckExpressionsFs")>]
member _.ParsingCheckExpressionsFsSetup() =
let checker = getConfig().Checker
checker.InvalidateAll()
checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>

Expand All @@ -26,7 +19,6 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<!-- <PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="2.9.0" /> -->
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let processFunc{number} (x) (func:MyFunctionType{number}) =
}}
//$COMMENTAREA$"""

/// Code create using FSharpCheckFileResults.GenerateSignature()
/// Code created using FSharpCheckFileResults.GenerateSignature()
let generateFsi number =
$"""
module Benchmark{number}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ module Project =
OriginalLoadReferences = []
Stamp = None }

FSharpReferencedProject.CreateFSharp(
FSharpReferencedProject.FSharpReference(
__SOURCE_DIRECTORY__ + @"\..\..\..\..\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll",
projectOptions
)
Expand Down Expand Up @@ -459,7 +459,7 @@ module Project =
OriginalLoadReferences = []
Stamp = None }

FSharpReferencedProject.CreateFSharp(
FSharpReferencedProject.FSharpReference(
__SOURCE_DIRECTORY__ + @"\..\..\..\..\artifacts\bin\FSharp.DependencyManager.Nuget\Debug\netstandard2.0\FSharp.DependencyManager.Nuget.dll",
projectOptions
)
Expand Down Expand Up @@ -890,8 +890,7 @@ type CompilerService() =
| None ->
sourceOpt <-
projectOptions.SourceFiles
|> Array.filter (fun filePath -> filePath.EndsWith("CheckDeclarations.fs")) // || filePath.EndsWith("CheckExpressions.fs"))
// || filePath.EndsWith("lex.fs") || filePath.EndsWith("pars.fs"))
|> Array.filter (fun filePath -> filePath.EndsWith("CheckDeclarations.fs"))
|> Array.map (fun filePath -> filePath, SourceText.ofString (File.ReadAllText(filePath)))
|> Some
| _ -> ()
Expand Down
Loading