(b *testing.B)
| 574 | } |
| 575 | |
| 576 | func 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 | |
| 596 | func BenchmarkStructExceptSuccess(b *testing.B) { |
| 597 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…