testfx icon indicating copy to clipboard operation
testfx copied to clipboard

ClassCleanupManager.MarkTestComplete is inefficient

Open Youssef1313 opened this issue 7 months ago • 3 comments

Create a test class with a parameterized test that has a million test case. Profile it to see:

Image

21 sec (45% of CPU time) is spent just in List<T>.Remove

Youssef1313 avatar Jun 12 '25 06:06 Youssef1313

does this scale down to 1000-10000 data rows? OR to 1000-10000 tests? Did you see anyone having actual test with 1milion data rows?

nohwnd avatar Jun 12 '25 07:06 nohwnd

Did you see anyone having actual test with 1milion data rows?

Unlikely 😄

I will probably try to get the average and maximum number of tests in a single class from dotnet/roslyn.

Youssef1313 avatar Jun 12 '25 08:06 Youssef1313

I usually tested on 10, 100 and 1000 and 10k items, to see if that performance is mostly linear. And if it was it was good enough.

nohwnd avatar Jun 12 '25 08:06 nohwnd