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

Function BenchmarkStructExceptSuccessParallel

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

Source from the content-addressed store, hash-verified

612}
613
614func BenchmarkStructExceptSuccessParallel(b *testing.B) {
615 validate := New()
616
617 type Test struct {
618 Name string `validate:"required"`
619 NickName string `validate:"required"`
620 }
621
622 test := &Test{
623 Name: "Joey Bloggs",
624 }
625
626 b.ResetTimer()
627 b.RunParallel(func(pb *testing.PB) {
628 for pb.Next() {
629 _ = validate.StructExcept(test, "NickName")
630 }
631 })
632}
633
634func BenchmarkStructExceptFailure(b *testing.B) {
635 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…