public Stream<String[]> generate(final String [] args) throws Exception {
        final Set<String> configsTried = new HashSet<>();

        // get ready for the some serious brute-force action here
        for (int ir = 0; ir < nioPoolSizeRange.size(); ir++) {
            for (int is = 0; is < parallelismSizeRange.size(); is++) {
                for (int it = 0; it < workerPoolSizeRange.size(); it++) {
                    for (int ix = 0; ix < maxConnectionPoolSizeRange.size(); ix++) {
                        final String s = String.join(",", String.valueOf(ir), String.valueOf(is), String.valueOf(it), String.valueOf(ix));
                        if (!configsTried.contains(s)) {
                            final Object[] argsToProfiler =
                                    Stream.of("nioPoolSize", nioPoolSizeRange.get(ir).toString(),
                                            "parallelism", parallelismSizeRange.get(is).toString(),
                                            "workerPoolSize", workerPoolSizeRange.get(it).toString(),
                                            "maxConnectionPoolSize", maxConnectionPoolSizeRange.get(ix).toString(),
                                            "noExit", Boolean.TRUE.toString()).toArray();

                            final Object[] withExtraArgs = args.length > 0 ? Stream.concat(Stream.of(args), Stream.of(argsToProfiler)).toArray() : argsToProfiler;

                            final String[] stringProfilerArgs = Arrays.copyOf(withExtraArgs, withExtraArgs.length, String[].class);
                            System.out.println("Testing with: " + Arrays.toString(stringProfilerArgs));
                            ProfilingApplication.main(stringProfilerArgs);
                            TimeUnit.SECONDS.sleep(5);
                            configsTried.add(s);
                        }
                    }
                }
            }
        }

        System.out.println(configsTried.size());
        return null;
    }
An internal application used to test out ranges of configuration parameters for Gremlin Driver.

@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ConfigurationEvaluator.java