|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object spec.harness.analyzer.AnalyzerBase spec.harness.analyzer.CallbackAnalyzerExample
public class CallbackAnalyzerExample
This Analyzer is an example of an Analyzer that is based on a callback mechanism available in the SPECjvm2008 analyzer functionality. The harness will call the method execute at a regular time interval, but it will not do anything in this case, just run the empty version of it. Instead the Analyzer is listening on call backs from some other system and adds the info to the iteration result. This Analyzer type is good to use when you want to log events, for example listening to the garbage collector or code generator. In this example data will be gathered from a simulated outer source which started as a thread in this class. So it is a contrived example. It will also report results as summaries of the events gathered throughout the iteration. This is available in the result raw file afterwards.
Nested Class Summary | |
---|---|
static class |
CallbackAnalyzerExample.NumberInfo
|
static class |
CallbackAnalyzerExample.NumberResult
|
static class |
CallbackAnalyzerExample.TheNumberGenerator
This is a number generator which will calculate somewhat random numbers. |
Constructor Summary | |
---|---|
CallbackAnalyzerExample()
|
Method Summary | |
---|---|
void |
callbackMethod(int value)
|
void |
endMeasurementInterval()
This method is called at the end of the measurement interval. |
void |
execute(long time)
Execution method called at regular intervals for polling stats. |
void |
setup()
Setup method called when analyzer is created. |
void |
startMeasurementInterval()
This method is called at the start of the measurement interval. |
void |
tearDown()
Tear down method called when analyzer is brought down. |
Methods inherited from class spec.harness.analyzer.AnalyzerBase |
---|
addError, addErrorToSuiteResult, addViolationToSuiteResult, getBenchmarkDuration, getBenchmarkName, getNoOps, isTimedRun, report, report, setIterationResult, setupAnalyzerClass, tearDownAnalyzerClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CallbackAnalyzerExample()
Method Detail |
---|
public void execute(long time)
AnalyzerBase
execute
in class AnalyzerBase
time
- when the call is madepublic void setup()
AnalyzerBase
setup
in class AnalyzerBase
public void startMeasurementInterval()
AnalyzerBase
startMeasurementInterval
in class AnalyzerBase
public void endMeasurementInterval()
AnalyzerBase
endMeasurementInterval
in class AnalyzerBase
public void tearDown()
AnalyzerBase
tearDown
in class AnalyzerBase
public void callbackMethod(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |