public class PerformanceTracker
extends java.lang.Object
Constructor and Description |
---|
PerformanceTracker() |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics g,
float x,
float y)
Draws the current values to screen
|
void |
draw(Graphics g,
float x,
float y,
float targetWidth,
int horizontalAlign)
Draws the current values to screen
|
void |
drawInBottomLeft(Graphics g)
Draws the current values to the bottom left of the screen
|
void |
drawInBottomRight(Graphics g)
Draws the current values to the bottom right of the screen
|
void |
drawInTopLeft(Graphics g)
Draws the current values to the top left of the screen
|
void |
drawInTopRight(Graphics g)
Draws the current values to the top right of the screen
|
long |
getAvailableMemory()
Returns the available memory inside the JVM
|
double |
getAverageUpdateDuration()
Returns the average duration of update()
|
int |
getFramesPerSecond()
Returns the number of frames per second
|
long |
getTotalMemory()
Returns the total memory allocated to the JVM
|
int |
getUpdatesPerSecond()
Returns the number of updates per second
|
long |
getUsedMemory()
Returns the remaining memory inside the JVM
|
void |
markFrame()
Internal usage only: marks a new frame
|
void |
markUpdateBegin()
Internal usage only: marks the beginning of update operations
|
void |
markUpdateEnd()
Internal usage only: marks the end of update operations
|
public void markUpdateBegin()
public void markUpdateEnd()
public void markFrame()
public int getUpdatesPerSecond()
public int getFramesPerSecond()
public double getAverageUpdateDuration()
public long getTotalMemory()
public long getUsedMemory()
public long getAvailableMemory()
public void draw(Graphics g, float x, float y)
g
- The Graphics
contextx
- The x coordinate to render aty
- The y coordinate to render atpublic void draw(Graphics g, float x, float y, float targetWidth, int horizontalAlign)
g
- The Graphics
contextx
- The x coordinate to render aty
- The y coordinate to render attargetWidth
- The target width to render at, or, -1 to use auto-widthhorizontalAlign
- The text alignment. Note: Use Align
to retrieve the
appropriate value. If target width is set to -1 this option is
ignored and the text is left alignedpublic void drawInTopLeft(Graphics g)
g
- The Graphics
contextpublic void drawInTopRight(Graphics g)
g
- The Graphics
contextpublic void drawInBottomLeft(Graphics g)
g
- The Graphics
context