@Override
    public void gc() {
        nodeTable.gc();
        clusterTable.gc();
    }
@Test
    public void testGc() {
        String dataDir = createEmptyDataDir("QuestMetricsDbGc", "metrics");
        ManualClock clock = new ManualClock();
        int days = 10; // The first metrics are this many days in the past
        clock.retreat(Duration.ofDays(10));
        Instant startTime = clock.instant();

        QuestMetricsDb db = new QuestMetricsDb(dataDir, clock);

        db.addNodeMetrics(nodeTimeseries(24 * days, Duration.ofHours(1), clock, "host1", "host2", "host3"));

        var application1 = ApplicationId.from("t1", "a1", "i1");
        var cluster1 = new ClusterSpec.Id("cluster1");
        db.addClusterMetrics(application1, Map.of(cluster1, new ClusterMetricSnapshot(clock.instant(), 30.0, 15.0)));

        assertEquals(24 * days, db.getNodeTimeseries(Duration.between(startTime, clock.instant()),
                                                              Set.of("host1")).get(0).size());
        db.gc();
        assertTrue(db.getNodeTimeseries(Duration.between(startTime, clock.instant()), Set.of("host1")).get(0).size() < 24 * 4);
        db.gc(); // no-op
        assertTrue(db.getNodeTimeseries(Duration.between(startTime, clock.instant()), Set.of("host1")).get(0).size() < 24 * 4);
    }