public Duration addLoadMeasurements(int measurements, IntFunction<Double> queryRate, IntFunction<Double> writeRate) {
        Instant initialTime = fixture.tester().clock().instant();
        for (int i = 0; i < measurements; i++) {
            fixture.tester().nodeMetricsDb().addClusterMetrics(fixture.applicationId(),
                                                               Map.of(fixture.clusterId(), new ClusterMetricSnapshot(fixture.tester().clock().instant(),
                                                                                                                     queryRate.apply(i),
                                                                                                                     writeRate.apply(i))));
            fixture.tester().clock().advance(samplingInterval);
        }
        return Duration.between(initialTime, fixture.tester().clock().instant());
    }
Creates the given number of measurements, spaced 5 minutes between, using the given function
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java