public abstract class Statistics extends Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
abstract long |
cycles()
Read the cycle counter
|
abstract long |
millisToNanos(double t)
Converts milliseconds to nanoseconds
|
abstract double |
nanosToMillis(long c)
Converts nanoseconds to milliseconds
|
abstract double |
nanosToSecs(long c)
Converts nanoseconds to seconds
|
abstract long |
nanoTime()
Read cycle counter.
|
abstract void |
perfEventInit(String events)
Initializes performance events.
|
abstract void |
perfEventRead(int counter,
long[] values)
Reads a performance event value.
|
abstract long |
secsToNanos(double t)
Convert seconds to nanoseconds
|
public Statistics()
public abstract long nanoTime()
System.nanoTime()
.public abstract double nanosToMillis(long c)
c
- time in nanosecondspublic abstract double nanosToSecs(long c)
c
- time in nanosecondspublic abstract long millisToNanos(double t)
t
- time in millisecondspublic abstract long secsToNanos(double t)
t
- time in secondspublic abstract long cycles()
public abstract void perfEventInit(String events)
events
- the events to initialize. This is a comma-separated
list of event names.public abstract void perfEventRead(int counter, long[] values)
counter
- the event's idvalues
- a buffer that will hold the return values of the
read (3 64-bit values).