MCPcopy Create free account
hub / github.com/buger/jsonparser / BenchmarkGjsonLarge

Function BenchmarkGjsonLarge

benchmark/benchmark_gjson_sonic_test.go:45–60  ·  view source on GitHub ↗

reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference

(b *testing.B)

Source from the content-addressed store, hash-verified

43
44// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
45func BenchmarkGjsonLarge(b *testing.B) {
46 for i := 0; i < b.N; i++ {
47 gjson.GetBytes(largeFixture, "users").ForEach(func(_, value gjson.Result) bool {
48 value.Get("username")
49 return true
50 })
51
52 gjson.GetBytes(largeFixture, "topics.topics").ForEach(func(_, value gjson.Result) bool {
53 value.Get("id").Int()
54 value.Get("slug")
55 return true
56 })
57
58 nothing()
59 }
60}
61
62/*
63 github.com/bytedance/sonic

Callers

nothing calls this directly

Calls 2

nothingFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected