Provide an API to create an analysis. Using an analysis links the outputs of the analysis with the trace. For example, the backends (state systems, segment store) filled by the script will be available under the trace.
Typical use of this module is for scripts who wish to parse the events of a trace or experiment and save data in a backend to be displayed later.
Example scripts with data providers can be found here:
Method | Description |
---|---|
createScriptedAnalysis() | Create a scripted analysis with the given name for a trace. |
getAnalysis() | Deprecated: Create an analysis with the given name. |
getFieldValue() | Deprecated: A wrapper method to get the value of an event field. |
getTraceAnalysis() | A wrapper method to get a specified analysis of a trace. |
org.eclipse.tracecompass.incubator.scripting.core.analysis.ScriptedAnalysis createScriptedAnalysis(ITmfTrace trace, String analysisName)
Create a scripted analysis with the given name for a trace. If the trace
is null
, it will throw a NullPointerException.
The module
org.eclipse.tracecompass.incubator.scripting.core.analysis.ScriptedAnalysis getAnalysis(String name)
Create an analysis with the given name. It will be associated with the
currently active trace. If there is no active trace, it will return
null
.
Deprecated: Use .createScriptedAnalysis(ITmfTrace, String) instead
The new analysis, for the active trace, or null
if
there is no active trace.
Object getFieldValue(ITmfEvent event, String fieldName)
A wrapper method to get the value of an event field. If the field itself does not exist, it will try to resolve an aspect from the trace the event is from.
Deprecated: This method has been moved to the {@link TraceScriptingModule#getEventFieldValue(ITmfEvent, String)} class.
The field value object, or null
if the field is not
found
IAnalysisModule getTraceAnalysis(ITmfTrace trace, String analysisName)
A wrapper method to get a specified analysis of a trace. It returns an existing analysis, whether builtin or data-driven, for the trace. These analyses cannot create state systems or anything else, but their results can be queried and visualized in a script.
The analyses can be queried by ID, or by name, ie the text that is displayed in the Trace Compass UI.
The module