- Notifications
You must be signed in to change notification settings - Fork1
impl: support for displaying network latency#108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Adds support for a configurable path where ssh network info statsare going to be saved.
Remnant from the ssh background connection support
This patch provides UI support for the network inf dir wheressh metrics will be saved. Users can configure the defaultlocation for this place.
Also, the default directory is renamed to ssh-network-metricsfor a better description.
Toolbox spawns a native process running the SSH client. The ssh client then spawnsanother process which associated to the coder proxy command. SSH network metricsare saved into json file with the name equal to the pid of the ssh command (notto be confused with the proxy command's name)
When ssh is connected a poll job is created that searches for theSSH command pid, and then determines the network metrics json file.The pid can change multiple times in a Toolbox session, especiallywhen the OS goes to sleep and comes back - the ssh is respawned.This is the reason we don't cache the pid, instead always searchfor it.The poll job activates every 5 settings and it is cancelled whenthe user stops the ssh connection.
This commit contains the data class necessary tounmarshall the ssh network metrics and also thenecessary moshi plumbing for converting the json file.
Under the "Additional environment information". Unfortunately it was notpossible any other way. The description property is modifiable howeverToolbox renders the description label only as long as the SSH connectionis not established. As soon as an ssh connection is running the descriptionlabel is used as mechanism to notify users about available IDE updates.It also appears that we can't have any other extra tab, other than "Tools","Projects" and "Settings". There is a secondary information attribute API,but it is not usable to show recurring metrics info because it can only beconfigured once, it is not a mutable field.The best effort was to add the information in the Settings page, and it isworth highlighting that the metrics are only refreshed when user either:- switches between tabs- expands/collapses teh "Additional environment information" section.There is no programmatic mechanism to notify the information in the Settingspage changed
Discarded the download/upload stats, changed the text status, and I'veadded support for Coder Connect.UTs covering the status generation were also added.
Also, I've raised the following issues with JetBrains in the hope we have more flexibility in the future to display full metrics similar to VS Code. https://youtrack.jetbrains.com/issue/TBX-14823/Support-mutable-and-styled-secondary-information-labels-in-JetBrains-Toolbox |
d5b1c3b
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Under the "Additional environment information". Unfortunately it was not possible any other way. The description property is modifiable however Toolbox renders the description label only as long as the SSH connection is not established. As soon as an ssh connection is running the description label is used as mechanism to notify users about available IDE updates.
It also appears that we can't have any other extra tab, other than "Tools", "Projects" and "Settings". There is a secondary information attribute API, but it is not usable to show recurring metrics info because it can only be
configured once, it is not a mutable field.
The best effort was to add the information in the Settings page, and it is worth highlighting that the metrics are only refreshed when user either:
There is no programmatic mechanism to notify the information in the Settings page that latency changed.
The network metrics are loaded from the pid files created by the ssh command. Toolbox spawns a native process running the SSH client. The ssh client then spawns another process which is associated to the coder proxy command. SSH network metrics are saved into json files with the name equal to the pid of the ssh command (not to be confused with the proxy command's name).