public class ResponsivenessDiagnostic extends DefaultDiagnostic
Modifier and Type | Class and Description |
---|---|
static class |
ResponsivenessDiagnostic.DescriptorImpl
Our descriptor.
|
DefaultDiagnostic.CurrentRun
actualRuns, currentFileName, LOG, LOGGER, TXT, ZIP
Constructor and Description |
---|
ResponsivenessDiagnostic()
Creates an instance
|
ResponsivenessDiagnostic(int initialDelay,
int period,
int runs)
Creates an instance
|
Modifier and Type | Method and Description |
---|---|
void |
afterExecutionFinished(DiagnosticsContainer result)
Called when all the executions have been completed or the diagnostics session has been canceled.
|
void |
beforeExecutionStart(DiagnosticsContainer result)
Called before the first execution of the first run of this diagnostic.
|
String |
getFileName()
Name used for the folder and files to be created.
|
void |
installGCListeners()
Installs listeners for each
GarbageCollectorMXBean in order to log the events |
void |
removeGCListeners()
Removes the listener to the
GarbageCollectorMXBean s |
void |
runDiagnostic(PrintWriter out,
int run)
Executes the diagnostic implemented by this
DefaultDiagnostic . |
afterRunFinished, beforeRunStart, buildResultFileName, createCurrentFile, createRootDir, getCurrentOutputStream, getCurrentPrintWriter, getCurrentRun, getDiagnosticLog, runDiagnostic
all, equals, getDescriptor, getId, getInitialDelay, getPeriod, getRuns, hashCode, setInitialDelay, setPeriod, setRuns
public ResponsivenessDiagnostic()
@DataBoundConstructor public ResponsivenessDiagnostic(int initialDelay, int period, int runs)
initialDelay
- number milliseconds to delay the first executionperiod
- period to wait between successive executions in millisecondsruns
- number of times this diagnostic should be executed on the diagnostic sessionpublic String getFileName()
DefaultDiagnostic
getFileName
in class DefaultDiagnostic
public void runDiagnostic(@Nonnull PrintWriter out, int run) throws IOException
DefaultDiagnostic
DefaultDiagnostic
. Convenient method that receives the
PrintWriter
to write to. If more flexibility is needed to generate content, override
DefaultDiagnostic.runDiagnostic(DiagnosticsContainer result, int run)
instead.runDiagnostic
in class DefaultDiagnostic
out
- OutputStream
where the diagnostic should write the resultsrun
- execution number of this callIOException
- thrown when there is a problem executing the diagnosticpublic void beforeExecutionStart(DiagnosticsContainer result) throws IOException
DefaultDiagnostic
beforeExecutionStart
in class DefaultDiagnostic
result
- the DiagnosticsContainer
to store the result toIOException
- thrown when there is a problem executing the diagnosticpublic void afterExecutionFinished(DiagnosticsContainer result) throws IOException
DefaultDiagnostic
afterExecutionFinished
in class DefaultDiagnostic
result
- the DiagnosticsContainer
to store the result toIOException
- thrown when there is a problem executing the diagnostic@IgnoreJRERequirement public void installGCListeners()
GarbageCollectorMXBean
in order to log the events@IgnoreJRERequirement public void removeGCListeners()
GarbageCollectorMXBean
sCopyright © 2016–2017. All rights reserved.