Class Stats

java.lang.Object
net.targetr.wtm3.Stats

public class Stats extends Object
Statistics for monitoring web server network activity.
Author:
Dr Michael Gardiner
  • Field Details

    • INSTANCE_ID

      public static final String INSTANCE_ID
      Unique instance ID for this server run.
    • CONNECTION_START_COUNT

      public static final AtomicLong CONNECTION_START_COUNT
      Number of expected connections started.
    • CONNECTION_END_COUNT

      public static final AtomicLong CONNECTION_END_COUNT
      Number of expected connections ended.
    • REQUEST_START_COUNT

      public static final AtomicLong REQUEST_START_COUNT
      Number of requests started.
    • REQUEST_END_COUNT

      public static final AtomicLong REQUEST_END_COUNT
      Number of requests ended.
    • GENERATOR_START_COUNT

      public static final AtomicLong GENERATOR_START_COUNT
      Number of generators started.
    • GENERATOR_END_COUNT

      public static final AtomicLong GENERATOR_END_COUNT
      Number of generators ended.
    • RESPONSE_START_COUNT

      public static final AtomicLong RESPONSE_START_COUNT
      Number of responses started.
    • RESPONSE_END_COUNT

      public static final AtomicLong RESPONSE_END_COUNT
      Number of responses ended.
    • WEB_SOCKET_START_COUNT

      public static final AtomicLong WEB_SOCKET_START_COUNT
      Number of websockets started.
    • WEB_SOCKET_END_COUNT

      public static final AtomicLong WEB_SOCKET_END_COUNT
      Number of websockets ended.
    • WEB_SOCKET_FRAMES_OUT

      public static final AtomicLong WEB_SOCKET_FRAMES_OUT
      WebSocket frames sent.
    • WEB_SOCKET_FRAMES_IN

      public static final AtomicLong WEB_SOCKET_FRAMES_IN
      WebSocket frames received.
    • INGRESS

      public static final AtomicLong INGRESS
      Ingress bytes.
    • EGRESS

      public static final AtomicLong EGRESS
      Egress bytes.
    • RESOURCE_CACHE_SIZE

      public static final AtomicLong RESOURCE_CACHE_SIZE
      Resource cache size.
    • RESOURCE_CACHE_HITS

      public static final AtomicLong RESOURCE_CACHE_HITS
      Resource cache hits.
    • RESOURCE_CACHE_MISSES

      public static final AtomicLong RESOURCE_CACHE_MISSES
      Resource cache misses.
  • Method Details

    • logResponseCode

      public static void logResponseCode(Integer code)
      Logs a response code for statistical purposes.
      Parameters:
      code - The response code to log.
    • getResponseCodes

      public static Map<Integer,Long> getResponseCodes()
      Returns a map of response codes and counts for statisitcal purposes.
      Returns:
      response codes and counts in a map.