Skip to content

Commit 2bcfdd6

Browse files
author
Petr Sramek
committed
fix fix fix
1 parent 1d260fd commit 2bcfdd6

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ jobs:
9090
merge-multiple: true
9191
- name: Benchmark
9292
working-directory: ./benchmarks/PolylineAlgorithm.Benchmarks
93-
run: dotnet run --configuration Release --framework net${{ matrix.netversion }}.0
93+
run: dotnet run --configuration Release

benchmarks/PolylineAlgorithm.Benchmarks/DecodeBenchmark.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ namespace PolylineAlgorithm.Benchmarks;
77

88
using BenchmarkDotNet.Attributes;
99
using BenchmarkDotNet.Engines;
10+
using BenchmarkDotNet.Jobs;
1011
using BenchmarkDotNet.Order;
1112
using Cloudikka.PolylineAlgorithm.Encoding;
1213
using PolylineAlgorithm;
1314
using PolylinerNet;
14-
using System.Collections.Generic;
1515

1616
[RankColumn]
1717
[MemoryDiagnoser]
18+
[SimpleJob(RuntimeMoniker.Net70)]
19+
[SimpleJob(RuntimeMoniker.Net80)]
20+
[SimpleJob(RuntimeMoniker.Net90)]
1821
[Orderer(SummaryOrderPolicy.Default)]
1922
public class DecodeBenchmark {
2023
private readonly Consumer _consumer = new();

benchmarks/PolylineAlgorithm.Benchmarks/EncodeBenchmark.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace PolylineAlgorithm.Benchmarks;
77

88
using BenchmarkDotNet.Attributes;
9-
using BenchmarkDotNet.Engines;
9+
using BenchmarkDotNet.Jobs;
1010
using BenchmarkDotNet.Order;
1111
using Cloudikka.PolylineAlgorithm.Encoding;
1212
using PolylineAlgorithm;
@@ -15,6 +15,9 @@ namespace PolylineAlgorithm.Benchmarks;
1515

1616
[RankColumn]
1717
[MemoryDiagnoser]
18+
[SimpleJob(RuntimeMoniker.Net70)]
19+
[SimpleJob(RuntimeMoniker.Net80)]
20+
[SimpleJob(RuntimeMoniker.Net90)]
1821
[Orderer(SummaryOrderPolicy.Default)]
1922
public class EncodeBenchmark {
2023
public static IEnumerable<Coordinate> PolylineAlgorithm_Coordinates { get; } = [new(60.81071, -121.40005), new(70.05664, -38.43130), new(37.52379, -84.83755), new(41.85003, 26.25620), new(68.04709, 110.63120), new(61.48922, 50.16245), new(-4.46018, -58.11880), new(-32.16061, -3.27505), new(-50.89185, -55.30630), new(-28.52070, 90.94370), new(35.26009, 93.75620), new(54.83622, 128.91245), new(1.16022, 37.50620), new(-44.26398, -131.24380), new(-33.34325, 154.22495), new(-59.65879, 90.94370), new(-62.38215, 0.94370), new(72.32117, 40.31870), new(64.66910, 2.34995), new(-61.04971, -84.83755), new(77.10238, -91.86880), new(-72.88859, -129.83755), new(-69.24987, -24.36880), new(77.41254, 119.06870), new(-70.69409, 83.91245), new(78.85650, 75.47495), new(26.83989, 140.16245), new(-24.75069, -108.74380), new(30.53968, -145.30630), new(79.12503, 145.78745), new(-34.51006, 133.13120), new(-73.29753, -60.93130), new(-74.08712, 23.44370), new(-76.57404, 100.78745), new(-76.57404, 100.78745), new(39.72082, 103.59995), new(70.99412, 148.59995), new(82.27591, 138.75620), new(78.29964, -3.27505), new(78.29964, -3.27505), new(-8.65039, 47.34995)];

benchmarks/PolylineAlgorithm.Benchmarks/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ namespace PolylineAlgorithm.Benchmarks;
99

1010
internal class Program {
1111
static void Main(string[] args) {
12-
BenchmarkSwitcher
13-
.FromAssembly(typeof(Program).Assembly)
14-
.Run(args);
12+
BenchmarkRunner
13+
.Run<EncodeBenchmark>();
14+
BenchmarkRunner
15+
.Run<DecodeBenchmark>();
1516
}
1617
}

0 commit comments

Comments
 (0)