@Test
  public void testBackupStatistics() {
    region = cache.<Integer, String>createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
        .setScope(Scope.LOCAL).setDiskSynchronous(true).setDiskStoreName(diskStore.getName())
        .create(REGION_NAME + 2);
    diskRegion = ((InternalRegion) region).getDiskRegion();

    DiskRegionStats diskStats = diskRegion.getStats();

    assertEquals(0, diskStats.getWrites());
    assertEquals(0, diskStats.getNumEntriesInVM());
    assertEquals(0, diskStats.getReads());
    assertEquals(0, diskStats.getNumOverflowOnDisk());

    region.put(0, "value");

    assertEquals(1, diskStats.getWrites());
    assertEquals(1, diskStats.getNumEntriesInVM());
    assertEquals(0, diskStats.getReads());
    assertEquals(0, diskStats.getNumOverflowOnDisk());

    region.put(1, "value");

    assertEquals(2, diskStats.getWrites());
    assertEquals(2, diskStats.getNumEntriesInVM());
    assertEquals(0, diskStats.getReads());
    assertEquals(0, diskStats.getNumOverflowOnDisk());

    region.localDestroy(1);

    // destroy becomes a tombstone
    assertEquals(3, diskStats.getWrites());
    assertEquals(1, diskStats.getNumEntriesInVM());
    assertEquals(0, diskStats.getReads());

    region.put(2, "value");
    region.localDestroy(2);
    assertEquals(1, region.keySet().size());
  }
Tests that the disk region statistics are updated correctly for persist backup regions.
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java