Skip to content

Commit c7cbbf7

Browse files
Bump Perfolizer: 0.4.1->0.5.2 (and update API usage)
1 parent 5045ea1 commit c7cbbf7

File tree

58 files changed

+352
-629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+352
-629
lines changed

BenchmarkDotNet.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
<s:Boolean x:Key="/Default/UserDictionary/Words/=Partitioner/@EntryIndexedValue">True</s:Boolean>
167167
<s:Boolean x:Key="/Default/UserDictionary/Words/=pdbonly/@EntryIndexedValue">True</s:Boolean>
168168
<s:Boolean x:Key="/Default/UserDictionary/Words/=Perfolizer/@EntryIndexedValue">True</s:Boolean>
169+
<s:Boolean x:Key="/Default/UserDictionary/Words/=perfonar/@EntryIndexedValue">True</s:Boolean>
169170
<s:Boolean x:Key="/Default/UserDictionary/Words/=poco/@EntryIndexedValue">True</s:Boolean>
170171
<s:Boolean x:Key="/Default/UserDictionary/Words/=Prerelease/@EntryIndexedValue">True</s:Boolean>
171172
<s:Boolean x:Key="/Default/UserDictionary/Words/=Prettifier/@EntryIndexedValue">True</s:Boolean>

src/BenchmarkDotNet/Attributes/Exporters/PhdExporterAttribute.cs renamed to src/BenchmarkDotNet/Attributes/Exporters/PerfonarExporterAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ namespace BenchmarkDotNet.Attributes;
77
/// IMPORTANT: Not fully implemented yet
88
/// </summary>
99
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
10-
public class PhdExporterAttribute() : ExporterConfigBaseAttribute(new PhdJsonExporter(), new PhdMdExporter());
10+
internal class PerfonarExporterAttribute() : ExporterConfigBaseAttribute(new PerfonarJsonExporter(), new PerfonarMdExporter());

src/BenchmarkDotNet/BenchmarkDotNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageReference Include="Gee.External.Capstone" Version="2.3.0" />
2020
<PackageReference Include="Iced" Version="1.17.0" />
2121
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="3.1.512801" />
22-
<PackageReference Include="Perfolizer" Version="[0.4.1]" />
22+
<PackageReference Include="Perfolizer" Version="[0.5.2]" />
2323
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.8" PrivateAssets="contentfiles;analyzers" />
2424
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
2525
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using Perfolizer.Phd.Dto;
1+
using Perfolizer.Models;
22

33
namespace BenchmarkDotNet.Detectors.Cpu;
44

55
/// <summary>
6-
/// Loads the <see cref="PhdCpu"/> for the current hardware
6+
/// Loads the <see cref="CpuInfo"/> for the current hardware
77
/// </summary>
88
public interface ICpuDetector
99
{
1010
bool IsApplicable();
11-
PhdCpu? Detect();
11+
CpuInfo? Detect();
1212
}

src/BenchmarkDotNet/Detectors/Cpu/Linux/LinuxCpuDetector.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Collections.Generic;
22
using BenchmarkDotNet.Helpers;
3-
using BenchmarkDotNet.Portability;
4-
using Perfolizer.Phd.Dto;
3+
using Perfolizer.Models;
54

65
namespace BenchmarkDotNet.Detectors.Cpu.Linux;
76

@@ -13,7 +12,7 @@ internal class LinuxCpuDetector : ICpuDetector
1312
{
1413
public bool IsApplicable() => OsDetector.IsLinux();
1514

16-
public PhdCpu? Detect()
15+
public CpuInfo? Detect()
1716
{
1817
if (!IsApplicable()) return null;
1918

src/BenchmarkDotNet/Detectors/Cpu/Linux/LinuxCpuInfoParser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using BenchmarkDotNet.Helpers;
66
using BenchmarkDotNet.Portability;
77
using Perfolizer.Horology;
8-
using Perfolizer.Phd.Dto;
8+
using Perfolizer.Models;
99

1010
namespace BenchmarkDotNet.Detectors.Cpu.Linux;
1111

@@ -28,7 +28,7 @@ private static class Lscpu
2828

2929
/// <param name="cpuInfo">Output of `cat /proc/cpuinfo`</param>
3030
/// <param name="lscpu">Output of `lscpu`</param>
31-
internal static PhdCpu Parse(string? cpuInfo, string? lscpu)
31+
internal static CpuInfo Parse(string? cpuInfo, string? lscpu)
3232
{
3333
var processorModelNames = new HashSet<string>();
3434
var processorsToPhysicalCoreCount = new Dictionary<string, int>();
@@ -89,7 +89,7 @@ internal static PhdCpu Parse(string? cpuInfo, string? lscpu)
8989
string processorName = processorModelNames.Count > 0 ? string.Join(", ", processorModelNames) : null;
9090
int? physicalProcessorCount = processorsToPhysicalCoreCount.Count > 0 ? processorsToPhysicalCoreCount.Count : null;
9191
int? physicalCoreCount = processorsToPhysicalCoreCount.Count > 0 ? processorsToPhysicalCoreCount.Values.Sum() : coresPerSocket;
92-
return new PhdCpu
92+
return new CpuInfo
9393
{
9494
ProcessorName = processorName,
9595
PhysicalProcessorCount = physicalProcessorCount,

src/BenchmarkDotNet/Detectors/Cpu/Windows/MosCpuDetector.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using BenchmarkDotNet.Extensions;
55
using BenchmarkDotNet.Portability;
66
using Perfolizer.Horology;
7-
using Perfolizer.Phd.Dto;
7+
using Perfolizer.Models;
88

99
namespace BenchmarkDotNet.Detectors.Cpu.Windows;
1010

@@ -20,7 +20,7 @@ public bool IsApplicable() => OsDetector.IsWindows() &&
2020
#if NET6_0_OR_GREATER
2121
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
2222
#endif
23-
public PhdCpu? Detect()
23+
public CpuInfo? Detect()
2424
{
2525
if (!IsApplicable()) return null;
2626

@@ -51,7 +51,7 @@ public bool IsApplicable() => OsDetector.IsWindows() &&
5151
? Frequency.FromMHz(sumMaxFrequency * 1.0 / processorsCount)
5252
: null;
5353

54-
return new PhdCpu
54+
return new CpuInfo
5555
{
5656
ProcessorName = processorName,
5757
PhysicalProcessorCount = processorsCount > 0 ? processorsCount : null,

src/BenchmarkDotNet/Detectors/Cpu/Windows/WmicCpuDetector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.IO;
22
using BenchmarkDotNet.Helpers;
33
using BenchmarkDotNet.Portability;
4-
using Perfolizer.Phd.Dto;
4+
using Perfolizer.Models;
55

66
namespace BenchmarkDotNet.Detectors.Cpu.Windows;
77

@@ -15,7 +15,7 @@ internal class WmicCpuDetector : ICpuDetector
1515

1616
public bool IsApplicable() => OsDetector.IsWindows();
1717

18-
public PhdCpu? Detect()
18+
public CpuInfo? Detect()
1919
{
2020
if (!IsApplicable()) return null;
2121

src/BenchmarkDotNet/Detectors/Cpu/Windows/WmicCpuInfoParser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
using BenchmarkDotNet.Extensions;
33
using BenchmarkDotNet.Helpers;
44
using Perfolizer.Horology;
5-
using Perfolizer.Phd.Dto;
5+
using Perfolizer.Models;
66

77
namespace BenchmarkDotNet.Detectors.Cpu.Windows;
88

99
internal static class WmicCpuInfoParser
1010
{
1111
/// <summary>
12-
/// Parses wmic output and returns <see cref="PhdCpu"/>
12+
/// Parses wmic output and returns <see cref="CpuInfo"/>
1313
/// </summary>
1414
/// <param name="wmicOutput">Output of `wmic cpu get Name, NumberOfCores, NumberOfLogicalProcessors /Format:List`</param>
15-
internal static PhdCpu Parse(string? wmicOutput)
15+
internal static CpuInfo Parse(string? wmicOutput)
1616
{
1717
var processorModelNames = new HashSet<string>();
1818
int physicalCoreCount = 0;
@@ -52,7 +52,7 @@ internal static PhdCpu Parse(string? wmicOutput)
5252
? Frequency.FromMHz(sumMaxFrequency / processorsCount)
5353
: null;
5454

55-
return new PhdCpu
55+
return new CpuInfo
5656
{
5757
ProcessorName = processorName,
5858
PhysicalProcessorCount = processorsCount > 0 ? processorsCount : null,

src/BenchmarkDotNet/Detectors/Cpu/macOS/MacOsCpuDetector.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Helpers;
2-
using BenchmarkDotNet.Portability;
3-
using Perfolizer.Phd.Dto;
2+
using Perfolizer.Models;
43

54
namespace BenchmarkDotNet.Detectors.Cpu.macOS;
65

@@ -12,7 +11,7 @@ internal class MacOsCpuDetector : ICpuDetector
1211
{
1312
public bool IsApplicable() => OsDetector.IsMacOS();
1413

15-
public PhdCpu? Detect()
14+
public CpuInfo? Detect()
1615
{
1716
if (!IsApplicable()) return null;
1817

0 commit comments

Comments
 (0)