MCPcopy Create free account
hub / github.com/go-playground/validator / BenchmarkStructPartialFailure

Function BenchmarkStructPartialFailure

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

Source from the content-addressed store, hash-verified

556}
557
558func BenchmarkStructPartialFailure(b *testing.B) {
559 validate := New()
560
561 type Test struct {
562 Name string `validate:"required"`
563 NickName string `validate:"required"`
564 }
565
566 test := &Test{
567 Name: "Joey Bloggs",
568 }
569
570 b.ResetTimer()
571 for n := 0; n < b.N; n++ {
572 _ = validate.StructPartial(test, "NickName")
573 }
574}
575
576func BenchmarkStructPartialFailureParallel(b *testing.B) {
577 validate := New()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
StructPartialMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…