public final class Statistics extends Statistics
| Modifier and Type | Field and Description |
|---|---|
private PerfEvent[] |
perfEvents |
| Constructor and Description |
|---|
Statistics() |
| Modifier and Type | Method and Description |
|---|---|
long |
cycles()
Read a cycle counter (high resolution, non-monotonic clock).
|
long |
millisToNanos(double t)
Converts milliseconds to nanoseconds
|
double |
nanosToMillis(long c)
Converts nanoseconds to milliseconds
|
double |
nanosToSecs(long c)
Converts nanoseconds to seconds
|
long |
nanoTime()
Read nanoTime (high resolution, monotonically increasing clock).
|
void |
perfEventInit(String events)
Initializes performance events.
|
void |
perfEventRead(int id,
long[] values)
Reads a performance event value.
|
long |
secsToNanos(double t)
Convert seconds to nanoseconds
|
private PerfEvent[] perfEvents
public Statistics()
public long nanoTime()
nanoTime in class Statisticspublic long cycles()
cycles in class Statisticspublic double nanosToMillis(long c)
StatisticsnanosToMillis in class Statisticsc - time in nanosecondspublic double nanosToSecs(long c)
StatisticsnanosToSecs in class Statisticsc - time in nanosecondspublic long millisToNanos(double t)
StatisticsmillisToNanos in class Statisticst - time in millisecondspublic long secsToNanos(double t)
StatisticssecsToNanos in class Statisticst - time in secondspublic void perfEventInit(String events)
StatisticsperfEventInit in class Statisticsevents - the events to initialize. This is a comma-separated
list of event names.public void perfEventRead(int id, long[] values)
StatisticsperfEventRead in class Statisticsid - the event's idvalues - a buffer that will hold the return values of the
read (3 64-bit values).