Code example for BitSet

Methods: cardinality

0
   * Gets the percent of the requests that had exceptions occur. 
   * 
   * @return percent failures as float 
   */ 
  public synchronized float getPercentExceptions() { 
    return (float) requests.cardinality() / (float) size;
  } 
 
  /** 
   * Mark the request as success. 
   */ 
  public synchronized void success() { 
    if (shuffleExceptionLimit > 0) {
      requests.clear(index);
      incrIndex(); 
    } 
  } 
 
  /** 
   * Mark the request as an exception occurred. 
   */