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

Function BenchmarkGjsonMedium

benchmark/benchmark_gjson_sonic_test.go:29–42  ·  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

27
28// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
29func BenchmarkGjsonMedium(b *testing.B) {
30 for i := 0; i < b.N; i++ {
31 gjson.GetBytes(mediumFixture, "person.name.fullName")
32 gjson.GetBytes(mediumFixture, "person.github.followers").Int()
33 gjson.GetBytes(mediumFixture, "company")
34
35 gjson.GetBytes(mediumFixture, "person.gravatar.avatars").ForEach(func(_, value gjson.Result) bool {
36 value.Get("url")
37 return true
38 })
39
40 nothing()
41 }
42}
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) {

Callers

nothing calls this directly

Calls 2

nothingFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected