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

Create initial benchmark. #878

Merged
merged 5 commits into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ nuget Fake.Core.Target //"

open Fake.Core
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.Core.TargetOperators
open Fake.BuildServer
open System
Expand Down Expand Up @@ -346,6 +347,11 @@ Target.create "MyGet" (fun _ ->
pushPackage args
)

Target.create "Benchmark" (fun _ ->
DotNet.exec id ("src" </> "Fantomas.Benchmarks" </> "bin" </> "Release" </> "netcoreapp3.1" </> "Fantomas.Benchmarks.dll") ""
|> ignore
)

// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build <Target>' to override

Expand All @@ -362,6 +368,9 @@ Target.create "All" ignore
"Build"
==> "TestExternalProjects"

"Build"
==> "Benchmark"

"Pack"
==> "MyGet"

Expand Down
14 changes: 14 additions & 0 deletions fantomas.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.CoreGlobalTool", "
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.CoreGlobalTool.Tests", "src\Fantomas.CoreGlobalTool.Tests\Fantomas.CoreGlobalTool.Tests.fsproj", "{DEDE6968-0BE8-4415-9262-8355B82AF2C0}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.Benchmarks", "src\Fantomas.Benchmarks\Fantomas.Benchmarks.fsproj", "{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -77,6 +79,18 @@ Global
{DEDE6968-0BE8-4415-9262-8355B82AF2C0}.Release|x64.Build.0 = Release|Any CPU
{DEDE6968-0BE8-4415-9262-8355B82AF2C0}.Release|x86.ActiveCfg = Release|Any CPU
{DEDE6968-0BE8-4415-9262-8355B82AF2C0}.Release|x86.Build.0 = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|x64.ActiveCfg = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|x64.Build.0 = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|x86.ActiveCfg = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Debug|x86.Build.0 = Debug|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|Any CPU.Build.0 = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|x64.ActiveCfg = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|x64.Build.0 = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|x86.ActiveCfg = Release|Any CPU
{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection
Expand Down
3 changes: 3 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ nuget nunit 3.12.0
nuget NUnit3TestAdapter 3.15.1
nuget NunitXml.TestLogger
nuget Argu
nuget BenchmarkDotNet

github: fsprojects/fantomas:829faa6ba834f99afed9b4434b3a1680536474b2 src/Fantomas/CodePrinter.fs
80 changes: 67 additions & 13 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ NUGET
Argu (6.0)
FSharp.Core (>= 4.3.2)
System.Configuration.ConfigurationManager (>= 4.4)
BenchmarkDotNet (0.12.1)
BenchmarkDotNet.Annotations (>= 0.12.1)
CommandLineParser (>= 2.4.3)
Iced (>= 1.4)
Microsoft.CodeAnalysis.CSharp (>= 2.10)
Microsoft.Diagnostics.NETCore.Client (>= 0.2.61701)
Microsoft.Diagnostics.Runtime (>= 1.1.57604)
Microsoft.Diagnostics.Tracing.TraceEvent (>= 2.0.49)
Microsoft.DotNet.PlatformAbstractions (>= 2.1)
Microsoft.Win32.Registry (>= 4.5)
Perfolizer (>= 0.2.1)
System.Management (>= 4.5)
System.Reflection.Emit (>= 4.3)
System.Reflection.Emit.Lightweight (>= 4.3)
System.Threading.Tasks.Extensions (>= 4.5.2)
System.ValueTuple (>= 4.5)
BenchmarkDotNet.Annotations (0.12.1)
CommandLineParser (2.8)
FsCheck (2.14)
FSharp.Core (>= 4.2.3)
FSharp.Compiler.Service (35.0)
Expand All @@ -21,7 +39,23 @@ NUGET
FSharp.Core (>= 4.2.3)
NETStandard.Library (>= 2.0.3)
NUnit (>= 3.12 < 4.0)
Iced (1.7)
Microsoft.CodeAnalysis.Analyzers (3.0)
Microsoft.CodeAnalysis.Common (3.6)
Microsoft.CodeAnalysis.Analyzers (>= 3.0)
System.Collections.Immutable (>= 1.5)
System.Memory (>= 4.5.3)
System.Reflection.Metadata (>= 1.6)
System.Runtime.CompilerServices.Unsafe (>= 4.7)
System.Text.Encoding.CodePages (>= 4.5.1)
System.Threading.Tasks.Extensions (>= 4.5.3)
Microsoft.CodeAnalysis.CSharp (3.6)
Microsoft.CodeAnalysis.Common (3.6)
Microsoft.CodeCoverage (16.5) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.Diagnostics.NETCore.Client (0.2.61701)
Microsoft.Diagnostics.Runtime (1.1.127808)
Microsoft.Diagnostics.Tracing.TraceEvent (2.0.56)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
Microsoft.DotNet.InternalAbstractions (1.0) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.AppContext (>= 4.1)
System.Collections (>= 4.0.11)
Expand All @@ -31,11 +65,12 @@ NUGET
System.Runtime.Extensions (>= 4.1)
System.Runtime.InteropServices (>= 4.1)
System.Runtime.InteropServices.RuntimeInformation (>= 4.0)
Microsoft.DotNet.PlatformAbstractions (3.1.4)
Microsoft.NET.Test.Sdk (16.4)
Microsoft.CodeCoverage (>= 16.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.TestPlatform.TestHost (>= 16.4) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.NETCore.Platforms (3.1)
Microsoft.NETCore.Targets (3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Targets (3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp5.0))
Microsoft.TestPlatform.ObjectModel (16.5) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1))
NuGet.Frameworks (>= 5.0)
Microsoft.TestPlatform.TestHost (16.5) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1))
Expand All @@ -45,7 +80,9 @@ NUGET
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
Microsoft.Win32.Registry (4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.Win32.Registry (4.7)
System.Buffers (>= 4.5) - restriction: || (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Memory (>= 4.5.3) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Security.AccessControl (>= 4.7)
System.Security.Principal.Windows (>= 4.7)
Microsoft.Win32.SystemEvents (4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0))
Expand All @@ -67,12 +104,15 @@ NUGET
System.Xml.XmlDocument (>= 4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Xml.XPath.XmlDocument (>= 4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
NunitXml.TestLogger (2.1.41)
Perfolizer (0.2.1)
System.Memory (>= 4.5.3)
runtime.native.System (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.AppContext (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Runtime (>= 4.3)
System.Buffers (4.5)
System.CodeDom (4.7)
System.Collections (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
Expand Down Expand Up @@ -187,10 +227,14 @@ NUGET
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Extensions (>= 4.3)
System.Management (4.7)
Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0))
Microsoft.Win32.Registry (>= 4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0))
System.CodeDom (>= 4.7)
System.Memory (4.5.3)
System.Buffers (>= 4.4) - restriction: || (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Buffers (>= 4.4) - restriction: || (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - restriction: || (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - restriction: || (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Numerics.Vectors (4.5) - restriction: || (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0)
System.Reflection (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Expand All @@ -199,8 +243,10 @@ NUGET
System.Reflection.Primitives (>= 4.3)
System.Runtime (>= 4.3)
System.Reflection.Emit (4.7)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (>= netcoreapp5.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (>= netcoreapp5.0)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (< portable-net45+wp8)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Reflection.Emit.Lightweight (4.7)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (>= netcoreapp5.0)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (< portable-net45+wp8)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0)
System.Reflection.Extensions (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
Expand All @@ -213,7 +259,7 @@ NUGET
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Reflection.TypeExtensions (4.7)
System.Resources.ResourceManager (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Resources.ResourceManager (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp5.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Globalization (>= 4.3)
Expand All @@ -222,7 +268,7 @@ NUGET
System.Runtime (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Runtime.CompilerServices.Unsafe (4.7) - restriction: || (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0)
System.Runtime.CompilerServices.Unsafe (4.7)
System.Runtime.Extensions (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
Expand Down Expand Up @@ -258,31 +304,36 @@ NUGET
System.Security.Permissions (4.7)
System.Security.AccessControl (>= 4.7)
System.Windows.Extensions (>= 4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0))
System.Security.Principal.Windows (4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp2.0))
System.Security.Principal.Windows (4.7)
System.Text.Encoding (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding.CodePages (4.7)
Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0))
System.Runtime.CompilerServices.Unsafe (>= 4.7) - restriction: || (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0)
System.Text.Encoding.Extensions (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Text.RegularExpressions (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Text.RegularExpressions (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp5.0))
System.Runtime (>= 4.3.1)
System.Threading (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Threading (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp5.0))
System.Runtime (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.Threading.Tasks (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Threading.Tasks (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= netcoreapp5.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Threading.Tasks.Extensions (4.5.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Threading.Tasks.Extensions (4.5.3)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - restriction: || (&& (== netcoreapp3.1) (>= net45)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.0)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= wp8)) (== netstandard2.0)
System.Threading.Thread (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Runtime (>= 4.3)
System.Threading.ThreadPool (4.3) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Runtime (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.ValueTuple (4.5)
System.Windows.Extensions (4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0))
System.Drawing.Common (>= 4.7) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0))
System.Xml.ReaderWriter (4.3.1) - restriction: || (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp1.0))
Expand Down Expand Up @@ -333,3 +384,6 @@ NUGET
System.Xml.ReaderWriter (>= 4.3)
System.Xml.XmlDocument (>= 4.3)
System.Xml.XPath (>= 4.3)
GITHUB
remote: fsprojects/fantomas
src/Fantomas/CodePrinter.fs (829faa6ba834f99afed9b4434b3a1680536474b2)
16 changes: 16 additions & 0 deletions src/Fantomas.Benchmarks/Fantomas.Benchmarks.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Runners.fs" />
<Compile Include="Program.fs" />
<Content Include="paket.references" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Fantomas\Fantomas.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
8 changes: 8 additions & 0 deletions src/Fantomas.Benchmarks/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
open BenchmarkDotNet.Running
open Fantomas.Benchmarks.Runners

[<EntryPoint>]
let main _ =
BenchmarkRunner.Run<CodePrinterTest>()
|> ignore
0
23 changes: 23 additions & 0 deletions src/Fantomas.Benchmarks/Runners.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Fantomas.Benchmarks.Runners

open BenchmarkDotNet.Attributes
open System.IO
open FSharp.Compiler.SourceCodeServices
open Fantomas

let sharedChecker = lazy FSharpChecker.Create()
let config = Fantomas.FormatConfig.FormatConfig.Default

[<MemoryDiagnoser>]
[<RankColumn>]
type CodePrinterTest() =
[<Benchmark>]
member _.Format() =
let path = "./paket-files/fsprojects/fantomas/src/Fantomas/CodePrinter.fs"
let fileName = Path.GetFileName(path)
let parsingOptions = FakeHelpers.createParsingOptionsFromFile fileName
let content = File.ReadAllText(path) |> SourceOrigin.SourceString
CodeFormatter.FormatDocumentAsync(fileName, content, config, parsingOptions, sharedChecker.Value)
|> Async.RunSynchronously
|> ignore
()
3 changes: 3 additions & 0 deletions src/Fantomas.Benchmarks/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FSharp.Core
FSharp.Compiler.Service
BenchmarkDotNet