Class TraceMarkerScriptingModule
java.lang.Object
org.eclipse.tracecompass.incubator.scripting.ui.tracemarker.TraceMarkerScriptingModule
Trace marker module that adds trace marking capabilities to Trace Compass
scripting.
With this module, a script can iterate through all the events of a trace and
call the
addTraceMarker(ITmfTrace, long, long, String, String, String)
method
to apply highlighting markers on specific events that are visible on all
views of Trace Compass.
The markers are completely configurable through the use of optional parameters, each of which has a default value if left untouched.
- Author:
- Maxime Thibault, Ibrahima Sega Sangare
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTraceMarker
(ITmfTrace trace, long startTime, long endTime, @Nullable String label, @Nullable String category, @Nullable String color) Adds a trace marker to the time graph view.
-
Constructor Details
-
TraceMarkerScriptingModule
public TraceMarkerScriptingModule()
-
-
Method Details
-
addTraceMarker
public void addTraceMarker(ITmfTrace trace, long startTime, @ScriptParameter(defaultValue="-1") long endTime, @ScriptParameter(defaultValue="TraceMarker") @Nullable String label, @ScriptParameter(defaultValue="Generals markers") @Nullable String category, @ScriptParameter(defaultValue="Red") @Nullable String color) throws NullPointerException, IllegalArgumentException Adds a trace marker to the time graph view. Except the startTime, all the other parameters are optional and it's up to the user to decide which ones he wants to override. In case a parameter is left untouched, a default value will be assigned.- Parameters:
trace
- the trace to which the marker is addedstartTime
- the starting time stamp of the marker in ns (required)endTime
- the ending time stamp of the marker in ns (optional - default : startTime)label
- the marker's label to show (it's name) (optional - default : TraceMarker)category
- the marker's group category (can be anything and is used to group markers together in sets that can be enabled/disabled) (optional - default : General markers)color
- the marker's highlighting color in X11 format (ex: "Red", "Green", "Cyan", "Gold", more at https://en.wikipedia.org/wiki/X11_color_names) (optional - default : Red)- Throws:
NullPointerException
- Exception thrown if the trace is null. Script developers can choose to catch this exception or let the script fail. This is present mostly for testing purposes.IllegalArgumentException
- Exception thrown if the parameters for the start time or end time are incorrect. Script developers can choose to catch this exception or let the script fail.
-