private void waitForStatSamplerToRun(final Statistics samplerStats, final int timesToRun) {
    final int startSampleCount = samplerStats.getInt("sampleCount");
    await("waiting for the StatSampler to run")
        .until(() -> samplerStats.getInt("sampleCount") >= startSampleCount + timesToRun);
  }
Integration tests for statistics sampling.

@since GemFire 7.0
geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/StatSamplerIntegrationTest.java