final int availableProcessors = Runtime.getRuntime().availableProcessors();
LOG.info("availableProcessors: {}", availableProcessors);
// test it only if number there are more than 1 CPU cores are available
if (availableProcessors > 1) {
final StopWatch watch = new StopWatch();
final WroConfiguration config = Context.get().getConfig();
initExecutor(createSlowPreProcessor(100), createSlowPreProcessor(100), createSlowPreProcessor(100));
final List<Resource> resources = createResources(Resource.create("r1", ResourceType.JS),
Resource.create("r2", ResourceType.JS));
// warm up
config.setParallelPreprocessing(true);
victim.processAndMerge(resources, true);
// parallel
watch.start("parallel preProcessing");
config.setParallelPreprocessing(true);
victim.processAndMerge(resources, true);
watch.stop();
final long parallelExecution = watch.getLastTaskTimeMillis();
// sequential
config.setParallelPreprocessing(false);
watch.start("sequential preProcessing");
victim.processAndMerge(resources, true);
watch.stop();
final long sequentialExecution = watch.getLastTaskTimeMillis();