MCPcopy Index your code
hub / github.com/go-playground/validator / BenchmarkStructLevelValidationFailureParallel

Function BenchmarkStructLevelValidationFailureParallel

benchmarks_test.go:330–344  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

328}
329
330func BenchmarkStructLevelValidationFailureParallel(b *testing.B) {
331 validate := New()
332 validate.RegisterStructValidation(StructValidationTestStruct, TestStruct{})
333
334 tst := TestStruct{
335 String: "good value",
336 }
337
338 b.ResetTimer()
339 b.RunParallel(func(pb *testing.PB) {
340 for pb.Next() {
341 _ = validate.Struct(tst)
342 }
343 })
344}
345
346func BenchmarkStructSimpleCustomTypeSuccess(b *testing.B) {
347 validate := New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
StructMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…