Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
fioan89 merged 11 commits intomainfromsupport-for-displaying-network-latency
May 15, 2025

Conversation

fioan89
Copy link
Collaborator

@fioan89fioan89 commentedMay 7, 2025
edited
Loading

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:

  • switches between tabs
  • expands/collapses the "Additional environment information" section.

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).

fioan89 added10 commitsMay 7, 2025 23:03
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.
@fioan89fioan89 marked this pull request as ready for reviewMay 14, 2025 20:41
@fioan89fioan89 requested review frommatifali andf0sselMay 14, 2025 20:41
@fioan89
Copy link
CollaboratorAuthor

Some screens with how it all looks like.
Screenshot 2025-05-14 at 23 01 58

Screenshot 2025-05-14 at 23 13 25

Screenshot 2025-05-14 at 23 15 26

@fioan89
Copy link
CollaboratorAuthor

@fioan89fioan89 merged commitd5b1c3b intomainMay 15, 2025
5 checks passed
@fioan89fioan89 deleted the support-for-displaying-network-latency branchMay 15, 2025 18:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@matifalimatifalimatifali approved these changes

@f0sself0sselAwaiting requested review from f0ssel

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Report when Workspace is connected with SSH via Coder Connect Support for SSH connection metrics
2 participants
@fioan89@matifali

[8]ページ先頭

©2009-2025 Movatter.jp