-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-start testhosts #3666
Pre-start testhosts #3666
Conversation
Not fully finished, but not very complex. And it has no impact on testhost as it is using just the existing messages. There is also no huge gap between the request start and the actual work, as with test sessions. So we don't have to worry about locking files or anything because they would have been locked anyway, because we are in "a run". Basically we just split up the run task into two parts, DiscoveryInitialize (RunInitialize), and Discovery (Run). And then run them staggered, so we use more threads (people usually have mulitcore cpus these days), but don't run tests in parallel (people usually don't want that). So we get the benefit of always having a testhost ready, without the complications of parallel test execution, even if isolated at process level:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do another pass later because I am not sure I grasped the full logic at the first review.
src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/IProxyDiscoveryManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/IProxyExecutionManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/InProcessProxyDiscoveryManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/InProcessProxyexecutionManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…onManager.cs Co-authored-by: Amaury Levé <[email protected]>
…onManager.cs Co-authored-by: Amaury Levé <[email protected]>
…allelOperationManager.cs Co-authored-by: Amaury Levé <[email protected]>
…allelProxyDiscoveryManager.cs Co-authored-by: Amaury Levé <[email protected]>
…allelProxyDiscoveryManager.cs Co-authored-by: Amaury Levé <[email protected]>
…onManager.cs Co-authored-by: Amaury Levé <[email protected]>
…ryManager.cs Co-authored-by: Amaury Levé <[email protected]>
…allelProxyExecutionManager.cs Co-authored-by: Amaury Levé <[email protected]>
…allelProxyDiscoveryManager.cs Co-authored-by: Amaury Levé <[email protected]>
I'll get back to you with some perf measurements.
For the interpolated strings, that was my bad, forgot to remove them when transforming the |
I saw notification for mention here, but all I see now are outdated comments, so I guess no more assistance is needed from me right now. |
@cvpoienaru are there any numbers please? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
...TestPlatform.CrossPlatEngine.UnitTests/Client/Parallel/ParallelProxyExecutionManagerTests.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs
Show resolved
Hide resolved
…into dev/copoiena/pre-start-testhost
/azp run |
1 similar comment
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Is it possible to disable this feature somehow? It currently breaks test discovery for us with multiple
|
@MaceWindu a quick way to disable this feature would be to set VSTEST_HOSTPRESTART_COUNT to 0. |
Looks like it doesn't help with issue. Will wait for #4469 fixed :) |
Description
Pre-start testhosts for non-parallel runs for the next source in row. So we don't run any tests in parallel but we have a testhost ready to pick up the next source and run it. This makes the testhost startup and adapter lookup amortize better.
Related issue
Fixes part of #3647