Skip to content

Commit

Permalink
Release v1.7.6 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari committed May 15, 2024
1 parent 458f7e8 commit d50d54f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Flags:
-s, --server=SERVER ... Select server id to speedtest.
--custom-url=CUSTOM-URL Specify the url of the server instead of fetching from speedtest.net.
--saving-mode Test with few resources, though low accuracy (especially > 30Mbps).
--json Output results in json like format.
--json Output results in json format.
--unix Output results in unix like format.
--location=LOCATION Change the location with a precise coordinate (format: lat,lon).
--city=CITY Change the location with a predefined city label.
Expand Down Expand Up @@ -73,13 +73,14 @@ Simply use `speedtest` command. The closest server is selected by default. Use t
# speedtest --unix
$ speedtest

speedtest-go v1.7.3 @showwin
speedtest-go v1.7.6 @showwin

✓ ISP: 124.27.199.165 (Fujitsu) [34.9769, 138.3831]
✓ Found 20 Public Servers

✓ Test Server: [6691] 9.03km Shizuoka (Japan) by sudosan
✓ Latency: 4.452963ms Jitter: 41.271µs Min: 4.395179ms Max: 4.517576ms
✓ Packet Loss Analyzer: Running in background (<= 30 Secs)
✓ Download: 115.52 Mbps (Used: 135.75MB) (Latency: 4ms Jitter: 0ms Min: 4ms Max: 4ms)
✓ Upload: 4.02 Mbps (Used: 6.85MB) (Latency: 4ms Jitter: 1ms Min: 3ms Max: 8ms)
✓ Packet Loss: 8.82% (Sent: 217/Dup: 0/Max: 237)
Expand All @@ -104,7 +105,7 @@ and select them by id.
```bash
$ speedtest --server 6691 --server 6087

speedtest-go v1.7.3 @showwin
speedtest-go v1.7.6 @showwin

✓ ISP: 124.27.199.165 (Fujitsu) [34.9769, 138.3831]
✓ Found 2 Specified Public Server(s)
Expand Down Expand Up @@ -228,17 +229,21 @@ func main() {
targets, _ := serverList.FindServer([]int{})

// Create a packet loss analyzer, use default options
analyzer, err := speedtest.NewPacketLossAnalyzer(nil)
checkError(err)
analyzer := speedtest.NewPacketLossAnalyzer(nil)

// Perform packet loss analysis on all available servers
for _, server := range targets {
err = analyzer.Run(server.Host, func(packetLoss *transport.PLoss) {
err := analyzer.Run(server.Host, func(packetLoss *transport.PLoss) {
fmt.Println(packetLoss, server.Host, server.Name)
// fmt.Println(packetLoss.Loss())
})
checkError(err)
}

// or test all at the same time.
packetLoss, err := analyzer.RunMulti(targets.Hosts())
checkError(err)
fmt.Println(packetLoss)
}
```

Expand Down
2 changes: 1 addition & 1 deletion speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
serverIds = kingpin.Flag("server", "Select server id to run speedtest.").Short('s').Ints()
customURL = kingpin.Flag("custom-url", "Specify the url of the server instead of fetching from speedtest.net.").String()
savingMode = kingpin.Flag("saving-mode", "Test with few resources, though low accuracy (especially > 30Mbps).").Bool()
jsonOutput = kingpin.Flag("json", "Output results in json like format.").Bool()
jsonOutput = kingpin.Flag("json", "Output results in json format.").Bool()
unixOutput = kingpin.Flag("unix", "Output results in unix like format.").Bool()
location = kingpin.Flag("location", "Change the location with a precise coordinate (format: lat,lon).").String()
city = kingpin.Flag("city", "Change the location with a predefined city label.").String()
Expand Down
2 changes: 1 addition & 1 deletion speedtest/speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

var (
version = "1.7.5"
version = "1.7.6"
DefaultUserAgent = fmt.Sprintf("showwin/speedtest-go %s", version)
)

Expand Down

0 comments on commit d50d54f

Please sign in to comment.