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

Function BenchmarkJsonParserDelSmall

benchmark/benchmark_small_payload_test.go:213–225  ·  view source on GitHub ↗

Verifies: STK-REQ-001 MCDC STK-REQ-001: N/A Verifies: STK-REQ-003 MCDC STK-REQ-003: N/A Verifies: STK-REQ-004 MCDC STK-REQ-004: N/A Verifies: STK-REQ-005 MCDC STK-REQ-005: N/A Verifies: STK-REQ-007 MCDC STK-REQ-007: N/A reqproof:proptest:skip performance benchmark; measures wall-clock time and alloc

(b *testing.B)

Source from the content-addressed store, hash-verified

211// MCDC STK-REQ-007: N/A
212// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
213func BenchmarkJsonParserDelSmall(b *testing.B) {
214 fixture := make([]byte, 0, len(smallFixture))
215 b.ResetTimer()
216 for i := 0; i < b.N; i++ {
217 fixture = append(fixture[:0], smallFixture...)
218 fixture = jsonparser.Delete(fixture, "uuid")
219 fixture = jsonparser.Delete(fixture, "tz")
220 fixture = jsonparser.Delete(fixture, "ua")
221 fixture = jsonparser.Delete(fixture, "stt")
222
223 nothing()
224 }
225}
226
227/*
228 encoding/json

Callers

nothing calls this directly

Calls 2

DeleteFunction · 0.92
nothingFunction · 0.85

Tested by

no test coverage detected