|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsuramadu.tests.latency.JNIOverhead
The JNIOverhead class measures the overhead involved in making a simple JNI call.
PURPOSE: This test is particularly pertinent in calculating the error of high-resolution time measurement. Since it takes time to measure time, the results of this test can be used to correct for this overhead.
DESIGN: The JNI native method to retrieve CPU machine cycles is called repeatedly, and the value logged in an array. The differences between the first and all subsequent, consecutive calls is calculated, and statistical calculations made from these values. Since each difference represents the time it takes to return from the JNI call and then call it again, the total value can be considered the entire JNI call overhead even though it was measured in the reverse order as is considered normal.
ASSUMPTIONS: No attempt is made in this test to measure specific JNI callback or data copying methodologies.
INPUTS:
Property | Default Value | Description |
---|---|---|
"iterations" | "1000" |
OUTPUTS: The output contains the maximum, minimum, median, mean, standard deviation and mode statistical measurements on the collected data.
EXAMPLES: None.
ORIGINS: This test was conceived and written by JPL and the Golden Gate Team.
Nested Class Summary | |
static class |
JNIOverhead.TestProps
|
Field Summary | |
static int |
DEFAULT_ITERATIONS
Default number of iterations |
static MemoryType |
mt
the memory areay in which to run |
static JNIOverhead.TestProps |
testProps
actual properties used by this test run. |
static ThreadType |
tt
the thread type to run in |
Constructor Summary | |
JNIOverhead()
constructor for test class Instantiates testProperties. |
|
JNIOverhead(JNIOverhead.TestProps props)
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
void |
run()
The run() method does the setup and launcing of the actual test code |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_ITERATIONS
public static MemoryType mt
public static ThreadType tt
public static JNIOverhead.TestProps testProps
Constructor Detail |
public JNIOverhead() throws java.lang.Exception
java.lang.Throwable
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.Exception
public JNIOverhead(JNIOverhead.TestProps props) throws java.lang.Exception
Method Detail |
public static void main(java.lang.String[] args)
args
- the command line argumentspublic void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |