|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.util.profiling.TimedMeasurements
The TimedMeasurements
class implements a simple array-like data structure that collects
a large list of integers and supports iterating over that list. For memory-efficient storage, it
uses a set of arrays where each array represents a fragment of the measurements obtained.
Nested Class Summary | |
class |
TimedMeasurements.Iterator
|
static class |
TimedMeasurements.Measurement
|
Constructor Summary | |
TimedMeasurements()
The default constructor for the Measurements class creates a new instance where the
fragment size is 500. |
|
TimedMeasurements(int fragsize)
This constructor for the Measurements class creates a new instance with the specified
fragment size. |
Method Summary | |
void |
add(long time,
int nm)
The add() method adds a new measurement to this set. |
void |
addAll(TimedMeasurements m)
The addAll() method adds all of the measurements from another measurement structure
to the end of this measurement structure. |
long |
getLastTime()
The getLastTime() method returns the time when the last measurement was recorded. |
TimedMeasurements.Iterator |
iterator(long startTime)
The iterator() method returns an interator over the measurements, starting with the
specified measurement. |
int |
max()
|
int |
min()
|
int |
size()
The size() method returns the number of entries in this measurement data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TimedMeasurements()
Measurements
class creates a new instance where the
fragment size is 500.
public TimedMeasurements(int fragsize)
Measurements
class creates a new instance with the specified
fragment size.
fragsize
- the fragment size to use for internal representationMethod Detail |
public void add(long time, int nm)
add()
method adds a new measurement to this set.
time
- the time of the measurementnm
- the new measurement to addpublic TimedMeasurements.Iterator iterator(long startTime)
iterator()
method returns an interator over the measurements, starting with the
specified measurement.
startTime
- the time to start
public int size()
size()
method returns the number of entries in this measurement data.
public void addAll(TimedMeasurements m)
addAll()
method adds all of the measurements from another measurement structure
to the end of this measurement structure.
m
- the measurements to add to the end of this listpublic long getLastTime()
getLastTime()
method returns the time when the last measurement was recorded.
public int min()
public int max()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |