getMatchingClasses
public static java.util.Set<java.lang.Class<?>> getMatchingClasses(java.util.Collection<ClassMatchVisitorFactory> matchers,
InstrumentationContextClassMatcherHelper matchHelper,
java.lang.Class<?>... classes)
This parallelizes matching of a large number of classes by firing up threads to handle
a partition of the classes. It uses an interesting and difficult algorithm to decide
how many threads to start, with a max of 8.
We think that there is room to improve/fix/optimize this to better match available
cores on the underlying hardware.
If 10 classes are passed in, it will create 5 threads.
If 100 classes are passed in, it will create 8 threads.