Skip to content

Commit

Permalink
Remove sleeps and extra process dumps from blame
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Sep 1, 2020
1 parent 4fcacb2 commit b9cd8eb
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public WindowsHangDumper(Action<string> logWarning)
public void Dump(int processId, string outputDirectory, DumpTypeOption type)
{
var process = Process.GetProcessById(processId);
var processTree = process.GetProcessTree();
var processTree = process.GetProcessTree().Where(p => p.Process.ProcessName != "conhost" && p.Process.ProcessName != "WerFault").ToList();

if (processTree.Count > 1)
{
Expand Down Expand Up @@ -68,12 +68,10 @@ public void Dump(int processId, string outputDirectory, DumpTypeOption type)
}
}

Thread.Sleep(1300);
foreach (var p in bottomUpTree)
{
try
{
Thread.Sleep(500);
var outputFile = Path.Combine(outputDirectory, $"{p.ProcessName}_{p.Id}_{DateTime.Now:yyyyMMddTHHmmss}_hangdump.dmp");
CollectDump(p, outputFile, type);
}
Expand Down

0 comments on commit b9cd8eb

Please sign in to comment.