@Setup
    public void setupCases() {
        final Random rand = new Random();

        groupSameWeight = getEndpointGroup(generateEndpoints(
                id -> Endpoint.of("127.0.0.1", id + 1)
                              .withWeight(300)));

        groupRandomMainly1Max30 = getEndpointGroup(generateEndpoints(
                id -> Endpoint.of("127.0.0.1", id + 1)
                              .withWeight(1 + (id % 50 == 0 ? 29 : 0))));

        groupRandomMax10 = getEndpointGroup(generateEndpoints(
                id -> Endpoint.of("127.0.0.1", id + 1)
                              .withWeight(1 + rand.nextInt(10))));

        groupRandomMax100 = getEndpointGroup(generateEndpoints(
                id -> Endpoint.of("127.0.0.1", id + 1)
                              .withWeight(1 + rand.nextInt(100))));

        groupUnique = getEndpointGroup(generateEndpoints(
                id -> Endpoint.of("127.0.0.1", id + 1)
                              .withWeight(id + 1)));
    }
Microbenchmarks of different {@link EndpointSelector} configurations.
benchmarks/jmh/src/jmh/java/com/linecorp/armeria/core/client/endpoint/WeightedRoundRobinStrategyBenchmark.java