chore(deps): Bump github.com/showwin/speedtest-go from 1.7.5 to 1.7.6 (#15362)
This commit is contained in:
parent
ae326bc805
commit
c1f355d577
2
go.mod
2
go.mod
|
|
@ -171,7 +171,7 @@ require (
|
|||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
|
||||
github.com/sensu/sensu-go/api/core/v2 v2.16.0
|
||||
github.com/shirou/gopsutil/v3 v3.24.4
|
||||
github.com/showwin/speedtest-go v1.7.5
|
||||
github.com/showwin/speedtest-go v1.7.6
|
||||
github.com/signalfx/golib/v3 v3.3.53
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/sleepinggenius2/gosmi v0.4.4
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -2127,8 +2127,8 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz
|
|||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/showwin/speedtest-go v1.7.5 h1:FQ3EdM2vnfw5BRCRzGCYe8aWu70rr21Az5ZFHiW9CdE=
|
||||
github.com/showwin/speedtest-go v1.7.5/go.mod h1:uLgdWCNarXxlYsL2E5TOZpCIwpgSWnEANZp7gfHXHu0=
|
||||
github.com/showwin/speedtest-go v1.7.6 h1:wBbj4aJR+kq+DP44ja3hWEc50FCiSk0U0YQ9xQLORd0=
|
||||
github.com/showwin/speedtest-go v1.7.6/go.mod h1:uLgdWCNarXxlYsL2E5TOZpCIwpgSWnEANZp7gfHXHu0=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0=
|
||||
github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4=
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ func (is *InternetSpeed) Gather(acc telegraf.Accumulator) error {
|
|||
SamplingDuration: time.Second * 15,
|
||||
})
|
||||
|
||||
pLoss := -1.0
|
||||
var pLoss *transport.PLoss
|
||||
|
||||
if is.TestMode == testModeMulti {
|
||||
err = is.server.MultiDownloadTestContext(context.Background(), is.servers)
|
||||
|
|
@ -117,22 +117,17 @@ func (is *InternetSpeed) Gather(acc telegraf.Accumulator) error {
|
|||
}
|
||||
// Not all servers are applicable for packet loss testing.
|
||||
// If err != nil, we skip it and just report a warning.
|
||||
err = analyzer.Run(is.server.Host, func(packetLoss *transport.PLoss) {
|
||||
if packetLoss != nil && packetLoss.Sent != 0 {
|
||||
pLoss = packetLoss.Loss()
|
||||
}
|
||||
err = analyzer.Run(is.server.Host, func(pl *transport.PLoss) {
|
||||
pLoss = pl
|
||||
})
|
||||
if err != nil {
|
||||
is.Log.Warnf("packet loss test failed: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
lossPercent := 0.0
|
||||
if pLoss == -1 {
|
||||
// If all servers are not applicable, returned -1.
|
||||
lossPercent = -1
|
||||
} else {
|
||||
lossPercent = pLoss * 100.0
|
||||
packetLoss := -1.0
|
||||
if pLoss != nil {
|
||||
packetLoss = pLoss.LossPercent()
|
||||
}
|
||||
|
||||
fields := map[string]any{
|
||||
|
|
@ -140,7 +135,7 @@ func (is *InternetSpeed) Gather(acc telegraf.Accumulator) error {
|
|||
"upload": is.server.ULSpeed.Mbps(),
|
||||
"latency": timeDurationMillisecondToFloat64(is.server.Latency),
|
||||
"jitter": timeDurationMillisecondToFloat64(is.server.Jitter),
|
||||
"packet_loss": lossPercent,
|
||||
"packet_loss": packetLoss,
|
||||
"location": is.server.Name,
|
||||
}
|
||||
tags := map[string]string{
|
||||
|
|
|
|||
Loading…
Reference in New Issue