|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.chart.demo.Performance2
A basic performance test for a couple of common operations.
Constructor Summary | |
Performance2()
Default constructor. |
Method Summary | |
java.lang.Number |
getObject()
Returns the object - caller has to use doubleValue() method. |
double |
getObjectAsPrimitive()
Returns a double value generated from the Object - should be similar to previous method, but is not! |
void |
getObjectAsPrimitiveLoop(int count)
Cycles through accessing the object as a primitive. |
void |
getObjectLoop(int count)
Cycles through accessing the object. |
double |
getPrimitive()
Just use double value - should be fast. |
java.lang.Number |
getPrimitiveAsObject()
Creates a Number object every time the primitive is accessed - should be really slow. |
void |
getPrimitiveAsObjectLoop(int count)
Cycles through accessing the primitive as an object. |
void |
getPrimitiveLoop(int count)
Cycles through accessing the primitive. |
static void |
main(java.lang.String[] args)
The starting point for the performance test. |
void |
status(java.lang.String label,
java.util.Date start,
java.util.Date end)
Outputs the current status to the console. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Performance2()
Method Detail |
public double getPrimitive()
public java.lang.Number getPrimitiveAsObject()
public java.lang.Number getObject()
public double getObjectAsPrimitive()
public void getPrimitiveLoop(int count)
count
- the number of times to access.public void getPrimitiveAsObjectLoop(int count)
count
- the number of times to access.public void getObjectAsPrimitiveLoop(int count)
count
- the number of times to access.public void getObjectLoop(int count)
count
- the number of times to access.public void status(java.lang.String label, java.util.Date start, java.util.Date end)
label
- the label.start
- the start time.end
- the end time.public static void main(java.lang.String[] args)
args
- ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |