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

Function BenchmarkStructPartialSuccessParallel

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

Source from the content-addressed store, hash-verified

536}
537
538func BenchmarkStructPartialSuccessParallel(b *testing.B) {
539 validate := New()
540
541 type Test struct {
542 Name string `validate:"required"`
543 NickName string `validate:"required"`
544 }
545
546 test := &Test{
547 Name: "Joey Bloggs",
548 }
549
550 b.ResetTimer()
551 b.RunParallel(func(pb *testing.PB) {
552 for pb.Next() {
553 _ = validate.StructPartial(test, "Name")
554 }
555 })
556}
557
558func BenchmarkStructPartialFailure(b *testing.B) {
559 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…