MCPcopy
hub / github.com/go-playground/validator / BenchmarkStructExceptFailureParallel

Function BenchmarkStructExceptFailureParallel

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

Source from the content-addressed store, hash-verified

650}
651
652func BenchmarkStructExceptFailureParallel(b *testing.B) {
653 validate := New()
654
655 type Test struct {
656 Name string `validate:"required"`
657 NickName string `validate:"required"`
658 }
659
660 test := &Test{
661 Name: "Joey Bloggs",
662 }
663
664 b.ResetTimer()
665 b.RunParallel(func(pb *testing.PB) {
666 for pb.Next() {
667 _ = validate.StructExcept(test, "Name")
668 }
669 })
670}
671
672func BenchmarkStructSimpleCrossFieldSuccess(b *testing.B) {
673 validate := New()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
StructExceptMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…