(b *testing.B)
| 492 | } |
| 493 | |
| 494 | func BenchmarkMapperMap(b *testing.B) { |
| 495 | Register(&testStruct{}) |
| 496 | fromMap := make(map[string]interface{}) |
| 497 | fromMap["Name"] = "test" |
| 498 | fromMap["Sex"] = true |
| 499 | fromMap["Age"] = 10 |
| 500 | fromMap["time"] = time.Now() |
| 501 | toObj := &testStruct{} |
| 502 | |
| 503 | for i := 0; i < b.N; i++ { |
| 504 | MapperMap(fromMap, toObj) |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | func BenchmarkSyncMap(b *testing.B) { |
| 509 | var sMap sync.Map |