public static Executor.Controller utilizationController(final double targetUtilization, final int maxThreadCount) {
        return new Executor.Controller() {
            public boolean shouldIncrement(int numWorkers) {
                return numWorkers < maxThreadCount;
            }

            public int adjustment(Stats stats) {
                int numWorkers = stats.getNumWorkers();
                double correction = stats.getUtilization(1.0) / targetUtilization;
                int n = (int) Math.ceil(stats.getNumWorkers() * correction) - numWorkers;

                if (n < 0) {
                    return Math.max(n, (int) -Math.ceil(numWorkers/4.0));
                } else if (n > 0) {
                    return Math.min(n, (int) Math.ceil(numWorkers/4.0));
                } else {
                    return 0;
                }
            }
        };
    }