Skip to content

Commit 5550d81

Browse files
Fix benchmarks
Fix benchmarks no longer running due to use of Artifacts Output and an incorrectly defined POCO property.
1 parent 58bc168 commit 5550d81

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Just Eat, 2017. All rights reserved.
2+
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
3+
4+
using BenchmarkDotNet.Configs;
5+
using BenchmarkDotNet.Diagnosers;
6+
using BenchmarkDotNet.Jobs;
7+
8+
namespace JustEat.HttpClientInterception;
9+
10+
public class CustomBenchmarkConfig : ManualConfig
11+
{
12+
public CustomBenchmarkConfig()
13+
: base()
14+
{
15+
var job = Job.Default.WithArguments([new MsBuildArgument("/p:UseArtifactsOutput=false")]);
16+
17+
AddJob(job);
18+
AddDiagnoser(MemoryDiagnoser.Default);
19+
AddDiagnoser(new EventPipeProfiler(EventPipeProfile.CpuSampling));
20+
}
21+
}

tests/HttpClientInterception.Benchmarks/InterceptionBenchmarks.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
using System.Text.Json;
55
using BenchmarkDotNet.Attributes;
6-
using BenchmarkDotNet.Diagnosers;
76
using Refit;
87

98
namespace JustEat.HttpClientInterception;
109

11-
[EventPipeProfiler(EventPipeProfile.CpuSampling)]
12-
[MemoryDiagnoser]
10+
[Config(typeof(CustomBenchmarkConfig))]
1311
public class InterceptionBenchmarks
1412
{
1513
private readonly HttpClientInterceptorOptions _options;

tests/HttpClientInterception.Benchmarks/Organization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public sealed class Organization
77
{
88
public string Login { get; set; }
99

10-
public string Id { get; set; }
10+
public long Id { get; set; }
1111

1212
public string Url { get; set; }
1313
}

0 commit comments

Comments
 (0)