public void recordMetric(long time, String command,
      String user, long delta) {
    RollingWindow window = getRollingWindow(command, user);
    window.incAt(time, delta);
  }
@Test
  public void windowReset() throws Exception {
    Configuration config = new Configuration();
    config.setInt(DFSConfigKeys.NNTOP_BUCKETS_PER_WINDOW_KEY, 1);
    config.setInt(DFSConfigKeys.NNTOP_NUM_USERS_KEY, N_TOP_USERS);
    int period = 2;
    RollingWindowManager rollingWindowManager =
        new RollingWindowManager(config, period);
    rollingWindowManager.recordMetric(0, "op1", users[0], 3);
    checkValues(rollingWindowManager, 0, "op1", 3, 3);
    checkValues(rollingWindowManager, period - 1, "op1", 3, 3);
    checkValues(rollingWindowManager, period, "op1", 0, 0);
  }