Package org.apache.uima.util
Class AnalysisEnginePerformanceReports
- java.lang.Object
-
- org.apache.uima.util.AnalysisEnginePerformanceReports
-
public class AnalysisEnginePerformanceReports extends java.lang.Object
A class that is useful for generating an Analysis Engine performance report from aProcessTrace
object.
-
-
Field Summary
Fields Modifier and Type Field Description private int
mAnalysisTime
private java.util.Map<java.lang.String,java.lang.Integer>
mAnnotatorAnalysisTimes
private int
mFrameworkOverhead
private ProcessTrace
mProcessTrace
private int
mServiceCallOverhead
private int
mServiceWrapperOverhead
private int
mTotalTime
private java.text.NumberFormat
pctFormat
-
Constructor Summary
Constructors Constructor Description AnalysisEnginePerformanceReports(ProcessTrace aProcessTrace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEventData(ProcessTraceEvent aEvent)
int
getAnalysisTime()
int
getFrameworkOverhead()
java.lang.String
getFullReport()
int
getServiceCallOverhead()
int
getServiceWrapperOverhead()
private int
getSubEventDuration(ProcessTraceEvent aEvent, java.lang.String[] aEventTypes)
Gets the combined duration of all sub-events of certain types.int
getTotalTime()
private java.lang.String
toPct(long numerator, long denomenator)
Convert to percent string - to two decimal placesjava.lang.String
toString()
-
-
-
Field Detail
-
mProcessTrace
private ProcessTrace mProcessTrace
-
mAnnotatorAnalysisTimes
private java.util.Map<java.lang.String,java.lang.Integer> mAnnotatorAnalysisTimes
-
mAnalysisTime
private int mAnalysisTime
-
mFrameworkOverhead
private int mFrameworkOverhead
-
mServiceWrapperOverhead
private int mServiceWrapperOverhead
-
mServiceCallOverhead
private int mServiceCallOverhead
-
mTotalTime
private int mTotalTime
-
pctFormat
private java.text.NumberFormat pctFormat
-
-
Constructor Detail
-
AnalysisEnginePerformanceReports
public AnalysisEnginePerformanceReports(ProcessTrace aProcessTrace)
-
-
Method Detail
-
addEventData
protected void addEventData(ProcessTraceEvent aEvent)
-
getTotalTime
public int getTotalTime()
-
getAnalysisTime
public int getAnalysisTime()
-
getFrameworkOverhead
public int getFrameworkOverhead()
-
getServiceWrapperOverhead
public int getServiceWrapperOverhead()
-
getServiceCallOverhead
public int getServiceCallOverhead()
-
getFullReport
public java.lang.String getFullReport()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toPct
private java.lang.String toPct(long numerator, long denomenator)
Convert to percent string - to two decimal places
-
getSubEventDuration
private int getSubEventDuration(ProcessTraceEvent aEvent, java.lang.String[] aEventTypes)
Gets the combined duration of all sub-events of certain types. Will recurse into events that don't have the correct type but will not recurse inside a matching event (to avoid double-counting of any times).- Parameters:
aEvent
- event whose subevents will be examinedaEventTypes
- array of event types in which we are interested- Returns:
- sum of the durations of sub-events of
aEvent
whose type is a member ofaEventTypes
.
-
-