Package com.deltaxml.core
Class PipelineProgressTextReporter
java.lang.Object
com.deltaxml.core.PipelineProgressTextReporter
- All Implemented Interfaces:
PipelineProgressListener
Reports pipeline progress to System.err using textual messages. Each line of the 'progress report' indicates the completion of
a pipeline stage (start events are not reported). The report can include timing information and information to identify
filters and other pipeline stages. One of the constructors supports these controls. The report can also be set to include the
other 'incidental' messages, which are: the initial filter size message; the start filter step messages; the subchain entry and
exit messages; and the skipped disabled step or subchain messages.
- Since:
- 6.0
- Author:
- Nigel Whitaker
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a progress reporter that reports times and filter names.PipelineProgressTextReporter(boolean reportTimes) Constructs a configurable progress reporter.PipelineProgressTextReporter(boolean reportTimes, boolean reportComparisonHeartbeat) Constructs a configurable progress reporter. -
Method Summary
Modifier and TypeMethodDescriptionvoidreportCompareFinish(long elapsedTime, long threadCPUTime) Reports when the comparison has completed.voidReports that progress has been made in the current comparison.voidReports when the comparison has started.voidreportFilterFinish(PipelineLocationEntry ple, long elapsedTimeNS, long threadCPUTimeNS) Reports when a pipeline filter finishes.voidreportFilterOrSubchainSkipped(PipelineLocationEntry ple, int numberOfStepsSkipped) Reports when a pipeline filter or subchain is skipped.voidReports when a pipeline filter starts.voidreportLoadFinish(PipelineLocationEntry ple, long elapsedTime, long threadCPUTime) Reports when pipeline has been loaded.voidReports when pipeline starts to load.voidreportNumberOfStages(int enabledStages) Report the number of enabled stages.voidreportSaveFinish(long elapsedTime, long threadCPUTime) Reports when the output has been completed.voidReports when the output is starting to be written.voidReports when a subchain within the pipeline is entered.voidreportSubchainExit(PipelineLocationEntry ple, long elapsedTime, long threadCPUTime) Reports when a subchain within the pipeline is exited.voidsetReportIncidentals(boolean reportTimes) Set report incidentals.voidsetReportTimes(boolean reportTimes) Controls whether timing information is reported.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.deltaxml.core.PipelineProgressListener
reportCompareFinish, reportCompareHeartbeat, reportCompareStart, reportFilterFinish, reportFilterOrSubchainSkipped, reportFilterStart, reportLoadFinish, reportLoadStart, reportNumberOfStages, reportSaveFinish, reportSaveStart, reportSubchainEnter, reportSubchainExit
-
Constructor Details
-
PipelineProgressTextReporter
public PipelineProgressTextReporter()Constructs a progress reporter that reports times and filter names. -
PipelineProgressTextReporter
public PipelineProgressTextReporter(boolean reportTimes) Constructs a configurable progress reporter.- Parameters:
reportTimes- when true timing information is reported where available
-
PipelineProgressTextReporter
public PipelineProgressTextReporter(boolean reportTimes, boolean reportComparisonHeartbeat) Constructs a configurable progress reporter.- Parameters:
reportTimes- when true timing information is reported where availablereportComparisonHeartbeat- when true a comparison 'heartbeat' is output at approximately one second intervals
-
-
Method Details
-
setReportTimes
public void setReportTimes(boolean reportTimes) Controls whether timing information is reported.- Parameters:
reportTimes- when true timing information is reported where available
-
setReportIncidentals
public void setReportIncidentals(boolean reportTimes) Set report incidentals. Here, the incidental messages are: the initial filter size message; the start filter step messages; the subchain entry and exit messages; and the skipped disabled step or subchain messages.- Parameters:
reportTimes- when true timing information is reported where available
-
reportNumberOfStages
public void reportNumberOfStages(int enabledStages) Report the number of enabled stages. Each enabled stage has two associated progress report messages that marks when a stage has beenStarted andFinished. Note that all other progress report messages, such as those marking when a subchain has beenEntered andExited or those marking when a disabled stage or chain has beenSkipped, are not part of the enabled stage count.- Specified by:
reportNumberOfStagesin interfacePipelineProgressListener- Parameters:
enabledStages- The number of enabled stages.
-
reportCompareFinish
public void reportCompareFinish(long elapsedTime, long threadCPUTime) Reports when the comparison has completed.- Specified by:
reportCompareFinishin interfacePipelineProgressListener- Parameters:
elapsedTime- The elapsed time taken to perform the comparison (in nanoseconds).threadCPUTime- The CPU time taken to perform the comparison (in nanoseconds).
-
reportCompareHeartbeat
public void reportCompareHeartbeat()Reports that progress has been made in the current comparison. This will be called at most once a second.Notes:
- Not receiving this event should not be interpreted as the comparison stopping or being broken, but usually a sign that the comparison is busy processing.
- This runs on the same thread as the comparison, so the code you add here will increase the comparison time.
- Specified by:
reportCompareHeartbeatin interfacePipelineProgressListener
-
reportCompareStart
public void reportCompareStart()Reports when the comparison has started.- Specified by:
reportCompareStartin interfacePipelineProgressListener
-
reportFilterFinish
Reports when a pipeline filter finishes.- Specified by:
reportFilterFinishin interfacePipelineProgressListener- Parameters:
ple- The filter's location within the pipeline.elapsedTimeNS- The elapsed time taken to execute the filter (in nanoseconds).threadCPUTimeNS- The CPU time taken to execute this filter (in nanoseconds).
-
reportFilterStart
Reports when a pipeline filter starts.- Specified by:
reportFilterStartin interfacePipelineProgressListener- Parameters:
ple- The filter's location within the pipeline.
-
reportFilterOrSubchainSkipped
Reports when a pipeline filter or subchain is skipped. Filters and subchains are skipped when they are disabled.- Specified by:
reportFilterOrSubchainSkippedin interfacePipelineProgressListener- Parameters:
ple- The filter or subchain's location within the pipeline.numberOfStepsSkipped- The number of filter stages skipped.
-
reportLoadFinish
Reports when pipeline has been loaded.- Specified by:
reportLoadFinishin interfacePipelineProgressListener- Parameters:
ple- The name of the pipeline; typically "input-a", "input-b", or "result".elapsedTime- The elapsed time taken to load a pipeline (in nanoseconds).threadCPUTime- The CPU time taken to load a pipeline (in nanoseconds).
-
reportLoadStart
Reports when pipeline starts to load.- Specified by:
reportLoadStartin interfacePipelineProgressListener- Parameters:
ple- The name of the pipeline; typically "input-a", "input-b", or "result".
-
reportSaveFinish
public void reportSaveFinish(long elapsedTime, long threadCPUTime) Reports when the output has been completed.- Specified by:
reportSaveFinishin interfacePipelineProgressListener- Parameters:
elapsedTime- The elapsed time taken to write the output (in nanoseconds).threadCPUTime- The CPU time taken to write the output (in nanoseconds).
-
reportSaveStart
public void reportSaveStart()Reports when the output is starting to be written.- Specified by:
reportSaveStartin interfacePipelineProgressListener
-
reportSubchainEnter
Description copied from interface:PipelineProgressListenerReports when a subchain within the pipeline is entered.- Specified by:
reportSubchainEnterin interfacePipelineProgressListener- Parameters:
ple- The subchain's location within the pipeline.
-
reportSubchainExit
Description copied from interface:PipelineProgressListenerReports when a subchain within the pipeline is exited.- Specified by:
reportSubchainExitin interfacePipelineProgressListener- Parameters:
ple- The subchain's location within the pipeline.elapsedTime- The elapsed time taken to execute the subchain (in nanoseconds).threadCPUTime- The CPU time taken to execute this subchain (in nanoseconds).
-