Skip to content

Commit b1434ea

Browse files
committed
➕ Create GetprocessByName
1 parent ecd0e7e commit b1434ea

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Diagnostics;
2+
3+
namespace Performance.NET7.Benchmarks.Diagnostics.GetProcess;
4+
5+
[RPlotExporter]
6+
[SimpleJob(RuntimeMoniker.Net60, launchCount: 1, warmupCount: 3, targetCount: 5, invocationCount: -1, id: "NET 6.0")]
7+
[SimpleJob(RuntimeMoniker.Net70, launchCount: 1, warmupCount: 3, targetCount: 5, invocationCount: -1, id: "NET 7.0", baseline: true)]
8+
[MemoryDiagnoser(displayGenColumns: false)]
9+
[HideColumns(Column.Job, Column.StdDev, Column.Error, Column.RatioSD)]
10+
public class GetProcessByNameBenchmarks
11+
{
12+
[Benchmark]
13+
public Process[] GetProcessByName()
14+
=> Process.GetProcessesByName("dotnet.exe");
15+
}

0 commit comments

Comments
 (0)