private int getNumberOfTracesToDiscard() {
    int currentTracesSize = this.traces.size();
    int tracesToDiscard = currentTracesSize - bufferSize;
    tracesToDiscard = tracesToDiscard < 0 ? 0 : tracesToDiscard;
    return tracesToDiscard;
  }
Removes traces stored in the buffer.
lynx/src/main/java/com/github/pedrovgs/lynx/presenter/TraceBuffer.java