(b *testing.B)
| 472 | } |
| 473 | |
| 474 | func BenchmarkAutoMapper(b *testing.B) { |
| 475 | Register(&FromStruct{}) |
| 476 | Register(&ToStruct{}) |
| 477 | from := &FromStruct{Name: "From", Sex: true, AA: "AA"} |
| 478 | to := &ToStruct{} |
| 479 | |
| 480 | for i := 0; i < b.N; i++ { |
| 481 | Mapper(from, to) |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | func BenchmarkAutoMapper_Map(b *testing.B) { |
| 486 | from := &FromStruct{Name: "From", Sex: true, AA: "AA"} |