Package limn.scene
Class FrameMetrics.Metric
java.lang.Object
limn.scene.FrameMetrics.Metric
- Enclosing class:
FrameMetrics
A fixed-capacity ring of recent samples (oldest evicted first) exposing
the latest value, the windowed average/max, and a copy of the history for
a sparkline.
-
Method Summary
-
Method Details
-
count
public int count()- Returns:
- how many samples are currently held (up to the capacity)
-
last
public float last()- Returns:
- the most recent sample, or 0 when empty
-
average
public float average()- Returns:
- the mean over the held samples, or 0 when empty
-
max
public float max()- Returns:
- the maximum held sample, or 0 when empty
-
copyInto
public int copyInto(float[] dst) Copies the held history, oldest→newest, intodst(up to its length; the newest samples win ifdstis shorter).- Returns:
- the number of samples written
-