Skip to content

Commit

Permalink
change: remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari committed May 2, 2024
1 parent 5028301 commit f6723df
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions speedtest/internal/welford_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package internal

import (
"fmt"
"github.com/showwin/speedtest-go/speedtest"
"math/rand"
"testing"
"time"
Expand Down Expand Up @@ -34,30 +33,3 @@ func TestWOM(t *testing.T) {
time.Sleep(time.Millisecond * 50)
}
}

func TestGenTestData(t *testing.T) {
var speedtestClient = speedtest.New()
serverList, _ := speedtestClient.FetchServers()
targets, _ := serverList.FindServer([]int{})

var d []float64

speedtestClient.CallbackDownloadRate(func(downRate float64) {
d = append(d, downRate)
})

for _, s := range targets {
// Please make sure your host can access this test server,
// otherwise you will get an error.
// It is recommended to replace a server at this time
s.DownloadTest()
fmt.Printf("Latency: %s, Download: %f, Upload: %f\n", s.Latency, s.DLSpeed, s.ULSpeed)
s.Context.Reset() // reset counter
}

fmt.Print("data := []float64{")
for _, val := range d {
fmt.Printf("%v, ", val)
}
fmt.Print("}")
}

0 comments on commit f6723df

Please sign in to comment.