Skip to content

Commit 110b5c2

Browse files
authored
fix package versions in benchmarks (#2799)
1 parent 5587855 commit 110b5c2

File tree

5 files changed

+9
-17
lines changed

5 files changed

+9
-17
lines changed

build/Common.nonprod.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
<MicrosoftAspNetWebApiWebHostPkgVer>[5.2.7,6.0)</MicrosoftAspNetWebApiWebHostPkgVer>
3636
<MicrosoftAspNetWebPagesPkgVer>[3.2.7,4.0)</MicrosoftAspNetWebPagesPkgVer>
3737
<MicrosoftExtensionsHostingPkgVer>[3.1.6,5.0)</MicrosoftExtensionsHostingPkgVer>
38-
<MicrosoftExtensionsLoggingPkgVer>[5.0.0,6.0)</MicrosoftExtensionsLoggingPkgVer>
39-
<MicrosoftExtensionsLoggingAbstractionsPkgVer>[5.0.0,6.0)</MicrosoftExtensionsLoggingAbstractionsPkgVer>
40-
<MicrosoftExtensionsLoggingConsolePkgVer>[5.0.0,6.0)</MicrosoftExtensionsLoggingConsolePkgVer>
38+
<MicrosoftExtensionsLoggingPkgVer>[6.0.0,)</MicrosoftExtensionsLoggingPkgVer>
39+
<MicrosoftExtensionsLoggingAbstractionsPkgVer>[6.0.0,)</MicrosoftExtensionsLoggingAbstractionsPkgVer>
4140
<MicrosoftNETTestSdkPkgVer>[16.10.0]</MicrosoftNETTestSdkPkgVer>
4241
<NewtonsoftJsonPkgVer>[12.0.2,13.0)</NewtonsoftJsonPkgVer>
4342
<MoqPkgVer>[4.14.5,5.0)</MoqPkgVer>

test/Benchmarks/Benchmarks.csproj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -14,6 +14,11 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPkgVer)" />
17+
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPkgVer)" />
18+
</ItemGroup>
19+
20+
<ItemGroup Condition="'$(TargetFramework)' != 'net462'">
21+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1722
</ItemGroup>
1823

1924
<ItemGroup>
@@ -26,12 +31,4 @@
2631
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj" />
2732
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.Http\OpenTelemetry.Instrumentation.Http.csproj" />
2833
</ItemGroup>
29-
30-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
31-
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
32-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
33-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
34-
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
35-
</ItemGroup>
36-
3734
</Project>

test/Benchmarks/Logs/LogBenchmarks.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// limitations under the License.
1515
// </copyright>
1616

17-
#if NETCOREAPP3_1
1817
using BenchmarkDotNet.Attributes;
1918
using Microsoft.Extensions.Logging;
2019
using OpenTelemetry;
@@ -89,4 +88,3 @@ internal class DummyLogProcessor : BaseProcessor<LogRecord>
8988
}
9089
}
9190
}
92-
#endif

test/Benchmarks/Logs/LogScopeBenchmarks.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// limitations under the License.
1515
// </copyright>
1616

17-
#if NETCOREAPP3_1
1817
using System;
1918
using System.Collections.Generic;
2019
using System.Collections.ObjectModel;
@@ -77,4 +76,3 @@ public void ForEachScope()
7776
}
7877
}
7978
}
80-
#endif

test/Benchmarks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Navigate to `./test/Benchmarks` directory and run the following command:
77

88
<!-- markdownlint-disable MD013 -->
99
```sh
10-
dotnet run --framework netcoreapp3.1 --configuration Release --filter *TraceBenchmarks*
10+
dotnet run --framework net6.0 --configuration Release --filter *TraceBenchmarks*
1111
```
1212
<!-- markdownlint-enable MD013 -->

0 commit comments

Comments
 (0)