private void testRowsFilteredMetric(Scan baseScan, Filter filter, int expectedNumFiltered)
    throws Exception {
    Scan scan = new Scan(baseScan);
    if (filter != null) {
      scan.setFilter(filter);
    }
    testMetric(scan, ServerSideScanMetrics.COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME,
      expectedNumFiltered);
  }
@return The approximate heap size of a cell in the test table. All cells should have
        approximately the same heap size, so the value is cached to avoid repeating the
        calculation
@throws Exception on unexpected failure
hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java