Class InputBoosterStats

java.lang.Object
dev.inputbooster.api.util.InputBoosterStats

public final class InputBoosterStats extends Object
Convenience wrapper around InputBoosterAPI for accessing live stats without holding a reference to the API instance yourself.

 int fps = InputBoosterStats.fps();
 int hz  = InputBoosterStats.hz();
 long recovered = InputBoosterStats.recovered();
 
All methods return safe default values (0, false) if InputBooster is not loaded.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Immutable snapshot of the most commonly displayed InputBooster stats.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    Average input-to-drain latency in ms, or 0 if not loaded.
    static int
    cps()
    Current CPS (last second), or 0 if not loaded.
    static int
    fps()
    Current FPS as seen by InputBooster, or 0 if not loaded.
    static int
    hz()
    Current poll rate in Hz, or 0 if not loaded.
    static boolean
    True if InputBooster is active and processing inputs.
    static boolean
    True if InputBooster is in AUTO (FPS-adaptive) mode.
    static boolean
    True when InputBooster burst mode is currently active.
    static double
    Peak input-to-drain latency in ms, or 0 if not loaded.
    static long
    Total inputs recovered this session, or 0 if not loaded.
    Captures a consistent one-call view of the current InputBooster stats.
    static String
    Returns a human-readable one-line summary of InputBooster state, suitable for HUD overlays or debug screens.
    static long
    Total hits (total ATTACK_PRESSED events processed), or 0 if not loaded.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hz

      public static int hz()
      Current poll rate in Hz, or 0 if not loaded.
    • fps

      public static int fps()
      Current FPS as seen by InputBooster, or 0 if not loaded.
    • recovered

      public static long recovered()
      Total inputs recovered this session, or 0 if not loaded.
    • totalHits

      public static long totalHits()
      Total hits (total ATTACK_PRESSED events processed), or 0 if not loaded.
    • cps

      public static int cps()
      Current CPS (last second), or 0 if not loaded.
    • isBursting

      public static boolean isBursting()
      True when InputBooster burst mode is currently active.
    • avgLatencyMs

      public static double avgLatencyMs()
      Average input-to-drain latency in ms, or 0 if not loaded.
    • peakLatencyMs

      public static double peakLatencyMs()
      Peak input-to-drain latency in ms, or 0 if not loaded.
    • isActive

      public static boolean isActive()
      True if InputBooster is active and processing inputs.
    • isAutoMode

      public static boolean isAutoMode()
      True if InputBooster is in AUTO (FPS-adaptive) mode.
    • snapshot

      public static InputBoosterStats.Snapshot snapshot()
      Captures a consistent one-call view of the current InputBooster stats.
    • summary

      public static String summary()
      Returns a human-readable one-line summary of InputBooster state, suitable for HUD overlays or debug screens. Example: "InputBooster | 200 Hz | AUTO | CPS 14/20 | Latency 3.1ms"