public final class AsyncProfiler extends Object implements ExternalProfiler, InternalProfiler
Modifier and Type | Class and Description |
---|---|
static class |
AsyncProfiler.CStackMode |
static class |
AsyncProfiler.Direction |
static class |
AsyncProfiler.JavaApi |
static class |
AsyncProfiler.OutputType |
Constructor and Description |
---|
AsyncProfiler(String initLine) |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
addJVMInvokeOptions(BenchmarkParams params)
Prepend JVM invocation with these commands.
|
Collection<String> |
addJVMOptions(BenchmarkParams params)
Add JVM these options to the run.
|
Collection<? extends Result> |
afterIteration(BenchmarkParams benchmarkParams,
IterationParams iterationParams,
IterationResult iterationResult)
Run this code after a benchmark iteration finished
|
Collection<? extends Result> |
afterTrial(BenchmarkResult br,
long pid,
File stdOut,
File stdErr)
Run this code after the trial is done.
|
boolean |
allowPrintErr()
If target VM communicates with profiler with standard error, this method
can be used to shun the output to console.
|
boolean |
allowPrintOut()
If target VM communicates with profiler with standard output, this method
can be used to shun the output to console.
|
void |
beforeIteration(BenchmarkParams benchmarkParams,
IterationParams iterationParams)
Run this code before starting the next benchmark iteration.
|
void |
beforeTrial(BenchmarkParams benchmarkParams)
Run this code before starting the trial.
|
String |
getDescription()
Human-readable one-line description of the profiler.
|
public AsyncProfiler(String initLine) throws ProfilerException
ProfilerException
public void beforeIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams)
InternalProfiler
beforeIteration
in interface InternalProfiler
benchmarkParams
- benchmark parameters used for current launchiterationParams
- iteration parameters used for current launchpublic Collection<? extends Result> afterIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams, IterationResult iterationResult)
InternalProfiler
afterIteration
in interface InternalProfiler
benchmarkParams
- benchmark parameters used for current launchiterationParams
- iteration parameters used for current launchiterationResult
- iteration resultpublic Collection<String> addJVMInvokeOptions(BenchmarkParams params)
ExternalProfiler
addJVMInvokeOptions
in interface ExternalProfiler
params
- benchmark parameters used for current launchpublic Collection<String> addJVMOptions(BenchmarkParams params)
ExternalProfiler
addJVMOptions
in interface ExternalProfiler
params
- benchmark parameters used for current launchpublic void beforeTrial(BenchmarkParams benchmarkParams)
ExternalProfiler
beforeTrial
in interface ExternalProfiler
benchmarkParams
- benchmark parameters used for current launchpublic Collection<? extends Result> afterTrial(BenchmarkResult br, long pid, File stdOut, File stdErr)
ExternalProfiler
afterTrial
in interface ExternalProfiler
br
- benchmark result that was the result of the trialpid
- pid that the forked JVM hadstdOut
- file containing the standard output from the benchmark JVMstdErr
- file containing the standard error from the benchmark JVMpublic boolean allowPrintOut()
ExternalProfiler
allowPrintOut
in interface ExternalProfiler
public boolean allowPrintErr()
ExternalProfiler
allowPrintErr
in interface ExternalProfiler
public String getDescription()
Profiler
getDescription
in interface Profiler
Copyright © 2012–2020 Oracle. All rights reserved.