MCPcopy
hub / github.com/connectrpc/connect-go / BenchmarkGRPCPercentEncoding

Function BenchmarkGRPCPercentEncoding

protocol_grpc_test.go:200–210  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

198}
199
200func BenchmarkGRPCPercentEncoding(b *testing.B) {
201 input := "Hello, 世界"
202 want := "Hello, %E4%B8%96%E7%95%8C"
203 b.ReportAllocs()
204 for b.Loop() {
205 got := grpcPercentEncode(input)
206 if got != want {
207 b.Fatalf("grpcPercentEncode(%q) = %s, want %s", input, got, want)
208 }
209 }
210}
211
212func BenchmarkGRPCPercentDecoding(b *testing.B) {
213 input := "Hello, %E4%B8%96%E7%95%8C"

Callers

nothing calls this directly

Calls 1

grpcPercentEncodeFunction · 0.85

Tested by

no test coverage detected