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

Function BenchmarkSetLarge

benchmark/benchmark_set_test.go:12–23  ·  view source on GitHub ↗

Verifies: STK-REQ-005 MCDC STK-REQ-005: N/A 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

10// MCDC STK-REQ-005: N/A
11// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
12func BenchmarkSetLarge(b *testing.B) {
13 b.ReportAllocs()
14
15 keyPath := make([]string, 20000)
16 for i := range keyPath {
17 keyPath[i] = "keyPath" + strconv.Itoa(i)
18 }
19 b.ResetTimer()
20 for i := 0; i < b.N; i++ {
21 _, _ = jsonparser.Set(largeFixture, largeFixture, keyPath...)
22 }
23}

Callers

nothing calls this directly

Calls 1

SetFunction · 0.92

Tested by

no test coverage detected