MCPcopy Index your code
hub / github.com/devfeel/mapper / BenchmarkAutoMapper

Function BenchmarkAutoMapper

mapper_test.go:474–483  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

472}
473
474func 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
485func BenchmarkAutoMapper_Map(b *testing.B) {
486 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}

Callers

nothing calls this directly

Calls 2

RegisterFunction · 0.85
MapperFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…