Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit d5a38f0

Browse files
committed
Change benchmark target framework
1 parent f0ea882 commit d5a38f0

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

SPCodeBenchmarks/CondenserBench.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using BenchmarkDotNet.Jobs;
44
using BenchmarkDotNet.Toolchains.InProcess.NoEmit;
55
using SourcepawnCondenser;
6+
using static SPCode.Utils.SPSyntaxTidy.SPSyntaxTidy;
67

78
namespace SPCodeBenchmarks;
89

@@ -24,8 +25,11 @@ public Config()
2425
[Benchmark]
2526
public void Condense()
2627
{
28+
var text = File.ReadAllText("sourcepawn/nativevotes.inc");
29+
2730
var condenser =
28-
new Condenser(File.ReadAllText("sourcepawn/nativevotes.inc"), "test"); // The biggest thing I found
31+
new Condenser(text, "test"); // The biggest thing I found
32+
2933
condenser.Condense();
3034
}
3135
}

SPCodeBenchmarks/SPCodeBenchmarks.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net48</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<LangVersion>latest</LangVersion>
89
</PropertyGroup>
910

10-
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet">
12-
<Version>0.13.2</Version>
13-
</PackageReference>
14-
</ItemGroup>
15-
1611
<ItemGroup>
1712
<ProjectReference Include="..\SourcepawnCondenser\SourcepawnCondenser\SourcepawnCondenser.csproj" />
13+
<ProjectReference Include="..\SPCode.csproj" />
1814
</ItemGroup>
1915

2016
<ItemGroup>
2117
<Content Include="sourcepawn\**">
2218
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2319
</Content>
2420
</ItemGroup>
21+
22+
<ItemGroup>
23+
<PackageReference Include="BenchmarkDotNet">
24+
<Version>0.13.2</Version>
25+
</PackageReference>
26+
</ItemGroup>
2527

2628

2729
</Project>

0 commit comments

Comments
 (0)