Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyAkinshin committed Aug 26, 2024
1 parent 080c432 commit 5a36a91
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/Perfolizer/Perfolizer/Helpers/CpuBrandHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static string ToShortBrandName(this PhdCpu? cpu, bool includeMaxFrequency
if (cpu.PhysicalCoreCount.HasValue && cpu.PhysicalCoreCount.Value > 0)
processorName = Regex.Replace(processorName, @"(\w+?-Core Processor)", "").Trim();

string? frequencyString = GetBrandStyledActualFrequency(cpu.GetNominalFrequency());
string? frequencyString = GetBrandStyledActualFrequency(cpu.NominalFrequency());
if (includeMaxFrequency && frequencyString != null && !processorName.Contains(frequencyString))
{
// show Max only if there's already a frequency name to differentiate the two
Expand Down
6 changes: 0 additions & 6 deletions src/Perfolizer/Perfolizer/Phd/Base/IPhdDisplay.cs

This file was deleted.

28 changes: 0 additions & 28 deletions src/Perfolizer/Perfolizer/Phd/Base/PhdEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ namespace Perfolizer.Phd.Base;

public class PhdEntry : PhdObject
{
private PhdEntry? parent;

/// <summary>
/// Service information (like the structure of the reports)
/// </summary>
Expand Down Expand Up @@ -57,19 +55,6 @@ public class PhdEntry : PhdObject
public double? Value { get; set; }
public MeasurementUnit Unit { get; set; } = NumberUnit.Instance;

// TODO: Support
public int? IterationIndex { get; set; }

public long? InvocationCount { get; set; }
// public DateTimeOffset? StartTimestamp { get; set; }
// public DateTimeOffset? EndTimestamp { get; set; }
// public string? Marker { get; set; }
//
// /// <summary>
// /// Examples: mean, median, min, max, p0, p25, p75, p100
// /// </summary>
// public string? Aggregator { get; set; }

private readonly List<PhdEntry> children = [];
public IReadOnlyList<PhdEntry> Children => children;

Expand All @@ -84,23 +69,10 @@ public class PhdEntry : PhdObject
public PhdEntry Add(params PhdEntry[] entries)
{
foreach (var entry in entries)
{
children.Add(entry);
entry.parent = this;
}
return this;
}

public bool Remove(PhdEntry entry)
{
if (entry.parent == this && children.Remove(entry))
{
entry.parent = null;
return true;
}
return false;
}

public IEnumerable<PhdEntry> Traverse()
{
yield return this;
Expand Down
6 changes: 2 additions & 4 deletions src/Perfolizer/Perfolizer/Phd/Dto/PhdCpu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ public class PhdCpu : PhdObject
public int? LogicalCoreCount { get; set; }
public string? Architecture { get; set; }
public long? NominalFrequencyHz { get; set; }
public long? MinFrequencyHz { get; set; }
public long? MaxFrequencyHz { get; set; }

public Frequency? GetNominalFrequency() => NominalFrequencyHz.HasValue ? Frequency.FromHz(NominalFrequencyHz.Value) : null;
public Frequency? GetMinFrequency() => MinFrequencyHz.HasValue ? Frequency.FromHz(MinFrequencyHz.Value) : null;
public Frequency? GetMaxFrequency() => MaxFrequencyHz.HasValue ? Frequency.FromHz(MaxFrequencyHz.Value) : null;
public Frequency? NominalFrequency() => NominalFrequencyHz.HasValue ? Frequency.FromHz(NominalFrequencyHz.Value) : null;
public Frequency? MaxFrequency() => MaxFrequencyHz.HasValue ? Frequency.FromHz(MaxFrequencyHz.Value) : null;

public PhdCpu SetDisplay()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Perfolizer/Perfolizer/Phd/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
* Analysers
* Import old jobs
* GC
* Unit: RPS
* Unit: RPS
* Rename: Children -> Nested

0 comments on commit 5a36a91

Please sign in to comment.