Skip to content
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