Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change BytesAllocatedPerOperation to long? #4553

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/ResultsComparer/DataTransferContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class Memory
public int Gen1Collections { get; set; }
public int Gen2Collections { get; set; }
public long TotalOperations { get; set; }
public long BytesAllocatedPerOperation { get; set; }
public long? BytesAllocatedPerOperation { get; set; }
}

public class Measurement
Expand Down
4 changes: 2 additions & 2 deletions src/tools/ResultsComparer/MultipleInputsComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private static string GetRatio((string id, Benchmark baseResult, Benchmark diffR

private static string GetAllocatedDiff(Benchmark diffResult, Benchmark baseResult)
{
long baseline = baseResult.Memory.BytesAllocatedPerOperation;
long baseline = baseResult.Memory.BytesAllocatedPerOperation ?? 0;
if (baseline == 0)
baseline = GetMetricValue(baseResult);
long diff = diffResult.Memory.BytesAllocatedPerOperation;
long diff = diffResult.Memory.BytesAllocatedPerOperation ?? 0;
if (diff == 0)
diff = GetMetricValue(diffResult);

Expand Down
Loading