Class AnalysisScriptingModule

java.lang.Object
org.eclipse.tracecompass.incubator.scripting.core.analysis.AnalysisScriptingModule

public class AnalysisScriptingModule extends Object
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:

Author:
Geneviève Bastien
  • Constructor Details

    • AnalysisScriptingModule

      public AnalysisScriptingModule()
  • Method Details

    • getTraceAnalysis

      public @Nullable 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.

      Parameters:
      trace - The trace being analyzed.
      analysisName - The analysis module name or ID to get.
      Returns:
      The module
    • createScriptedAnalysis

      public ScriptedAnalysis createScriptedAnalysis(@Nullable 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.
      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.