public Duration addMeasurements(Load load, int generation, boolean inService, boolean stable, int count) {
        Instant initialTime = fixture.tester().clock().instant();
        for (int i = 0; i < count; i++) {
            fixture.tester().clock().advance(samplingInterval);
            for (Node node : fixture.nodes()) {
                fixture.tester().nodeMetricsDb().addNodeMetrics(List.of(new Pair<>(node.hostname(),
                                                                        new NodeMetricSnapshot(fixture.tester().clock().instant(),
                                                                                               load,
                                                                                               generation,
                                                                                               inService,
                                                                                               stable,
                                                                                               0.0))));
            }
        }
        return Duration.between(initialTime, fixture.tester().clock().instant());
    }
Adds measurements with the given resource value and ideal values for the other resources,
scaled to take one node redundancy into account.
(I.e we adjust to measure a bit lower load than "naively" wanted to offset for the autoscaler
wanting to see the ideal load with one node missing.)
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java