(b *testing.B)
| 536 | } |
| 537 | |
| 538 | func 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 | |
| 558 | func BenchmarkStructPartialFailure(b *testing.B) { |
| 559 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…