public void reset() {
        numHardwareCoresPerBe.clear();
        cachedAvgNumHardwareCores.set(-1);

        memLimitBytesPerBe.clear();
        cachedAvgMemLimitBytes.set(-1);
    }
@Test
    public void testReset() {
        BackendResourceStat stat = BackendResourceStat.getInstance();

        stat.setNumHardwareCoresOfBe(0L, 8);
        stat.setNumHardwareCoresOfBe(1L, 4);
        assertThat(stat.getAvgNumHardwareCoresOfBe()).isEqualTo(6);

        stat.setMemLimitBytesOfBe(0L, 100);
        stat.setMemLimitBytesOfBe(1L, 50);
        assertThat(stat.getAvgMemLimitBytes()).isEqualTo(150 / 2);
        assertThat(stat.getAvgNumHardwareCoresOfBe()).isEqualTo(6);

        stat.reset();

        assertThat(stat.getAvgNumHardwareCoresOfBe()).isEqualTo(1);
        assertThat(stat.getAvgMemLimitBytes()).isEqualTo(0);
        assertThat(stat.getNumBes()).isEqualTo(0);
    }