Theia trace viewer extension using the tsp-typescript-client (https://github.com/theia-ide/tsp-typescript-client) and Trace Server Protocol (https://github.com/theia-ide/trace-server-protocol).
Prerequisites for running this extension are the same as those for running the theia IDE.
We plan to distribute this extension on npm.
Availability: TBD
Here is the step in order to build the trace viewer
- Clone this theia-trace-extension repository
cd theia-trace-extension
- Now you are ready to build the application:
yarn
Note for some debian-based machines: On some distros, there are 2 yarn commands. If you get an error message saying ERROR: There are no scenarios; must have at least one., you are using the wrong yarn. See yarnpkg/yarn#2821.
This repository contains an example trace-viewer application that includes the trace extension. It has two versions:
- browser: a "browser" application, accessed with a web browser
- electron: a native desktop application
In order to open traces you need a trace server running on the same machine as the trace extension. You can download the Eclipse Trace Compass server or let yarn
download and run it:
$ yarn download:server
$ yarn start:server
You can also build the trace-server yourself using Trace Compass and the Incubator, take a look at the instructions here.
From the repo root, run either
$ yarn start:browser
And go to http://localhost:3000
.
or
$ yarn start:electron
And use the Electron application.
It's possible to package the repo's example application with electron-builder
. After running yarn
in the repo root, do:
$ cd electron-app
$ yarn package
The configured Linux packaging(s) will be generated folder electron-app/dist
This section describes how to operate the Theia trace extension to view and analyze traces. The UI, view interactions, and UX are prelimiary and subject to revisions in the future.
To open a trace in the Theia Trace Extension, use the File Explorer in Theia to navigate to the trace directory. Then right-mouse click on the trace and select menu Open With->Open Trace(s).
If the selection is a single file, then the tool will open the file directly as an experiment.
If the selection is a directory, then the tool will look for traces in Common Trace Format (CTF) format, such as Linux Tracing Toolkit traces (LTTng) Kernel and UST (Userspace) traces, and open all found CTF traces as an experiment. With this you're able to open e.g. LTTng Kernel and UST Traces at the same time.
Note that an experiment is a collection of traces that are analyzed together where each event of each trace in the experiment is analyzed in chronological order.
The example Trace Compass trace server above supports LTTng Kernel and UST traces. Example LTTng traces can be retrieved from the Trace Compass Tutorials. Just download the archive TraceCompassTutorialTraces, extract them into a local directory on your computer. They can also be automatically downloaded by running yarn download:sample-traces
from the repository's root.
To open the Trace Explorer, select menu View from the top-level menu and then select Trace Explorer in the list of views. Then the Trace Explorer icon will be added on the right side below the File Explorer Icon.
Select the Trace Explorer icon to switch to the trace explorer.
Now, you will see 3 sections: Opened experiments, Available analysis and Time Graph Tooltip. Select the experiment you opened and the available analysis will be populated. Now you can select different analysis and the graphs will be added into a single container view for that experiment.
There is only a limited number of such operations and they are only implemented in the Time Graph views (the ones looking like Gantt charts). For Zoom-in/out use CTRL+mouse wheel. Or use left mouse drag on time axis on top. Navigating the trace you can use the scrollbar at the bottom of the experiment container.
Currently, the Time Graph Tooltip is populated when selecting a state in a Time Graph view.