Closed camilstaps closed 6 years ago
That looks like it, the labels go in a big list. At the end it is traversed several times to count disjoint sets of labels...
I don't recall if there was a good reason for doing it like this, but I will see if I can fix it. (Patches welcome, of course!)
Fixed!
Excellent!
When I run the below code, the tests run fast but after it says "OK, passed 1000000 tests." it takes 1-2s to show the distribution of the classes.
That leads me to think that a list of classes or even a list of test cases is kept in memory until the end of all tests. I'm not sure if this is correct, but it is consistent with experiments on larger tests of mine, where using a higher
withMaxSuccess
uses more memory, and more memory is allocated as the run progresses (and it cannot be because of the size of the test cases, they are still small). Is that necessary for something? For the classes, it would seem easiest to keep a map of classes and a simple count of how often they occurred.