diff --git a/api/router.go b/api/router.go index 8331a58..49eccd9 100644 --- a/api/router.go +++ b/api/router.go @@ -112,7 +112,7 @@ func summaryResponse(p *proxy.Proxy) SummaryResponse { Sleep: upstreams.Sleep, Error: upstreams.Error, Total: upstreams.Total, - Ratio: ratio(now, upstreams.Total), + Ratio: upstreamRatio(now, upstreams.Total), }, Results: ResultsResponse{ Accepted: summary.Accepted, @@ -181,7 +181,7 @@ func writeJSON(w http.ResponseWriter, payload any) { _ = json.NewEncoder(w).Encode(payload) } -func ratio(now, total uint64) float64 { +func upstreamRatio(now, total uint64) float64 { if total == 0 { return 0 } diff --git a/state_impl.go b/state_impl.go index 2835141..3b4eb54 100644 --- a/state_impl.go +++ b/state_impl.go @@ -1493,6 +1493,3 @@ func (n *noopSplitter) GC() {} func (n *noopSplitter) Upstreams() UpstreamStats { return UpstreamStats{} } // Difficulty helper for the HTTP summary. -func workerSummaryNow(workers []WorkerRecord) uint64 { - return uint64(len(workers)) -}