Class WaiterStats

java.lang.Object
dev.comfast.util.waiter.WaiterStats

public class WaiterStats extends Object
  • Constructor Details

    • WaiterStats

      public WaiterStats()
  • Method Details

    • addError

      public void addError(Throwable error, long time, long loopTime)
      Parameters:
      error - Throwable to be added
      time - ms from start waitFor
      loopTime - ms from start current loop
    • recentError

      public Throwable recentError()
      Returns:
      last added error
    • getStats

      public String getStats()
      Returns:
      String like:
      
       time | loopTime | error
       1s   | 26ms     | RuntimeException
       2s   | 330ms    | RuntimeException
       3s   | 110ms    | RuntimeException: oh no !
       4.5s | 360ms    | InvalidArgumentException
       6s   | 12ms     | InvalidArgumentException
       7.3s | 130ms    | InvalidArgumentException
       8s   | 201ms    | InvalidArgumentException: something has broken