-
|
I ended up creating this issue in the dotnet/diagnostics space dotnet/diagnostics#5649 but was hoping the folks maintaining this repository may have recommendations. I'm trying to figure out why our test project is much slower in a containerized environment (k8s) by almost 10x when compared to local machines. I've tried using PerfView but ends up showing a bunch of Do the maintainers of the Microsoft test framework have a recommended approach to tracing and profiling a test project from the CLI? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
|
@Cjewett that's not your original question but I think moving out of VSTest to MTP might help. Taking a dump or using perfview is usually my approach. @nohwnd @Youssef1313 @MarcoRossignoli any other solution? |
Beta Was this translation helpful? Give feedback.
-
|
To clear things up, are you using windows containers or linux containers? Seeing that you mention perfview and .net framework, I am assuming windows? For capturing the trace of vstest it is easiest to use perfview to collect whole system, with a process name filter
You can also add Once you have the trace, I would start by looking at CPU stacks of all the processes that are coming from test platform (all vstest.console.exe / dotnet that runs vstest.console.dll, testhost.exe and datacollector.exe), and look at the timeline.
You can use the timestamps from Events to see when the run started and ended in testhost.
If that graph is very busy, then you are more likely running into CPU issues, if that graph is not busy, then this is more likely a thread starvation issue. I would also try to generated some empty tests and run that in the containter setup you have and locally to see if the time changes as well, just to make sure this is issue in the platform, and not in your code. Here is powershell code I use to generate tests for different frameworks: https://gist.github.com/nohwnd/3a05153f11b1a1eb6c3793311c25292d |
Beta Was this translation helpful? Give feedback.








To clear things up, are you using windows containers or linux containers? Seeing that you mention perfview and .net framework, I am assuming windows?
For capturing the trace of vstest it is easiest to use perfview to collect whole system, with a process name filter
testhost*.exe;datacollector*.exe;vstest.console*.exe;dotnet.exe:You can also add
*TestPlatformsource to give you a time frame of when adapters start and stop.Once you have the trace, I would start by looking at CPU stacks of all the processes that are coming from test platform (all vstest.console.exe / dotnet that runs vstest.console.dll, testhost.exe and datacollector.exe), and look at the timeline.
You can use the times…