Skip to content

chore: write speedtest direct connection updates to stderr #13550

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

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

ethanndickson
Copy link
Member

Currently, when performing a coder speedtest using --direct, the cli writes a status update to stdout when it establishes a direct connection.
When using #13475, we want the output to be valid json, so we need to write these updates to stderr instead.

$ coder speedtest --output='json' --direct pog2 | jq
0ms via coder_sydney-fly
Starting a 5s download test...
{
  "overall": {
    "start_time_seconds": 0,
    "end_time_seconds": 5.019088141,
    "throughput_mbits": 1701.4251800524416
  },
  "intervals": [
    {
      "start_time_seconds": 0,
      "end_time_seconds": 1.008231443,
      "throughput_mbits": 1697.304764576758
    },
    {
      "start_time_seconds": 1.008231443,
      "end_time_seconds": 2.013730979,
      "throughput_mbits": 1952.1980883340755
    },
    {
      "start_time_seconds": 2.013730979,
      "end_time_seconds": 3.014306128,
      "throughput_mbits": 1961.8059412746816
    },
    {
      "start_time_seconds": 3.014306128,
      "end_time_seconds": 4.016784299,
      "throughput_mbits": 1138.030453931949
    },
    {
      "start_time_seconds": 4.016784299,
      "end_time_seconds": 5.019088141,
      "throughput_mbits": 1757.5585428116121
    }
  ]
}

@ethanndickson ethanndickson enabled auto-merge (squash) June 12, 2024 06:50
@ethanndickson ethanndickson merged commit a11f8b0 into main Jun 12, 2024
28 checks passed
@ethanndickson ethanndickson deleted the ethan/speedtest-stderr branch June 12, 2024 07:10
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants