Class ServerHitBin

java.lang.Object
org.apache.ofbiz.webapp.stats.ServerHitBin

public final class ServerHitBin extends Object

Counts server hits and tracks statistics for request, events and views

Handles total stats since the server started and binned stats according to settings in the serverstats.properties file.

  • Field Details

  • Method Details

    • countRequest

      public static void countRequest(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin)
    • countEvent

      public static void countEvent(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin)
    • countView

      public static void countView(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin)
    • countEntity

      public static void countEntity(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin)
    • countService

      public static void countService(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin)
    • getDelegator

      public Delegator getDelegator()
    • getId

      public String getId()
    • getType

      public int getType()
    • getStartTime

      public long getStartTime()
      returns the startTime of the bin
    • getEndTime

      public long getEndTime()
      Returns the end time if the length of the bin is limited, otherwise returns the current system time
    • getStartTimeString

      public String getStartTimeString()
      returns the startTime of the bin
    • getEndTimeString

      public String getEndTimeString()
      Returns the end time if the length of the bin is limited, otherwise returns the current system time
    • getBinLength

      public long getBinLength()
      returns endTime - startTime
    • getBinLengthMinutes

      public double getBinLengthMinutes()
      returns (endTime - startTime)/60000
    • getNumberHits

      public long getNumberHits()
    • getMinTime

      public long getMinTime()
    • getMaxTime

      public long getMaxTime()
    • getTotalRunningTime

      public long getTotalRunningTime()
    • getMinTimeSeconds

      public double getMinTimeSeconds()
    • getMaxTimeSeconds

      public double getMaxTimeSeconds()
    • getAvgTime

      public double getAvgTime()
    • getAvgTimeSeconds

      public double getAvgTimeSeconds()
    • getHitsPerMinute

      public double getHitsPerMinute()
      return the hits per minute using the entire length of the bin as returned by getBinLengthMinutes()