Skip to content

Show latency on workspace view #64

Closed
@matifali

Description

@matifali

Display latency for each workspace.
Image

Activity

ethanndickson

ethanndickson commented on May 15, 2025

@ethanndickson
Member

We're yet to decide on a way to implement this, as we can either perform the ping:

  • In the Go code, and send the results over the tunnel
  • In the Swift code, pinging the hostname directly

The latter doesn't provide us a way to also collect whether the connection is DERP or P2P - we'd need to determine that by pinging within the Go code. If we want to also indicate that eventually, it'd be beneficial to do the former, but it makes closing this issue more difficult.

deansheather

deansheather commented on May 22, 2025

@deansheather
Member

In the apps:

  • The colored connection indicator circle should have a tooltip with the following: (similar to the vscode extension)
    • Latency
    • P2P/DERP status
    • Route information (latency to DERP, endpoint IPs etc.)
  • 🟢 Green status icon when ping is less than 100ms (or some other decided upon number)
  • 🟡 Yellow status icon when ping is more than 100ms OR the last ping was not successful
  • 🔴 Red status icon when we have not performed a handshake in more than 5 minutes (previously, this was yellow)

The go code should:

  • DISCO ping all "active" agents every 5 seconds
  • Cache the result (success, latency, P2P/DERP, route)
  • Include the cached result in every future peer update to managers
    • No need to immediately send an update after ping IMO
    • No need to block updates, just use an "unknown" or "unsuccessful" ping result if we haven't done it yet

In the managers/services:

  • Forward the ping results to the apps
added a commit that references this issue on Jun 9, 2025
f8a5ca5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Show latency on workspace view · Issue #64 · coder/coder-desktop-macos