public void addQueryRateMeasurements(ApplicationId application,
                                         ClusterSpec.Id cluster,
                                         int measurements,
                                         IntFunction<Double> queryRate) {
        for (int i = 0; i < measurements; i++) {
            nodeRepository().metricsDb().addClusterMetrics(application,
                                                           Map.of(cluster, new ClusterMetricSnapshot(clock().instant(), queryRate.apply(i), 0.0)));
            clock().advance(Duration.ofSeconds(150));
        }
    }
Creates the given number of measurements, spaced 5 minutes between, using the given function
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java