|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.util.profiling.Measurements
The Measurements
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 |
Measurements.Iterator
|
Constructor Summary | |
Measurements()
The default constructor for the Measurements class creates a new instance where the
fragment size is 500. |
|
Measurements(int fragsize)
This constructor for the Measurements class creates a new instance with the specified
fragment size. |
Method Summary | |
void |
add(int nm)
The add() method adds a new measurement to this set. |
void |
addAll(Measurements m)
The addAll() method adds all of the measurements from another measurement structure
to the end of this measurement structure. |
Measurements.Iterator |
iterator(int start)
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 Measurements()
Measurements
class creates a new instance where the
fragment size is 500.
public Measurements(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(int nm)
add()
method adds a new measurement to this set.
nm
- the new measurement to addpublic Measurements.Iterator iterator(int start)
iterator()
method returns an interator over the measurements, starting with the
specified measurement.
start
- the index of the first measurement to start from
public int size()
size()
method returns the number of entries in this measurement data.
public void addAll(Measurements 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 int min()
public int max()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |