@Test
    public void test_autoscaling_weights_growth_rate_by_confidence() {
        var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
        fixture.setScalingDuration(Duration.ofHours(6));

        double scalingFactor = 1.0/6000; // To make the average query rate low
        fixture.tester().clock().advance(Duration.ofDays(2));
        Duration timeAdded = fixture.loader().addLoadMeasurements(100,
                                                         t -> scalingFactor * (100.0 + (t < 50 ? t * t * t : 155000 - (t - 49) * (t - 49) * (t - 49))),
                                                         t -> 0.0);
        fixture.tester.clock().advance(timeAdded.negated());
        fixture.loader().addCpuMeasurements(0.7, 200);
        fixture.tester().assertResources("Scale up slightly since observed growth is faster than scaling time, but we are not confident",
                                         5, 1, 2.4,  11.9, 50.5,
                                         fixture.autoscale());
    }
Same as above but mostly write traffic, which favors smaller groups
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java