|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.profile.util.PowerOfTwoHistogram
public class PowerOfTwoHistogram
A histogram that bins values according to powers of 2.
| Constructor Summary | |
|---|---|
PowerOfTwoHistogram()
Creates a new power-of-2 frequency histogram. |
|
| Method Summary | |
|---|---|
void |
bin(long value)
Updates the state of the histogram by finding the appropriate bin for the provided value and then incrementing the number of samples seen for that bin. |
void |
clear()
Clears the internal state of the histogram, removing all collected samples. |
int |
size()
Returns the number of samples represented by this histogram. |
String |
toString()
Generates a text representation of this power-of-2 frequency histogram. |
String |
toString(String binLabel)
Generates a text representation of this power-of-2 frequency histogram similar to toString() but with labels on
bins. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PowerOfTwoHistogram()
| Method Detail |
|---|
public void bin(long value)
bin in interface Histogramvalue - the value to be aggregatedpublic void clear()
clear in interface Histogrampublic int size()
size in interface Histogrampublic String toString()
8 |*** 16 | 32 |* 64 |*****Bins that have at least one sample will have a bar displayed. All leading and trailing empty bins are truncated. The final line will have a newline at the end.
toString in interface HistogramtoString in class Objectpublic String toString(String binLabel)
toString() but with labels on
bins. For example, a bin would appear as:
16ms |***
toString in interface HistogrambinLabel - the label to append to each of the bins
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||