Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented May 7, 2025

WIP

fioan89 added 8 commits May 7, 2025 23:03
Adds support for a configurable path where ssh network info stats
are going to be saved.
Remnant from the ssh background connection support
This patch provides UI support for the network inf dir where
ssh metrics will be saved. Users can configure the default
location for this place.
Also, the default directory is renamed to ssh-network-metrics
for a better description.
Toolbox spawns a native process running the SSH client. The ssh client then spawns
another process which associated to the coder proxy command. SSH network metrics
are saved into json file with the name equal to the pid of the ssh command (not
to be confused with the proxy command's name)
When ssh is connected a poll job is created that searches for the
SSH command pid, and then determines the network metrics json file.

The pid can change multiple times in a Toolbox session, especially
when the OS goes to sleep and comes back - the ssh is respawned.
This is the reason we don't cache the pid, instead always search
for it.

The poll job activates every 5 settings and it is cancelled when
the user stops the ssh connection.
This commit contains the data class necessary to
unmarshall the ssh network metrics and also the
necessary moshi plumbing for converting the json file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant