private NamedList<Number> createStatistics(long totalBytes,long localBytes,int totalCount,int localCount){
  NamedList<Number> statistics=new SimpleOrderedMap<Number>();
  statistics.add(LOCALITY_BYTES_TOTAL,totalBytes);
  statistics.add(LOCALITY_BYTES_LOCAL,localBytes);
  if (localBytes == 0) {
    statistics.add(LOCALITY_BYTES_RATIO,0);
  }
 else {
    statistics.add(LOCALITY_BYTES_RATIO,localBytes / (double)totalBytes);
  }
  statistics.add(LOCALITY_BLOCKS_TOTAL,totalCount);
  statistics.add(LOCALITY_BLOCKS_LOCAL,localCount);
  if (localCount == 0) {
    statistics.add(LOCALITY_BLOCKS_RATIO,0);
  }
 else {
    statistics.add(LOCALITY_BLOCKS_RATIO,localCount / (double)totalCount);
  }
  return statistics;
}

private NamedList < Number > createStatistics ( long totalBytes , long localBytes , int totalCount , int localCount ) { NamedList < Number > statistics = new SimpleOrderedMap < Number > ( ) ; statistics . add ( LOCALITY_BYTES_TOTAL , totalBytes ) ; statistics . add ( LOCALITY_BYTES_LOCAL , localBytes ) ; if ( localBytes == 0 ) { statistics . add ( LOCALITY_BYTES_RATIO , 0 ) ; } else { statistics . add ( LOCALITY_BYTES_RATIO , localBytes / ( double ) totalBytes ) ; } statistics . add ( LOCALITY_BLOCKS_TOTAL , totalCount ) ; statistics . add ( LOCALITY_BLOCKS_LOCAL , localCount ) ; if ( localCount == 0 ) { statistics . add ( LOCALITY_BLOCKS_RATIO , 0 ) ; } else { statistics . add ( LOCALITY_BLOCKS_RATIO , localCount / ( double ) totalCount ) ; } return statistics ; }
generate a statistics object based on the given measurements for all files monitored by this reporter .
