public void SetItemsSource(List <IHotPath> lines, IProfilingStatisticsTotals totals) { ItemAdaptor.Totals = totals; Lines = new ObservableCollection <IHotPath>(lines); LinesGrid.ItemsSource = Lines; }
private List <IHotPath> BuildThreadHotPaths(ThreadStatisticsData thread, StatisticsType statisticsType, IProfilingStatisticsTotals totals, double hotPathThreshold) { var maxValue = totals.GetValue(statisticsType); return(thread.FunctionCalls .Where(call => call.SamplesInclusive > 0 && ((100.0 * FunctionCallValue(call, statisticsType) / maxValue) >= hotPathThreshold)) .OrderByDescending(call => FunctionCallValue(call, statisticsType)) .Select <FunctionCall, IHotPath>(call => new HotPath { Name = call.Name, Children = CallPath(call), AllocatedMemoryExclusive = call.AllocatedMemoryExclusive, SamplesExclusive = call.SamplesExclusive, TimeExclusive = call.TimeExclusive, }) .ToList()); }