Class AnalysisScriptingModule
java.lang.Object
org.eclipse.tracecompass.incubator.scripting.core.analysis.AnalysisScriptingModule
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:
- A scripted time graph data provider with script-defined entries and arrows (javascript)
- A basic analysis building an state system and showing its data in a time graph (javascript)
- Same basic analysis as before, building a state system and showing its data in a time graph, in python
- Author:
- Geneviève Bastien
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateScriptedAnalysis
(@Nullable ITmfTrace trace, String analysisName) Create a scripted analysis with the given name for a trace.@Nullable IAnalysisModule
getTraceAnalysis
(ITmfTrace trace, String analysisName) A wrapper method to get a specified analysis of a trace.
-
Constructor Details
-
AnalysisScriptingModule
public AnalysisScriptingModule()
-
-
Method Details
-
getTraceAnalysis
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.
- Parameters:
trace
- The trace being analyzed.analysisName
- The analysis module name or ID to get.- Returns:
- The module
-
createScriptedAnalysis
Create a scripted analysis with the given name for a trace. If the trace isnull
, it will throw aNullPointerException
.- Parameters:
trace
- The trace being analyzed.analysisName
- The name of the analysis to create. If backends like state systems are saved by this analysis, this name will be used to retrieve the previous data.- Returns:
- The new analysis for this trace.
-