From 7f41f94fff06cf88106d3affdc4f8c518602d4a2 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Mon, 23 May 2022 12:58:18 +0800 Subject: [PATCH] Fix: benchmark read bytes --- test/clash_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/clash_test.go b/test/clash_test.go index 5e4e0405..7c9ca051 100644 --- a/test/clash_test.go +++ b/test/clash_test.go @@ -645,7 +645,7 @@ func benchmarkProxy(b *testing.B, proxy C.ProxyAdapter) { b.SetBytes(chunkSize) buf := make([]byte, chunkSize) for i := 0; i < b.N; i++ { - conn.Read(buf) + io.ReadFull(conn, buf) } }) }