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

Function BenchmarkNormalizeRawJSONTrimmed256B

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

Source from the content-addressed store, hash-verified

36}
37
38func BenchmarkNormalizeRawJSONTrimmed256B(b *testing.B) {
39 raw := benchmarkRawJSONWithWhitespace(256)
40
41 b.ReportAllocs()
42
43 for b.Loop() {
44 if got := normalizeRawJSON(raw); len(got) == 0 {
45 b.Fatal("normalizeRawJSON() = nil, want non-empty payload")
46 }
47 }
48}
49
50func BenchmarkSameRawJSONTrimmed256B(b *testing.B) {
51 trimmed := json.RawMessage(strings.TrimSpace(string(benchmarkRawJSONWithWhitespace(256))))

Callers

nothing calls this directly

Calls 2

normalizeRawJSONFunction · 0.70

Tested by

no test coverage detected