Class FrameRates
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.acars.FrameRates
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,IDBean
,Cacheable
A bean to store simulator frame rate statistics.
- Since:
- 10.2
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the average frame rate.int
getMax()
Returns the maximum frame rate.int
getMin()
Returns the minimum frame rate.int
getPercentile
(int pct) Returns a frame rate percentile.int
getSize()
Returns the number of frame rate samples.void
setAverage
(double avg) Updates the average frame rate.void
setMax
(int max) Updates the maximum frame rate.void
setMin
(int min) Updates the minimum frame rate.void
setPercentile
(int pct, int frameRate) Updates a frame rate percentile.void
setSize
(int cnt) Updates the number of frame rate samples.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
-
Constructor Details
-
FrameRates
public FrameRates()
-
-
Method Details
-
getSize
public int getSize()Returns the number of frame rate samples.- Returns:
- the number of samples
-
getMax
public int getMax()Returns the maximum frame rate.- Returns:
- the maximum frames per second
-
getMin
public int getMin()Returns the minimum frame rate.- Returns:
- the minimum frames per second
-
getAverage
public double getAverage()Returns the average frame rate.- Returns:
- the average frames per second
-
getPercentile
public int getPercentile(int pct) Returns a frame rate percentile.- Parameters:
pct
- the percentile- Returns:
- the frame rate in frames per second, or zero if not found
-
setSize
public void setSize(int cnt) Updates the number of frame rate samples.- Parameters:
cnt
- the number of samples
-
setMax
public void setMax(int max) Updates the maximum frame rate.- Parameters:
max
- the maximum frames per second
-
setMin
public void setMin(int min) Updates the minimum frame rate.- Parameters:
min
- the minimum frames per second
-
setAverage
public void setAverage(double avg) Updates the average frame rate.- Parameters:
avg
- the average frames per second
-
setPercentile
public void setPercentile(int pct, int frameRate) Updates a frame rate percentile.- Parameters:
pct
- the percentileframeRate
- the frame rate in frames per second
-