Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
4b7ea080
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4b7ea080
编写于
12月 15, 2018
作者:
W
Will Smith
提交者:
GitHub
12月 15, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6017 from TIHan/benchmarking
Initial benchmarking
上级
4a9274bb
3974de0c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
118 addition
and
0 deletion
+118
-0
benchmarks/Benchmarks.sln
benchmarks/Benchmarks.sln
+37
-0
benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
...ompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
+21
-0
benchmarks/CompilerServiceBenchmarks/Program.fs
benchmarks/CompilerServiceBenchmarks/Program.fs
+60
-0
未找到文件。
benchmarks/Benchmarks.sln
0 → 100644
浏览文件 @
4b7ea080
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{BB9EAE76-194A-49D8-9618-586CBE7031D9}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.Build.0 = Release|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.Build.0 = Release|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {049A4D02-709F-418C-AD59-7FB0DBE956B1}
EndGlobalSection
EndGlobal
benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
0 → 100644
浏览文件 @
4b7ea080
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.11.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
<ProjectReference Include="..\..\src\fsharp\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
</Project>
benchmarks/CompilerServiceBenchmarks/Program.fs
0 → 100644
浏览文件 @
4b7ea080
open
System
open
System
.
IO
open
BenchmarkDotNet
.
Attributes
open
BenchmarkDotNet
.
Running
open
Microsoft
.
FSharp
.
Compiler
.
ErrorLogger
open
Microsoft
.
FSharp
.
Compiler
.
SourceCodeServices
open
System
.
Text
[<
ClrJob
(
baseline
=
true
)>]
type
CompilerServiceParsing
()
=
let
mutable
checkerOpt
=
None
let
mutable
sourceOpt
=
None
let
parsingOptions
=
{
SourceFiles
=
[|
"TypeChecker.fs"
|]
ConditionalCompilationDefines
=
[]
ErrorSeverityOptions
=
FSharpErrorSeverityOptions
.
Default
IsInteractive
=
false
LightSyntax
=
None
CompilingFsLib
=
false
IsExe
=
false
}
[<
GlobalSetup
>]
member
__.
Setup
()
=
match
checkerOpt
with
|
None
->
checkerOpt
<-
Some
(
FSharpChecker
.
Create
()
)
|
_
->
()
match
sourceOpt
with
|
None
->
let
source
=
File
.
ReadAllText
(
"""..
\
..
\
..
\
..
\
..
\
src
\
fsharp
\
TypeChecker.fs"""
)
sourceOpt
<-
Some
(
source
)
|
_
->
()
[<
IterationSetup
>]
member
__.
ParsingSetup
()
=
match
checkerOpt
with
|
None
->
failwith
"no checker"
|
Some
(
checker
)
->
checker
.
InvalidateAll
()
checker
.
ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients
()
checker
.
ParseFile
(
"dummy.fs"
,
"dummy"
,
parsingOptions
)
|>
Async
.
RunSynchronously
|>
ignore
[<
Benchmark
>]
member
__.
Parsing
()
=
match
checkerOpt
,
sourceOpt
with
|
None
,
_
->
failwith
"no checker"
|
_,
None
->
failwith
"no source"
|
Some
(
checker
),
Some
(
source
)
->
let
results
=
checker
.
ParseFile
(
"TypeChecker.fs"
,
source
,
parsingOptions
)
|>
Async
.
RunSynchronously
if
results
.
ParseHadErrors
then
failwithf
"parse had errors: %A"
results
.
Errors
[<
EntryPoint
>]
let
main
argv
=
let
_
=
BenchmarkRunner
.
Run
<
CompilerServiceParsing
>()
0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录