Open danmoseley opened 2 years ago
hmm, that's odd - we filter that out
What version are you using?
Sorry, I should have mentioned this is current 6.0 one. But the lines above seem like they should be in there - hmm
C:\temp>dotnet stack --version
6.0.320101+2aa2e938aad310fd667f926c7217b990568e2783
C:\temp>dotnet stack ps
2616 dotnet C:\git\performance\tools\dotnet\x86\dotnet.exe =10, MinIterationCount=15, MinWarmupIterationCount=6, UnrollFactor=1, WarmupCount=-1" --benchmarkId 1306
2668 dotnet C:\git\performance\tools\dotnet\x86\dotnet.exe no-restore --no-build -- --filter * --packages C:\git\performance\artifacts\packages --buildTimeout 1200
4116 dotnet C:\Program Files (x86)\dotnet\dotnet.exe stack ps
2560 MicroBenchmarks "C:\git\performance\artifacts\bin\MicroBenchmarks\Release\net7.0\MicroBenchmarks.exe" --filter * --packages C:\git\performance\artifacts\packages --buildTimeout 1200
and on another machine
C:\temp>taskkill /im dotnet.exe
ERROR: The process "dotnet.exe" not found.
C:\temp>dotnet stack --version
6.0.257301+27172ce4d05e8a3b0ffdefd65f073d40a1b1fe54
C:\temp>dotnet stack ps
44696 dotnet C:\Program Files\dotnet\dotnet.exe
Hmm, I verified it is using this one C:\USERS\DANMOSE.DOTNET\TOOLS.STORE\DOTNET-STACK\6.0.257301\DOTNET-STACK\6.0.257301\TOOLS\NETCOREAPP3.1\ANY\DOTNET-STACK.DLL
which per ILSPY contains that code.
Ah, I see the bug. It works if I do "dotnet-stack ps". If I do "dotnet stack ps" it filters out "dotnet-stack.exe" but isn't aware of its parent dotnet.exe. It needs to find that and filter it.
It needs a little pinvoking and checking the process start time as there's no managed API currently: https://github.com/dotnet/runtime/issues/24423
Makes sense. When we do this we just need to make sure this is filtering just dotnet stack