1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-21 17:28:00 +02:00

Improved profiler - better filtering, show 'hot' paths

This commit is contained in:
Brian Fiete 2023-03-14 09:32:01 -07:00
parent 68bc8976b8
commit 398cb0c7ad
5 changed files with 147 additions and 45 deletions

View file

@ -351,6 +351,19 @@ namespace IDE.ui
}
}
void OpenHot(ListViewItem lvi, int32 minSamples)
{
lvi.WithItems(scope (childItem) =>
{
var profileListViewItem = childItem as ProfileListViewItem;
if ((profileListViewItem.mSelfSamples + profileListViewItem.mChildSamples >= minSamples) && (profileListViewItem.IsParent))
{
profileListViewItem.Open(true, true);
OpenHot(childItem, minSamples);
}
});
}
public void Show(int32 threadId, StringView threadName)
{
mTickCreated = Utils.GetTickCount();
@ -449,6 +462,8 @@ namespace IDE.ui
itemStack.Add(curItem);
curItem = newItem;
}
OpenHot(mListView.GetRoot(), (.)(totalSamples * 0.05f));
}
public void Add(DbgProfiler profiler)