Skip to content

Commit b9cd8eb

Browse files
committed
Remove sleeps and extra process dumps from blame
1 parent 4fcacb2 commit b9cd8eb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public WindowsHangDumper(Action<string> logWarning)
2727
public void Dump(int processId, string outputDirectory, DumpTypeOption type)
2828
{
2929
var process = Process.GetProcessById(processId);
30-
var processTree = process.GetProcessTree();
30+
var processTree = process.GetProcessTree().Where(p => p.Process.ProcessName != "conhost" && p.Process.ProcessName != "WerFault").ToList();
3131

3232
if (processTree.Count > 1)
3333
{
@@ -68,12 +68,10 @@ public void Dump(int processId, string outputDirectory, DumpTypeOption type)
6868
}
6969
}
7070

71-
Thread.Sleep(1300);
7271
foreach (var p in bottomUpTree)
7372
{
7473
try
7574
{
76-
Thread.Sleep(500);
7775
var outputFile = Path.Combine(outputDirectory, $"{p.ProcessName}_{p.Id}_{DateTime.Now:yyyyMMddTHHmmss}_hangdump.dmp");
7876
CollectDump(p, outputFile, type);
7977
}

0 commit comments

Comments
 (0)