public int getDefaultDOP() {
        int avgNumOfCores = getAvgNumHardwareCoresOfBe();
        return Math.max(1, avgNumOfCores / 2);
    }
@Test
    public void testGetDefaultDop() {
        BackendResourceStat stat = BackendResourceStat.getInstance();

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