mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-28 22:43:39 +00:00
prober: include current probe results in run-probe text response
It was a bit confusing that provided history did not include the current probe results. Updates tailscale/corp#20583 Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
committed by
Anton Tolchanov
parent
a29545e9cc
commit
ed6aa50bd5
@@ -570,9 +570,9 @@ func (p *Prober) RunHandler(w http.ResponseWriter, r *http.Request) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
stats := fmt.Sprintf("Last %d probes: success rate %d%%, median latency %v\n",
|
||||
len(prevInfo.RecentResults),
|
||||
int(prevInfo.RecentSuccessRatio()*100), prevInfo.RecentMedianLatency())
|
||||
stats := fmt.Sprintf("Last %d probes (including this one): success rate %d%%, median latency %v\n",
|
||||
len(info.RecentResults),
|
||||
int(info.RecentSuccessRatio()*100), info.RecentMedianLatency())
|
||||
if err != nil {
|
||||
return tsweb.Error(respStatus, fmt.Sprintf("Probe failed: %s\n%s", err.Error(), stats), err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user