eclipse-cdt-cloud / vscode-trace-extension Goto Github PK
View Code? Open in Web Editor NEWTrace viewer extension for Eclipse Theia applications and VSCode compatible applications, that uses the Trace Server Protocol (TSP)
License: MIT License
Trace viewer extension for Eclipse Theia applications and VSCode compatible applications, that uses the Trace Server Protocol (TSP)
License: MIT License
It's possible to open multiple traces, but the available outputs don't update when switching the trace container, or selecting a trace in the opened traces.
The default branch in this repository is currently named "main" and not "master" as usual in most repositories.
PR 612 in theia-trace-extension
(eclipse-cdt-cloud/theia-trace-extension#612) provides the following features:
Not all features provided by this patch work in vscode-trace-extension. Replicate the missing functionality
The theia-trace-extension
currently has a separate view in the explorer (left side) that populates upon selection in the graphs. For example, selecting an event in the Events Table
the details will listed there. This should be supported in this project as well. An additional web-view needs to be implemented for that. Note that the traceviewer-react-components
needs to provide the view implementation so that the web-view only need so use it and provide UI controls.
Move repository under the Eclipse CDT cloud project by opening contribution questionnaire.
Provide relevant documentation like CONTRIBUTING.md, SECURITY.md etc.
For now, running the extension is hackish and needs to manually set dependencies to those packages. Once they are published on npm, this will be more straightforward
The vscode plugin has defined preferences, but the handling of updates needs to be migrated (e.g. start and stop trace server, propagate to each webview).
The theia-trace-extension provides different toolbar buttons for the widget view (where the graphs are loaded). This is Theia specific and doesn't exist in the VsCode version.
To support the same functionality this needs to be added to the vscode-trace-extension.
First, it' needs to be investigated if it's the VsCode APIs allows it to add toolbar buttons. If yes, the functionality can be implemented using VsCode APIs. If not then the functionality needs to be added in a different way (maybe as part of the react-components).
Note: Move as much code to the theia-trace-extension
repository in the Theia independent packages (traceviewer-react-components
and traceviewer-base-components
) for code-re-use purposes.
The default data provider ID of the Overview View is hard-coded to the histogram XY chart of the Trace Compass trace server. The default data provider ID should not be hard-coded, but should be configurable using a preference.
Note: The end-user has now way to know what the IDs of the available XY views are. So, the ID is probably not the best thing to have a preference for.
In the theia-trace-extension
it's possible to start/stop the trace server from the Theia backend. The command Start trace server
and respectively Stop trace server
exist that starts/stops the trace server configured by the preferences in the theia-trace-extension
. This functionality was discussed in eclipse-cdt-cloud/theia-trace-extension#53 which references the initial implementation of the feature. The start command is also triggered when trying to open a trace with the theia-trace-extension
.
For the vscode-trace-extension
, a similar support is needed to start/stop the server for both the local and remote cases.
Note: Installing the vscode-trace-extension
in VsCode and Theia applications should work by the update.
Also supporting a TRACE_SERVER_URL
environment variable is out of this scope for now, if ever required (not yet).
The theia-trace-extension is persisting open views, selection range and zoom range when closing the application and restoring when the application restarts. Since implementation is based on Theia APIs and the functionality has to be migrated.
In the recent Theia trace extension, an Overview view
was added. While the TraceContextComponent
can display the overview view, however the construction of this component has to be done properly to pass the default overview descriptor. Other items to verify and support:
When the theia-trace-extension
shows the status of the of the server connection. When sending a back-end command, and if fails due to connection issues the status is updated to a red x. If it is successful the status is shown green. This should be provide here as well.
An additional web-view needs to be implemented for that. Note that the traceviewer-react-components needs to provide the view implementation so that the web-view only need so use it and provide UI controls.
Right now the styles are provided by css files stored here [1]. Not all values are defined in here and need to be added.
Theia theme variables are used because the traceviewer-react-components
are using these variable name. This approach work, however, we should not use Theia names here. The variables in the components should have Theia or VsCode independent names and depending on if the components run in Theia or VsCode the mapping is defined there.
[1] https://github.com/theia-ide/vscode-trace-extension/tree/master/vscode-trace-webviews/src/style.
For reference please see the theia-trace-extension
implementation:
eclipse-cdt-cloud/theia-trace-extension#625
Deploy the vscode-trace-extension
to OpenVsx
marketplace for users to consume.
In the theia-trace-extension it is possible to select a directory or trace from the file explorer and execute "Open with -> Trace Viewer". After executing this the Trace Explorer is populated.
When no Trace is open, the "Open Trace" button is shown in the Trace Explorer and upon pressing the button the user can select a directory to find and open traces.
When executing that command, the command execution finds all CTF traces recursively in the directory and opens them in an experiment on the trace server. If the selection is a single file, then that file is opened as trace.
Now, only the top level directories of the workspace are shown and can be opened.
First step would be a smarter discovery of traces: go deep in the tree to locate potential traces and CTF folders and show the structure as a tree so that upper directories can be opened along with the traces underneath.
Using eclipse-cdt-cloud/tsp-typescript-client#56, the serialization / deserialization of BigInt values can be achieved when sending/receiving signals.
Originally posted by @bhufmann in #35 (comment)
With the recent updates in the trace viewer components and its dependencies to use BigInt
for timestamps, the serialization of messages between the webviews and vscode extension will fail because the standard json serializer doesn't support type BigInt
.
It will fail with the following message:
TypeError: Do not know how to serialize a BigInt
/usr/share/code/resources/app/out/bootstrap-fork.js:5
stack trace: TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
at y (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:3480)
at g.postMessage (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:96:73489)
at TraceViewerPanel.setExperiment (/home/eedbhu/git/vscode-trace-extension/vscode-trace-extension/lib/trace-viewer-panel/trace-viewer-webview-panel.js:125:29)
at /home/eedbhu/git/vscode-trace-extension/vscode-trace-extension/lib/trace-explorer/trace-tree.js:123:19
at processTicksAndRejections (internal/process/task_queues.js:93:5)
For example the Experiment
or Trace
classes contain timestamp fields which are BigInt
and causing serialization problems and the vscode trace extension to fail.
To fix this, each message send between webviews and the vscode trace extension itself need to be updated that BigInt
values are serialized properly (e.g. using a string) and deserialized to BigInt
on the receiving side.
This issue needs to be fixed before upgrading to the latest traceviewer components which contain many valuable improvements.
Hello,
The Trace Compass team would like to contribute the vscode-trace-extension
to the Eclipse CDT.cloud
project [1] so that the further development can be done under the Eclipse open source foundation. The Eclipse CDT.cloud
is already the home of the main components that are used by the vscode-trace-extension
.
The goal of this project is to provide the trace-viewer capabilities as VS Code plugin so that all VS Code compatible editors like Theia, VSCodium, VS Code etc. can install and take advantage of the trace viewer functionality and not "just" Theia based products. There has been also an increasing interest of this VS Code plug-in in the community.
The vscode-trace-extension
repository only contains code to integrate with VS Code APIs. All core, trace-viewing source code are provided by the Theia-independent components of theia-trace-extension
[2] which are deployed to NPM [3] and [4].
I'd like to start the contribution process in the coming week(s). Please let me know if you have any questions and concerns.
Best Regards
Bernd
[1] https://github.com/eclipse-cdt-cloud
[2] https://github.com/eclipse-cdt-cloud/theia-trace-extension
[3] https://www.npmjs.com/package/traceviewer-base
[4] https://www.npmjs.com/package/traceviewer-react-components
Export to CSV is not working in VsCode for views of type DATA_TREE, which are, for example, be used for Latency views when using Trace Compass server. The gif shows how to trigger it, but there is no way to know if it was successful, what the filename is and where it's stored (if actually was executed)
GitHub code actions for:
The tooltip window is not available in the VsCode plug-in. Either migrate the tooltip window or implement tooltips in the react components for each graph.
The message name of messages sent between webviews and extension that use the vscode API vscode.postMessage()
should not be hard-coded.
The time synchronization doesn't work right now and needs to be fixed.
Adjust z-index of the context menu so that its not blocked by other components:
The health check functionality to check if the trace server is running needs to be migrated. Call heath check functionality before opening a trace.
The change of PR eclipse-cdt-cloud/theia-trace-extension#248 needs to be applied in vscode as well.
The theia-trace-extension added support for viewer markers that can be retrieved from the trace server (e.g. fetchAnnotationCategories/fetchAnnotation). Make sure that this data is populated in the vscode-trace-extension. If it's currently not populated, implement the support.
Codicons are not integrated in webviews by default, due to certain icons might be missing. The following issue talks about how to let the webview load VS Code's bundled codicons: microsoft/vscode#95199.
Use vscode-messenger RPC messaging library for the VS Code extension platform [1]. This will help providing a clean way to send messages within the vscode-trace-extension components, like the extension and webviews.
Note: Don't forget to account for BigInt variables within messages, that won't be able to be sent directly with this library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.