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

Function BenchmarkStructPartialFailureParallel

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

Source from the content-addressed store, hash-verified

574}
575
576func BenchmarkStructPartialFailureParallel(b *testing.B) {
577 validate := New()
578
579 type Test struct {
580 Name string `validate:"required"`
581 NickName string `validate:"required"`
582 }
583
584 test := &Test{
585 Name: "Joey Bloggs",
586 }
587
588 b.ResetTimer()
589 b.RunParallel(func(pb *testing.PB) {
590 for pb.Next() {
591 _ = validate.StructPartial(test, "NickName")
592 }
593 })
594}
595
596func BenchmarkStructExceptSuccess(b *testing.B) {
597 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…