Package org.apache.ofbiz.webapp.stats
Class ServerHitBin
java.lang.Object
org.apache.ofbiz.webapp.stats.ServerHitBin
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
countEntity
(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) static void
countEvent
(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) static void
countRequest
(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) static void
countService
(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) static void
countView
(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) double
double
long
returns endTime - startTimedouble
returns (endTime - startTime)/60000long
Returns the end time if the length of the bin is limited, otherwise returns the current system timeReturns the end time if the length of the bin is limited, otherwise returns the current system timedouble
return the hits per minute using the entire length of the bin as returned by getBinLengthMinutes()getId()
long
double
long
double
long
long
returns the startTime of the binreturns the startTime of the binlong
int
getType()
-
Field Details
-
REQUEST
public static final int REQUEST- See Also:
-
EVENT
public static final int EVENT- See Also:
-
VIEW
public static final int VIEW- See Also:
-
ENTITY
public static final int ENTITY- See Also:
-
SERVICE
public static final int SERVICE- See Also:
-
-
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
-
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
returns the startTime of the bin -
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()
-