MCPcopy Create free account
hub / github.com/compozy/agh / BenchmarkDecodeSSELargeStream

Function BenchmarkDecodeSSELargeStream

internal/cli/perf_bench_test.go:37–48  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

35}
36
37func BenchmarkDecodeSSELargeStream(b *testing.B) {
38 ctx := context.Background()
39 handler := func(_ SSEEvent) error { return nil }
40
41 b.ReportAllocs()
42 b.SetBytes(int64(len(benchmarkSSEPayload)))
43 for b.Loop() {
44 if err := decodeSSE(ctx, io.NopCloser(strings.NewReader(benchmarkSSEPayload)), handler); err != nil {
45 b.Fatalf("decodeSSE() error = %v", err)
46 }
47 }
48}
49
50func BenchmarkDoRequestPostJSON(b *testing.B) {
51 ctx := context.Background()

Callers

nothing calls this directly

Calls 1

decodeSSEFunction · 0.85

Tested by

no test coverage detected