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/santhosh-tekuri/jsonschema/v5 v5.3.1
|
||||||
github.com/sensu/sensu-go/api/core/v2 v2.16.0
|
github.com/sensu/sensu-go/api/core/v2 v2.16.0
|
||||||
github.com/shirou/gopsutil/v3 v3.24.4
|
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/signalfx/golib/v3 v3.3.53
|
||||||
github.com/sirupsen/logrus v1.9.3
|
github.com/sirupsen/logrus v1.9.3
|
||||||
github.com/sleepinggenius2/gosmi v0.4.4
|
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.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 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
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.6 h1:wBbj4aJR+kq+DP44ja3hWEc50FCiSk0U0YQ9xQLORd0=
|
||||||
github.com/showwin/speedtest-go v1.7.5/go.mod h1:uLgdWCNarXxlYsL2E5TOZpCIwpgSWnEANZp7gfHXHu0=
|
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/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 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0=
|
||||||
github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4=
|
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,
|
SamplingDuration: time.Second * 15,
|
||||||
})
|
})
|
||||||
|
|
||||||
pLoss := -1.0
|
var pLoss *transport.PLoss
|
||||||
|
|
||||||
if is.TestMode == testModeMulti {
|
if is.TestMode == testModeMulti {
|
||||||
err = is.server.MultiDownloadTestContext(context.Background(), is.servers)
|
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.
|
// Not all servers are applicable for packet loss testing.
|
||||||
// If err != nil, we skip it and just report a warning.
|
// If err != nil, we skip it and just report a warning.
|
||||||
err = analyzer.Run(is.server.Host, func(packetLoss *transport.PLoss) {
|
err = analyzer.Run(is.server.Host, func(pl *transport.PLoss) {
|
||||||
if packetLoss != nil && packetLoss.Sent != 0 {
|
pLoss = pl
|
||||||
pLoss = packetLoss.Loss()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
is.Log.Warnf("packet loss test failed: %s", err)
|
is.Log.Warnf("packet loss test failed: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lossPercent := 0.0
|
packetLoss := -1.0
|
||||||
if pLoss == -1 {
|
if pLoss != nil {
|
||||||
// If all servers are not applicable, returned -1.
|
packetLoss = pLoss.LossPercent()
|
||||||
lossPercent = -1
|
|
||||||
} else {
|
|
||||||
lossPercent = pLoss * 100.0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := map[string]any{
|
fields := map[string]any{
|
||||||
|
|
@ -140,7 +135,7 @@ func (is *InternetSpeed) Gather(acc telegraf.Accumulator) error {
|
||||||
"upload": is.server.ULSpeed.Mbps(),
|
"upload": is.server.ULSpeed.Mbps(),
|
||||||
"latency": timeDurationMillisecondToFloat64(is.server.Latency),
|
"latency": timeDurationMillisecondToFloat64(is.server.Latency),
|
||||||
"jitter": timeDurationMillisecondToFloat64(is.server.Jitter),
|
"jitter": timeDurationMillisecondToFloat64(is.server.Jitter),
|
||||||
"packet_loss": lossPercent,
|
"packet_loss": packetLoss,
|
||||||
"location": is.server.Name,
|
"location": is.server.Name,
|
||||||
}
|
}
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue