net.i2p.stat

## Class RateConstants

- java.lang.Object
- - net.i2p.stat.RateConstants

-     public final class RateConstants
      extends Object

  Centralized rate period constants for memory-optimized statistics collection. This class provides standardized period arrays for rate statistics to ensure consistency across the codebase while minimizing memory footprint.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long[]` | `BANDWIDTH_RATES` Bandwidth limiter rates - already optimized.
    `static long[]` | `BASIC_RATES` Basic rate periods for simple statistics: 1 minute and 1 hour.
    `static long` | `FIVE_MINUTES`
    `static long` | `ONE_DAY`
    `static long` | `ONE_HOUR`
    `static long` | `ONE_MINUTE`
    `static long[]` | `SHORT_TERM_RATES` Short-term rate periods for real-time metrics: 1 minute and 10 minutes.
    `static long[]` | `SIDEBAR_RATES` Extended rate periods including 5 minutes for sidebar display.
    `static long[]` | `STANDARD_RATES` Standard optimized rate periods: 1 minute, 1 hour, and 24 hours.
    `static long` | `TEN_MINUTES`
    `static long` | `THIRTY_MINUTES`
    `static long[]` | `TUNNEL_RATES` Tunnel-specific rate periods including 10 minutes for build statistics.
    `static long[]` | `TUNNEL_TEST_RATES` Tunnel test timing rate periods: 1 minute and 1 hour.
    `static long[]` | `TUNNEL_VERIFY_RATES` Tunnel verification rate periods: 1 minute, 10 minutes, and 1 hour.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BANDWIDTH_RATES

          public static final long[] BANDWIDTH_RATES

      Bandwidth limiter rates - already optimized. Maintains existing 3-period structure for bandwidth management.

    - #### BASIC_RATES

          public static final long[] BASIC_RATES

      Basic rate periods for simple statistics: 1 minute and 1 hour. Used where only basic rate tracking is needed.

    - #### FIVE_MINUTES

          public static final long FIVE_MINUTES

      See Also:
        Constant Field Values

    - #### ONE_DAY

          public static final long ONE_DAY

      See Also:
        Constant Field Values

    - #### ONE_HOUR

          public static final long ONE_HOUR

      See Also:
        Constant Field Values

    - #### ONE_MINUTE

          public static final long ONE_MINUTE

      See Also:
        Constant Field Values

    - #### SHORT_TERM_RATES

          public static final long[] SHORT_TERM_RATES

      Short-term rate periods for real-time metrics: 1 minute and 10 minutes. Used for transport, queue, and real-time operational statistics where long-term trends are not needed.

    - #### SIDEBAR_RATES

          public static final long[] SIDEBAR_RATES

      Extended rate periods including 5 minutes for sidebar display. Used only where user interface specifically requires 5-minute averages.

    - #### STANDARD_RATES

          public static final long[] STANDARD_RATES

      Standard optimized rate periods: 1 minute, 1 hour, and 24 hours. This provides sufficient granularity for real-time monitoring, medium-term trends, and long-term peer reputation tracking.

    - #### TEN_MINUTES

          public static final long TEN_MINUTES

      See Also:
        Constant Field Values

    - #### THIRTY_MINUTES

          public static final long THIRTY_MINUTES

      See Also:
        Constant Field Values

    - #### TUNNEL_RATES

          public static final long[] TUNNEL_RATES

      Tunnel-specific rate periods including 10 minutes for build statistics. Used only where tunnel monitoring specifically requires 10-minute windows.

    - #### TUNNEL_TEST_RATES

          public static final long[] TUNNEL_TEST_RATES

      Tunnel test timing rate periods: 1 minute and 1 hour. Used for tunnel test performance analysis where short-term vs longer-term comparison is needed to detect performance degradation.

    - #### TUNNEL_VERIFY_RATES

          public static final long[] TUNNEL_VERIFY_RATES

      Tunnel verification rate periods: 1 minute, 10 minutes, and 1 hour. Used only for tunnel verification and build performance monitoring where 10-minute trends are useful but 24-hour is excessive.