Skip to content

Commit a1ec57f

Browse files
committed
update benchmark and test to net6.0
1 parent 98c6de2 commit a1ec57f

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

PooledStream.Benchmark/ObjectPoolStreamBench.cs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace PooledStream.Benchmark
99
{
1010
[Config(typeof(MultiPlatformConfig))]
1111
[MemoryDiagnoser]
12-
[DisassemblyDiagnoser(printAsm: true, printIL: true, printSource: true)]
1312
public class ObjectPoolStreamBench
1413
{
1514
[Params(10000)]

PooledStream.Benchmark/PooledStream.Benchmark.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>netcoreapp3.0;netcoreapp2.1</TargetFrameworks>
4+
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
55
<PlatformTarget>AnyCPU</PlatformTarget>
66
<DebugType>pdbonly</DebugType>
77
<DebugSymbols>true</DebugSymbols>
88
<IsPackable>false</IsPackable>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.12.0" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
1212
<PackageReference Include="CodeProject.ObjectPool" Version="3.2.2" />
1313
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="1.2.2" />
14-
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="3.0.0"/>
14+
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="3.0.0" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<ProjectReference Include="..\PooledStream\PooledStream.csproj" />

PooledStream.Benchmark/Program.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ class MultiPlatformConfig : ManualConfig
7777
{
7878
public MultiPlatformConfig()
7979
{
80-
Add(Job.Default.WithWarmupCount(3).WithIterationCount(3)
81-
.With(CsProjCoreToolchain.NetCoreApp21));
82-
Add(Job.Default.WithWarmupCount(3).WithIterationCount(3)
83-
.With(CsProjCoreToolchain.NetCoreApp30));
80+
AddJob(Job.Default.WithWarmupCount(3).WithIterationCount(3)
81+
.WithToolchain(CsProjCoreToolchain.NetCoreApp60));
82+
AddJob(Job.Default.WithWarmupCount(3).WithIterationCount(3)
83+
.WithToolchain(CsProjCoreToolchain.NetCoreApp31));
8484
this.Options |= ConfigOptions.DisableOptimizationsValidator;
8585
}
8686
}

PooledStream.Test/PooledStream.Test.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1111
<PackageReference Include="xunit" Version="2.4.1" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

PooledStream/PooledStream.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
</PropertyGroup>
2323
<ItemGroup>
2424
<Compile Include="**/*.cs" Exclude="obj/**/*.cs"/>
25-
<Compile Include="obj/$(Configuration)/$(TargetFramework)/*.cs"/>
25+
<!-- <Compile Include="obj/$(Configuration)/$(TargetFramework)/*.cs"/> -->
2626
<Content Include="$(ProjectDir)../LICENSE.md" Pack="true" PackagePath="\" />
2727
</ItemGroup>
2828
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
2929
<Compile Remove="PooledMemoryStream.netstd11.cs" />
3030
</ItemGroup>
3131
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1'">
32-
<PackageReference Include="System.Buffers" Version="4.5.0" />
33-
<PackageReference Include="System.Memory" Version="4.5.3" />
32+
<PackageReference Include="System.Buffers" Version="4.5.1" />
33+
<PackageReference Include="System.Memory" Version="4.5.4" />
3434
<Compile Remove="PooledMemoryStream.netstd21.cs" />
3535
</ItemGroup>
3636
</Project>

azure-pipelines.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ stages:
1212
steps:
1313
- task: UseDotNet@2
1414
inputs:
15-
version: "3.0.x"
15+
version: "3.1.x"
1616
packageType: sdk
17-
displayName: "Enabling dotnet core sdk 3.0"
17+
displayName: "Enabling dotnet core sdk 3.1"
1818
- task: UseDotNet@2
1919
inputs:
20-
version: "2.1.x"
20+
version: "6.0.x"
2121
packageType: sdk
22-
displayName: "Enabling dotnet core sdk 2.1"
22+
displayName: "Enabling dotnet core sdk 6.0"
2323
- script: dotnet tool restore
2424
displayName: restoring local tool
2525
- script: dotnet tool run dotnet-cake build.cake -- -Configuration=Release

0 commit comments

Comments
 (0)