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

Function BenchmarkStructPartialSuccess

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

Source from the content-addressed store, hash-verified

518}
519
520func BenchmarkStructPartialSuccess(b *testing.B) {
521 validate := New()
522
523 type Test struct {
524 Name string `validate:"required"`
525 NickName string `validate:"required"`
526 }
527
528 test := &Test{
529 Name: "Joey Bloggs",
530 }
531
532 b.ResetTimer()
533 for n := 0; n < b.N; n++ {
534 _ = validate.StructPartial(test, "Name")
535 }
536}
537
538func BenchmarkStructPartialSuccessParallel(b *testing.B) {
539 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…