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
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ public string Summary
var ready = Math.Max(1, Volatile.Read(ref _ready));
var average = TimeSpan.FromTicks(Interlocked.Read(ref _readyTicks) / ready).TotalSeconds;
var slowest = TimeSpan.FromTicks(Interlocked.Read(ref _slowestTicks)).TotalSeconds;
var failed = _failures.Values.Sum();
var causes = string.Join("; ", _failures.OrderByDescending(entry => entry.Value).Take(CausesShown).Select(entry => $"{entry.Value} {entry.Key}"));
// A snapshot: LINQ over the dictionary itself sizes an array by Count, then copies while workers add causes.
var failures = _failures.ToArray();
var failed = failures.Sum(entry => entry.Value);
var causes = string.Join("; ", failures.OrderByDescending(entry => entry.Value).Take(CausesShown).Select(entry => $"{entry.Value} {entry.Key}"));

return $"programs on demand: {_jobs.Count} asked for, {Volatile.Read(ref _made)} translated and compiled, {Volatile.Read(ref _found)} found compiled{_compilerCounts?.Invoke()}, ready after {average:F1} s on average and {slowest:F0} s at most, {failed} failed ({causes}), {_workers.Backlog} queued, {_workers.Running} running, {_workers.WaitingForMemory} waiting for memory, {Links.Summary}";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,11 @@ private void CountSkippedBefore(nint standIn)

private string SkippedBeforeSummary()
{
var total = _skippedBefore.Values.Sum();
var top = string.Join(", ", _skippedBefore.OrderByDescending(entry => entry.Value).Take(SkipsShown).Select(entry => $"{entry.Key} x{entry.Value}"));
// A snapshot: LINQ over the dictionary itself sizes an array by Count, then copies while lists add entries
// (ArgumentException on the sampler thread, which ended a boot at 4,200 presents).
var entries = _skippedBefore.ToArray();
var total = entries.Sum(entry => entry.Value);
var top = string.Join(", ", entries.OrderByDescending(entry => entry.Value).Take(SkipsShown).Select(entry => $"{entry.Key} x{entry.Value}"));

return $"{total} lists ran work after a skipped one ({top})";
}
Expand Down